Commit 6263d8dd authored by 赵啸非's avatar 赵啸非

添加菜单资源配置

parent 6b1de969
......@@ -13,7 +13,7 @@ import lombok.Data;
* 菜单信息业务实体对象
*
* @author zxfei
* @date 2024-09-11
* @date 2024-12-06
*/
@Data
public class MenuEntity extends MenuVo {
......@@ -107,6 +107,10 @@ public class MenuEntity extends MenuVo {
* 是否隐藏(0.否,1.是)
*/
private Integer hideChildrenInMenu;
/**
* 资源访问路径,多个逗号分割
*/
private String resourceUrl;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -146,5 +150,6 @@ public class MenuEntity extends MenuVo {
this.cache = 0;
this.activeDir = "";
this.hideChildrenInMenu = 0;
this.resourceUrl = "";
}
}
\ No newline at end of file
......@@ -6,7 +6,7 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
* 菜单信息业务查询对象
*
* @author zxfei
* @date 2024-09-11
* @date 2024-12-06
*/
public class MenuQuery extends MenuEntity {
/** 开始 菜单ID,主键,自增长 */
......@@ -276,6 +276,11 @@ public class MenuQuery extends MenuEntity {
/** 是否隐藏(0.否,1.是)排除列表 */
private List <Integer> hideChildrenInMenuNotList;
/** 资源访问路径,多个逗号分割 */
private List<String> resourceUrlList;
/** 资源访问路径,多个逗号分割排除列表 */
private List <String> resourceUrlNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MenuQuery> orConditionList;
......@@ -1785,6 +1790,38 @@ public class MenuQuery extends MenuEntity {
}
/**
* 获取 资源访问路径,多个逗号分割
* @return resourceUrlList
*/
public List<String> getResourceUrlList(){
return this.resourceUrlList;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlList
*/
public void setResourceUrlList(List<String> resourceUrlList){
this.resourceUrlList = resourceUrlList;
}
/**
* 获取 资源访问路径,多个逗号分割
* @return resourceUrlNotList
*/
public List<String> getResourceUrlNotList(){
return this.resourceUrlNotList;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlNotList
*/
public void setResourceUrlNotList(List<String> resourceUrlNotList){
this.resourceUrlNotList = resourceUrlNotList;
}
/**
* 设置 菜单ID,主键,自增长
* @param id
......@@ -2717,6 +2754,25 @@ public class MenuQuery extends MenuEntity {
return this;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrl
*/
public MenuQuery resourceUrl(String resourceUrl){
setResourceUrl(resourceUrl);
return this;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlList
*/
public MenuQuery resourceUrlList(List<String> resourceUrlList){
this.resourceUrlList = resourceUrlList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -56,6 +56,12 @@ public class MenuTreeSelect implements Serializable {
*/
private String perms;
/**
* 权限标识,多个逗号分割
*/
private String resourceUrl;
/**
* 是否隐藏(0.否,1.是)
*/
......@@ -81,6 +87,7 @@ public class MenuTreeSelect implements Serializable {
this.menuType = entity.getMenuType();
this.visible = entity.getVisible();
this.perms = entity.getPerms();
this.resourceUrl=entity.getResourceUrl();
this.checked=entity.getChecked();
this.hideChildrenInMenu = entity.getHideChildrenInMenu();
if(!ObjectUtils.isEmpty(entity.getChildren())){
......@@ -99,6 +106,7 @@ public class MenuTreeSelect implements Serializable {
node.setMenuType(jsonObject.getInteger("menuType"));
node.setVisible(jsonObject.getInteger("visible"));
node.setPerms(jsonObject.getString("perms"));
node.setResourceUrl(jsonObject.getString("resourceUrl"));
node.setChecked(jsonObject.getInteger("checked"));
node.setHideChildrenInMenu(jsonObject.getInteger("hideChildrenInMenu"));
JSONArray jsonArray = jsonObject.getJSONArray("children");
......
......@@ -18,6 +18,8 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
import com.mortals.xhx.base.system.resource.model.ResourceQuery;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.role.dao.RoleAuthDao;
import com.mortals.xhx.base.system.role.model.RoleAuthEntity;
......@@ -115,16 +117,38 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
//todo 一个菜单可以对应多个资源
MenuEntity menuEntity = menuService.get(menuId, context);
if(!ObjectUtils.isEmpty(menuEntity)){
String perms = menuEntity.getPerms();
if(!ObjectUtils.isEmpty(perms)){
List<String> split = StrUtil.split(perms, ",");
String resourceUrl = menuEntity.getResourceUrl();
if(!ObjectUtils.isEmpty(resourceUrl)){
List<String> split = StrUtil.split(resourceUrl, ",");
for (String s : split) {
RoleAuthEntity entity = new RoleAuthEntity();
entity.setRoleId(roleId);
entity.setMenuId(menuId);
entity.setResourceId(DataUtil.converStr2Long(s,0L));
entity.setCreateTime(new Date());
entity.setCreateUserId(1L);
//判断资源路径类型 如果是/xxx开头 查询资源是否存在,不存在则创建
if (StrUtil.startWith(s, "/")) {
//根据路径查询资源是否存在
ResourceEntity resourceEntity = resourceService.selectOne(new ResourceQuery().url(s));
if(ObjectUtils.isEmpty(resourceEntity)){
ResourceEntity resource = new ResourceEntity();
resource.initAttrValue();
resource.setName(menuEntity.getName());
resource.setGroupName("菜单自定义");
resource.setUrl(s);
resource.setCreateTime(new Date());
resource.setCreateUserId(1L);
resourceService.save(resource, context);
entity.setResourceId(resource.getId());
}else{
entity.setResourceId(resourceEntity.getId());
}
}else{
//查询下id是否存在 如果存在 添加
ResourceEntity resource = resourceService.get(DataUtil.converStr2Long(s, 0L), context);
if(ObjectUtils.isEmpty(resource)) continue;
entity.setResourceId(resource.getId());
}
list.add(entity);
}
}else{
......
......@@ -32,6 +32,7 @@
<result property="cache" column="cache" />
<result property="activeDir" column="activeDir" />
<result property="hideChildrenInMenu" column="hideChildrenInMenu" />
<result property="resourceUrl" column="resourceUrl" />
</resultMap>
<!-- 表所有列 -->
......@@ -118,23 +119,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hideChildrenInMenu') or colPickMode == 1 and data.containsKey('hideChildrenInMenu')))">
a.hideChildrenInMenu,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('resourceUrl') or colPickMode == 1 and data.containsKey('resourceUrl')))">
a.resourceUrl,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_menu
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu)
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu,resourceUrl)
VALUES
(#{name},#{url},#{ancestors},#{parentId},#{linkType},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{component},#{menuType},#{authType},#{visible},#{perms},#{remark},#{orderId},#{status},#{createTime},#{createUserId},#{createUserName},#{updateUserId},#{updateUserName},#{updateTime},#{cache},#{activeDir},#{hideChildrenInMenu})
(#{name},#{url},#{ancestors},#{parentId},#{linkType},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{component},#{menuType},#{authType},#{visible},#{perms},#{remark},#{orderId},#{status},#{createTime},#{createUserId},#{createUserName},#{updateUserId},#{updateUserName},#{updateTime},#{cache},#{activeDir},#{hideChildrenInMenu},#{resourceUrl})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_menu
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu)
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu,resourceUrl)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.url},#{item.ancestors},#{item.parentId},#{item.linkType},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.component},#{item.menuType},#{item.authType},#{item.visible},#{item.perms},#{item.remark},#{item.orderId},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.updateUserId},#{item.updateUserName},#{item.updateTime},#{item.cache},#{item.activeDir},#{item.hideChildrenInMenu})
(#{item.name},#{item.url},#{item.ancestors},#{item.parentId},#{item.linkType},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.component},#{item.menuType},#{item.authType},#{item.visible},#{item.perms},#{item.remark},#{item.orderId},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.updateUserId},#{item.updateUserName},#{item.updateTime},#{item.cache},#{item.activeDir},#{item.hideChildrenInMenu},#{item.resourceUrl})
</foreach>
</insert>
......@@ -258,6 +262,9 @@
<if test="(colPickMode==0 and data.containsKey('hideChildrenInMenuIncrement')) or (colPickMode==1 and !data.containsKey('hideChildrenInMenuIncrement'))">
a.hideChildrenInMenu=ifnull(a.hideChildrenInMenu,0) + #{data.hideChildrenInMenuIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('resourceUrl')) or (colPickMode==1 and !data.containsKey('resourceUrl'))">
a.resourceUrl=#{data.resourceUrl},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -512,6 +519,13 @@
</choose>
</foreach>
</trim>
<trim prefix="resourceUrl=(case" suffix="ELSE resourceUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('resourceUrl')) or (colPickMode==1 and !item.containsKey('resourceUrl'))">
when a.id=#{item.id} then #{item.resourceUrl}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -1269,6 +1283,27 @@
${_conditionType_} a.hideChildrenInMenu <![CDATA[ <= ]]> #{${_conditionParam_}.hideChildrenInMenuEnd}
</if>
<if test="conditionParamRef.containsKey('resourceUrl')">
<if test="conditionParamRef.resourceUrl != null and conditionParamRef.resourceUrl != ''">
${_conditionType_} a.resourceUrl like #{${_conditionParam_}.resourceUrl}
</if>
<if test="conditionParamRef.resourceUrl == null">
${_conditionType_} a.resourceUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('resourceUrlList') and conditionParamRef.resourceUrlList.size() > 0">
${_conditionType_} a.resourceUrl in
<foreach collection="conditionParamRef.resourceUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('resourceUrlNotList') and conditionParamRef.resourceUrlNotList.size() > 0">
${_conditionType_} a.resourceUrl not in
<foreach collection="conditionParamRef.resourceUrlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -1599,6 +1634,11 @@
<if test='orderCol.hideChildrenInMenu != null and "DESC".equalsIgnoreCase(orderCol.hideChildrenInMenu)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('resourceUrl')">
a.resourceUrl
<if test='orderCol.resourceUrl != null and "DESC".equalsIgnoreCase(orderCol.resourceUrl)'>DESC</if>
,
</if>
</trim>
</if>
......
# 设备管理服务平台
版本 | 创建时间 | 作者 | 备注信息
---|---|---|---
v1.0|2022-01-20|zxfei| 接口文档
## 数据类型
类型名称|类型描述|参考样例
---|---|---
String |字符串|A、a、ab
Integer|数字类型|1、12、-1
Long|长整型数字|1、12、-1
date|时间类型,单位纳秒数字|167988745573
BigDecimal|小数类型|545.256
object|对象类型|{"name":"zhang3"}
arrays|数组类型|[{"name":"zhang3"},{"name":"zhang2"}]
## 设备
### 查询设备列表
**请求URL:** m/device/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询设备
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
deviceCode|String|否|设备编码查询设备
**请求样例:**
```
{
"deviceCode":"a1-b1-c1",
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;deviceName|String|设备名称
&emsp;&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;&emsp;deviceMac|String|设备的MAC地址
&emsp;&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;&emsp;siteName|String|站点名称
&emsp;&emsp;platformId|Long|平台系统Id
&emsp;&emsp;platformName|String|平台系统名称
&emsp;&emsp;productId|Long|产品Id
&emsp;&emsp;productName|String|产品名称
&emsp;&emsp;skinId|Long|皮肤id
&emsp;&emsp;skinName|String|皮肤名称
&emsp;&emsp;homeUrl|String|首页地址
&emsp;&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;&emsp;lon|String|经度
&emsp;&emsp;lati|String|经度
&emsp;&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;&emsp;deviceInFloor|Integer|所属楼层
&emsp;&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;&emsp;leadingOfficial|String|负责人
&emsp;&emsp;leadingOfficialTelephone|String|联系电话
&emsp;&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;&emsp;devicePhotoPath|String|设备图片
&emsp;&emsp;ip|String|设备访问ip
&emsp;&emsp;centernum|String|中心设备编码
&emsp;&emsp;port|String|端口
&emsp;&emsp;deviceTopic|String|设备topic信息
&emsp;&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;&emsp;deviceAuthCode|String|设备授权码
&emsp;&emsp;deviceRemark|String|备注
&emsp;&emsp;onlineTime|Date|最近上线时间
&emsp;&emsp;offlineTime|Date|最近离线时间
&emsp;&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;deviceSN|String|设备SN码
&emsp;&emsp;deviceVersion|String|设备版本
&emsp;&emsp;productCode|String|产品编码
&emsp;&emsp;hallId|Long|大厅Id
&emsp;&emsp;hallName|String|大厅名称
&emsp;&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看设备
**请求URL:** m/device/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看设备,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/device/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|主键ID,主键,自增长
&emsp;deviceName|String|设备名称
&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;deviceMac|String|设备的MAC地址
&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;siteName|String|站点名称
&emsp;platformId|Long|平台系统Id
&emsp;platformName|String|平台系统名称
&emsp;productId|Long|产品Id
&emsp;productName|String|产品名称
&emsp;skinId|Long|皮肤id
&emsp;skinName|String|皮肤名称
&emsp;homeUrl|String|首页地址
&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;lon|String|经度
&emsp;lati|String|经度
&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;deviceInFloor|Integer|所属楼层
&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;leadingOfficial|String|负责人
&emsp;leadingOfficialTelephone|String|联系电话
&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;devicePhotoPath|String|设备图片
&emsp;ip|String|设备访问ip
&emsp;centernum|String|中心设备编码
&emsp;port|String|端口
&emsp;deviceTopic|String|设备topic信息
&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;deviceAuthCode|String|设备授权码
&emsp;deviceRemark|String|备注
&emsp;onlineTime|Date|最近上线时间
&emsp;offlineTime|Date|最近离线时间
&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;createUserId|Long|创建用户
&emsp;createTime|Date|创建时间
&emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间
&emsp;deviceSN|String|设备SN码
&emsp;deviceVersion|String|设备版本
&emsp;productCode|String|产品编码
&emsp;hallId|Long|大厅Id
&emsp;hallName|String|大厅名称
&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7358,
"deviceName":"erph19",
"deviceCode":"ntgta3",
"deviceMac":"znt3id",
"siteId":9517,
"siteCode":"4559rn",
"siteName":"7ao5ir",
"platformId":2690,
"platformName":"munkr2",
"productId":4970,
"productName":"s74o2p",
"skinId":3594,
"skinName":"mfzk6x",
"homeUrl":"smt540",
"deviceFirmId":4500,
"deviceFirmname":"gu43rw",
"deviceSrc":4826,
"deviceDataSourceWay":1120,
"lon":"yrgkye",
"lati":"qoexqr",
"deviceInBuilding":7864,
"deviceInFloor":5044,
"defectsLiabilityPeriod":"2023-05-11",
"leadingOfficial":"2rde5a",
"leadingOfficialTelephone":"myuu2u",
"isReceiveMess":3164,
"devicePhotoPath":"0tys3c",
"ip":"3gzlpg",
"centernum":"kdxfpx",
"port":"immaf4",
"deviceTopic":"kum049",
"deviceStatus":4767,
"enabled":6533,
"deviceAuthCode":"ynopdq",
"deviceRemark":"l6ak87",
"onlineTime":"2023-05-11",
"offlineTime":"2023-05-11",
"deleted":8884,
"source":4089,
"createUserId":1410,
"createTime":"2023-05-11",
"updateUserId":846,
"updateTime":"2023-05-11",
"deviceSN":"jsbvj4",
"deviceVersion":"9mgt52",
"productCode":"iah2ld",
"hallId":6781,
"hallName":"gfi3zw",
"showSms":1994,
"showPrint":2841,
"showWechatQrCode":9531
}
}
```
## 设备终端接口服务
### 服务端地址获取
**广播服务端口:** 8074
**广播客户端口:** 8073
**请求方式:** UDP
**内容类型:** application/json;charset=utf-8
**简要描述:** 服务端地址获取
**广播参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
deviceNum|String|设备编码|是|-
**请求样例:**
```
{
"deviceNum":"12345678"
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|Object|数据对象|-
&emsp;ip|String|ip|-
&emsp;port|Integer|port|-
&emsp;deviceRegisterApi|String|设备注册API|-
&emsp;deviceInitApi|String|设备初始化信息API|-
&emsp;deviceUpdateApi|String|设备页面修改API|-
**响应消息样例:**
```
{
"msg":"获取服务端地址成功",
"code":1,
"data":{
"ip":"192.168.0.98",
"port":11091,,
"deviceRegisterApi":"/m/api/register",
"deviceInitApi":"/m/api/deviceInit",
"deviceUpdateApi":"/m/api/deviceUpdate"
}
}
```
### 设备注册
**请求URL:** m/api/register
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 设备注册,成功返回响应rabbmit连接参数,如未找到该设备,系统会根据设备码创建新设备
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
deviceCode|String|设备编码,唯一|是|可是编码或者mac地址,由平台创建
deviceVersion|String|设备版本信息|否|-
**请求样例:**
```
{
"deviceCode":"a12345678",
"deviceVersion":"1"
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
&emsp;content|String|加密后的内容|AES加密
**content解密参数:**
参数名称 |参数类型| 备注 |其它
---|---|-----------------------|---
rabbmitInfo|Object| rabbmit相关链接信息 |-
&emsp;downTopicFilter|String| 下行队列topic |-
&emsp;uploadTopicFilter|String| 上行队列topic |-
&emsp;username|String| rabbmit用户名 |-
&emsp;password|String| rabbmit密码 |-
&emsp;host|String| ip |-
&emsp;port|String| 端口 |-
&emsp;virtualHost|String| 虚拟机 |-
&emsp;exchangeName|String| 交换机名称 |-
&emsp;messageTtl|String| 队列消息超时时间,毫秒 |-
serviceInfo|Object| 服务接口连接信息 |-
&emsp;homeUrl|String| 首页 |-
&emsp;eventUrl|String| 事件地址 |-
&emsp;serverUrl|String| 前端服务接口地址 |-
deviceInfo|Object| 设备基础信息 |-
&emsp;siteId|Long| 站点ID |-
&emsp;siteCode|String| 站点编码 |-
&emsp;siteName|String| 站点名称 |-
&emsp;productId|Long| 设备产品类型Id |-
&emsp;productName|String| 设备产品类型 |-
&emsp;enabled|Integer| 设备启用状态 (0.停止,1.启用) |-
&emsp;source|Integer| 设备来源,默认1(0.旧设备,1.新设备) |-
**响应消息样例:**
```
{
"code":1,
"data":{
"content":"hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA="
}
}
```
### 设备初始化信息
**请求URL:** m/api/deviceInit
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 设备初始化信息,提供手机编辑设备入口信息
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
**请求样例:**
```
{}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
&emsp;productList|array|产品列表|数组
&emsp;&emsp;productId|Long|产品id|-
&emsp;&emsp;productName|String|产品名称|-
&emsp;&emsp;productCode|String|产品编码|-
&emsp;firmList|array|设备生产商列表|数组
&emsp;&emsp;deviceFirmId|Long|生产商id|-
&emsp;&emsp;deviceFirmname|String|生产商名称|-
&emsp;siteList|array|站点列表|数组
&emsp;&emsp;siteId|Long|站点id|-
&emsp;&emsp;siteName|String|站点名称|-
&emsp;&emsp;siteCode|String|站点编码|-
**响应消息样例:**
```
{
"code": 1,
"data": {
"firmList": [
{
"deviceFirmId": 1,
"deviceFirmname": "四川新鸿翔"
}
],
"productList": [
{
"productCode": "pdj",
"productId": 1,
"productName": "排队机"
},
{
"productCode": "ckp",
"productId": 2,
"productName": "窗口屏"
}
],
"siteList": [
{
"siteCode": "510105521000-0001",
"siteId": 1,
"siteName": "测试站点1"
},
{
"siteCode": "513400000000-0001",
"siteId": 2,
"siteName": "凉山州行政审批局"
}
]
}
}
```
### 设备新增或更新
**请求URL:** m/api/deviceUpdate
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 设备新增或更新,提供给前端手机页面更新设备操作
**请求参数:**
参数名称|类型|必填|其它
---|---|---|---
deviceName|String|否|设备名称
deviceCode|String|是|设备编码,默认为MAC地址
deviceMac|String|否|设备MAC地址,如不填写,默认等于deviceCode
siteId|Long|是|站点Id
siteCode|String|否|站点编号
siteName|String|否|站点名称
productId|Long|是|产品Id
deviceFirmId|Long|否|设备生产厂商ID
deviceFirmname|String|否|设备生产厂商名称
lon|String|否|经度
lati|String|否|经度
deviceInBuilding|Integer|否|所属楼栋
deviceInFloor|Integer|否|所属楼层
defectsLiabilityPeriod|Date|否|保修期,如2020-08-12 15:00:00
leadingOfficial|String|否|负责人
leadingOfficialTelephone|String|否|联系电话
source|Integer|否|设备来源,默认1(0.旧设备,1.新设备)
active|Integer|否|设备激活,默认0(0.否,1.是)
**请求样例:**
```
{
"deviceName":"agpla8",
"deviceCode":"a1-a2",
"deviceMac":"a1-a2",
"siteId":1,
"siteCode":"510105521000-0001",
"siteName":"测试站点1",
"productId":1,
"deviceFirmId":1,
"lon":"12",
"lati":"22",
"deviceInBuilding":13,
"deviceInFloor":22,
"defectsLiabilityPeriod":"2022-06-30",
"leadingOfficial":"张三",
"leadingOfficialTelephone":"13281114856",
"source":1,
"active":1
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
&emsp;content|String|加密后的内容|AES加密
**content解密参数:**
参数名称 |参数类型|备注|其它
---|---|--|---
rabbmitInfo|Object|rabbmit相关链接信息|-
&emsp;downTopicFilter|String|下行队列topic|-
&emsp;uploadTopicFilter|String|上行队列topic|-
&emsp;username|String|rabbmit用户名|-
&emsp;password|String|rabbmit密码|-
&emsp;host|String|ip|-
&emsp;port|String|端口|-
&emsp;virtualHost|String|虚拟机|-
&emsp;exchangeName|String|交换机名称|-
&emsp;messageTtl|String|队列消息超时时间,毫秒|-
serviceInfo|Object|服务接口连接信息|-
&emsp;homeUrl|String|首页|-
&emsp;serverUrl|String|前端服务接口地址|-
serviceInfo|Object|服务接口连接信息|-
&emsp;homeUrl|String|首页|-
&emsp;eventUrl|String|事件地址|-
&emsp;serverUrl|String|前端服务接口地址|-
deviceInfo|Object|设备基础信息|-
&emsp;siteId|Long|站点ID|-
&emsp;siteCode|String|站点编码|-
&emsp;siteName|String|站点名称|-
&emsp;productId|Long|设备产品类型Id|-
&emsp;productName|String|设备产品类型|-
&emsp;enabled|Integer|设备启用状态 (0.停止,1.启用)|-
**响应消息样例:**
```
{
"code":1,
"data":{
"content":"hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA="
}
}
```
### 设备版本检查
**请求URL:** m/api/checkVersion
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 检查当前设备所属版本最新版本信息
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
deviceCode|String|设备编码,唯一|是|可是编码或者mac地址,由平台创建
deviceVersion|String|设备版本信息|否|-
**请求样例:**
```
{
"deviceCode":"a12345678"
}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
data|object|数据对象|-
&emsp;content|String|加密后的内容|AES加密
**content解密参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
&emsp;productId|Long|产品Id|-
&emsp;productCode|String|产品编号|-
&emsp;productName|String|产品名称|-
&emsp;version|Int|版本号|-
&emsp;remark|String|备注信息|-
&emsp;downloadUrl|String|版本下载地址|-
**响应消息样例:**
```
{
"code":1,
"data":{
"content":"hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA="
}
}
```
## 对外平台接口服务
### 获取接口访问token
**请求URL:** m/api/getToken
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 获取接口访问token
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
loginName|String|平台用户名称|是|-
password|String|平台用户密码|是|-
**请求样例:**
```
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
### 接收第三方平台设备消息
**请求URL:** m/api/receive
**请求方式:** POST
**鉴权头信息:** Authorization: {{token}}
**内容类型:** application/json;charset=utf-8
**简要描述:**
**请求参数:**
参数名称|类型|备注|必填|其它
:------|:---|:---|:---|:---
receiveMethod|Integer|1:新增,2:修改,3:删除,4:激活,5:启用,6:停用|是|-
deviceName|String|设备名称|否|-
deviceCode|String|设备编码,如MAC地址|是|-
platformCode|String|平台系统编码|是|见平台编码附录
productCode|String|产品编码|是|见产品编码附录
ip|String|设备访问ip|否|-
port|String|设备端口|否|-
siteId|Long|站点ID,来源基础服务平台|是|-
leadingOfficial|String|负责人|否|-
leadingOfficialTelephone|String|否|联系电话|-
siteCode|String|站点编号,来源基础服务平台|是|-
siteName|String|站点名称|是|-
homeUrl|String|首页地址|否|-
deviceRemark|String|备注|是|-
deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)|是|默认0为激活
source|Integer|(0.旧设备,1.新设备)|是|默认1新设备
**请求样例:**
```
{}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
### 接收第三方平台下发设备消息
**请求URL:** m/notify/downMsg
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:**
**请求参数:**
参数名称| 类型 |备注|必填|其它
:------|:--------|:--|:---|:---
deviceCodeList| Arrays |设备编码列表|是|-
action| String |设备下发消息行为,消息类型编号|是|-
content| String |下发消息内容|是|默认为[]数组内容
**请求样例:**
```
{}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
### 接收第三方平台命令消息
**请求URL:** m/api/callback
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 以数组方式进行提交
**请求参数:**
参数名称|类型|备注|必填|其它
:------|:---|:---|:---|:---
deviceCode|String|设备编码,如MAC地址|是|-
messageType|String|消息类型|是|如HEART_BEAT
timestamp|Long|时间戳|是|-
data|String|数据体,内容自行定义|否|-
**请求样例:**
```
[
{
"data":"{xxxx}",
"deviceCode":"a1",
"messageType":"HEART_BEAT",
"timestamp":1654656951795
},
{
"data":"{bbbbbb}",
"deviceCode":"a2",
"messageType":"HEART_BEAT",
"timestamp":1654656951795
}
]
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
**响应消息样例:**
```
```
### 回调各个平台通知消息
**请求URL:** 各平台通知地址
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 设备消息通知各个平台,当配置了地址时候
**请求参数:**
参数名称|类型|备注|必填|其它
:------|:---|:---|:---|:---
type|Integer|消息类型|是|0:设备增删改查,data数据域封装具体设备消息,1:设备消息类,数据域透传设备上行消息体。
msg|String|消息|否|-
data|object|数据对象|是|-
&emsp;deviceStatus|Integer||是|状态,1:新增,2:修改,3:删除,4:激活,5:启用,6:停用,7:上线,8:下线
&emsp;deviceName|String|设备名称|否|-
&emsp;deviceCode|String|设备编码,如MAC地址|是|-
&emsp;productCode|String|产品编码|是|见附录
&emsp;ip|String|设备访问ip|否|-
&emsp;port|String|设备端口|否|-
&emsp;leadingOfficial|String|负责人|否|-
&emsp;leadingOfficialTelephone|String|联系电话|否|-
&emsp;siteId|Long|站点ID,来源基础服务平台|是|-
&emsp;siteCode|String|站点编号,来源基础服务平台|是|-
&emsp;siteName|String|站点名称|是|-
&emsp;deviceRemark|String|备注|是|-
**请求样例:**
```
{}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
## 设备消息
### 上行消息
**topic:** uploadTopicFilter
**请求方式:** rabbmitMQ
**内容类型:** application/json;charset=utf-8
**简要描述:** 上行消息存放队列
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
headers|Object|消息头|是|-
&emsp;data|Object|消息头数据对象|是|-
&emsp;&emsp;protocol|String|数据域协议类型,默认json|是|-
&emsp;&emsp;messageType|String|上报消息类型|是|HEART_BEAT
&emsp;&emsp;deviceCode|String|设备编码信息|是|如:mac地址
&emsp;&emsp;sign|String|签名|是|-
&emsp;&emsp;timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
key|String|消息唯一标识|是|-
**请求样例:**
```
{
"data":"YWJjZDEyMzQ=",
"headers":{
"data":{
"protocol":"json",
"messageType":"HEART_BEAT",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"timestamp":"2022-04-15 09:48:05"
}
},
"key":"d3635cd0597d46c88b85797c3846b04f"
}
```
### 下行消息
**topic:** downTopicFilter
**请求方式:** rabbmitMQ
**内容类型:** application/json;charset=utf-8
**简要描述:** 下行消息存放队列
**请求参数:**
参数名称|类型|备注|必填|其它
---|---|---|---|---
headers|Object|消息头|是|-
&emsp;data|Object|消息头数据对象|是|-
&emsp;&emsp;protocol|String|数据域协议类型,默认json|是|-
&emsp;&emsp;messageType|String|下发消息类型|是|UPGREAD
&emsp;&emsp;deviceCode|String|设备编码信息|是|如:mac地址
&emsp;&emsp;sign|String|签名|是|-
&emsp;&emsp;timestamp|String|时间戳|是|-
data|byte[]|byte数组,base64编码|是|-
key|String|消息唯一标识|是|-
**请求样例:**
```
{
"data":"YWJjZDEyMzQ=",
"headers":{
"data":{
"protocol":"json",
"messageType":"UPGREAD",
"deviceCode":"A1:A2:A3:A4:A5:A6",
"sign":"abcd1234",
"downloadUrl":"http://xxxxx",
"timestamp":"2022-04-15 09:48:05"
}
},
"key":"d3635cd0597d46c88b85797c3846b04f"
}
```
## 设备告警日志
### 查询设备告警日志列表
**请求URL:** m/device/alarm/info/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询设备告警日志
**请求参数:**
参数名称| 类型 |必填|描述
:---|:--------|:---|:------
page| Integer |否|当前页
size| Integer |否|每页条数,值为-1,查询所有记录
alarmDevice| Long |否|告警设备Id
deviceName| String |否|告警设备名称
deviceCode| String |否|告警设备编码
alarmContent| String |否|告警内容
alarmType| Integer |否|告警类型,(0.离线)
alarmStatus| Integer |否|告警状态(0.未清除,1.清除未确认,2.清除已确认)
siteId| Long |否|站点Id
alarmTimeStart| String |否|开始时间
alarmTimeEnd| String |否|结束时间
**请求样例:**
```
{
"alarmDevice":2565,
"alarmType":5311,
"alarmStatus":7481,
"siteId":6279,
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;alarmTime|Date|告警时间
&emsp;&emsp;alarmDevice|Long|告警设备Id
&emsp;&emsp;alarmType|Integer|告警类型,(0.离线)
&emsp;&emsp;alarmLevel|Integer|告警级别(0.危险,1.次要,2.一般)
&emsp;&emsp;alarmReceivePersonnel|String|接收人员[设备管理的责任人]
&emsp;&emsp;receivePersonnelTelephone|String|接收人员电话
&emsp;&emsp;alarmStatus|Integer|告警状态,来自工单系统(0.未清除,1.清除未确认,2.清除已确认)
&emsp;&emsp;alarmContent|String|告警详细内容
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;&emsp;deviceCode|String|设备编码
&emsp;&emsp;deviceName|String|设备名称
dict|object|字典对象
&emsp;alarmType|object|字典属性对象,详见附录
&emsp;alarmLevel|object|字典属性对象,详见附录
&emsp;alarmStatus|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
## 码表
### 响应结果码表
结果码|结果|其它
---|---|---
1|成功|-
1001|当前设备编码不存在|-
1002|当前设备编码已存在|-
1003|所属产品编码不存在|-
1004|当前设备未激活,请在后台配置后再激活|-
1005|所属平台不存在!请在后台添加后再激活|-
1006|当前设备所属产品平台未配置,请在后台配置后再激活|-
1007|站点ID为空|-
1008|设备已创建,请完善设备配置信息|-
1009|当前设备不存在|-
1010|token认证失败|-
1011|未找到设备版本信息|-
-1|系统内部异常|-
## 附录
### 业务上行下行消息类型
编码|说明|其它
---|---|---
HEART_BEAT|设备心跳消息|设备上行发送
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>i5ting_ztree_toc:api</title>
<link href="toc/style/github-bf51422f4bb36427d391e4b75a1daa083c2d840e.css" media="all" rel="stylesheet" type="text/css"/>
<link href="toc/style/github2-d731afd4f624c99a4b19ad69f3083cd6d02b81d5.css" media="all" rel="stylesheet" type="text/css"/>
<link href="toc/css/zTreeStyle/zTreeStyle.css" media="all" rel="stylesheet" type="text/css"/>
<style>
pre {
counter-reset: line-numbering;
border: solid 1px #d9d9d9;
border-radius: 0;
background: #fff;
padding: 0;
line-height: 23px;
margin-bottom: 30px;
white-space: pre;
overflow-x: auto;
word-break: inherit;
word-wrap: inherit;
}
pre a::before {
content: counter(line-numbering);
counter-increment: line-numbering;
padding-right: 1em; /* space after numbers */
width: 25px;
text-align: right;
opacity: 0.7;
display: inline-block;
color: #aaa;
background: #eee;
margin-right: 16px;
padding: 2px 10px;
font-size: 13px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
pre a:first-of-type::before {
padding-top: 10px;
}
pre a:last-of-type::before {
padding-bottom: 10px;
}
pre a:only-of-type::before {
padding: 10px;
}
.highlight { background-color: #ffffcc } /* RIGHT */
</style>
</head>
<body>
<div>
<div style='width:25%;'>
<ul id="tree" class="ztree" style='width:100%'>
</ul>
</div>
<div id='readme' style='width:70%;margin-left:20%;'>
<article class='markdown-body'>
<h1 id="-">设备管理服务平台</h1>
<table>
<thead>
<tr>
<th>版本</th>
<th>创建时间</th>
<th>作者</th>
<th>备注信息</th>
</tr>
</thead>
<tbody>
<tr>
<td>v1.0</td>
<td>2022-01-20</td>
<td>zxfei</td>
<td>接口文档</td>
</tr>
</tbody>
</table>
<h2 id="-">数据类型</h2>
<table>
<thead>
<tr>
<th>类型名称</th>
<th>类型描述</th>
<th>参考样例</th>
</tr>
</thead>
<tbody>
<tr>
<td>String</td>
<td>字符串</td>
<td>A、a、ab</td>
</tr>
<tr>
<td>Integer</td>
<td>数字类型</td>
<td>1、12、-1</td>
</tr>
<tr>
<td>Long</td>
<td>长整型数字</td>
<td>1、12、-1</td>
</tr>
<tr>
<td>date</td>
<td>时间类型,单位纳秒数字</td>
<td>167988745573</td>
</tr>
<tr>
<td>BigDecimal</td>
<td>小数类型</td>
<td>545.256</td>
</tr>
<tr>
<td>object</td>
<td>对象类型</td>
<td>{&quot;name&quot;:&quot;zhang3&quot;}</td>
</tr>
<tr>
<td>arrays</td>
<td>数组类型</td>
<td>[{&quot;name&quot;:&quot;zhang3&quot;},{&quot;name&quot;:&quot;zhang2&quot;}]</td>
</tr>
</tbody>
</table>
<h2 id="-">设备终端接口服务</h2>
<h3 id="-">服务端地址获取</h3>
<p><strong>广播服务端口:</strong> 8074</p>
<p><strong>广播客户端口:</strong> 8073</p>
<p><strong>请求方式:</strong> UDP</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 服务端地址获取</p>
<p><strong>广播参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>deviceNum</td>
<td>String</td>
<td>设备编码</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>
{
&quot;deviceNum&quot;:&quot;12345678&quot;
}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码(-1.失败,1.成功)</td>
<td>-</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>Object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;ip</td>
<td>String</td>
<td>ip</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;port</td>
<td>Integer</td>
<td>port</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;deviceRegisterApi</td>
<td>String</td>
<td>设备注册API</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;deviceInitApi</td>
<td>String</td>
<td>设备初始化信息API</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;deviceUpdateApi</td>
<td>String</td>
<td>设备页面修改API</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>
{
&quot;msg&quot;:&quot;获取服务端地址成功&quot;,
&quot;code&quot;:1,
&quot;data&quot;:{
&quot;ip&quot;:&quot;192.168.0.98&quot;,
&quot;port&quot;:11091,,
&quot;deviceRegisterApi&quot;:&quot;/m/api/register&quot;,
&quot;deviceInitApi&quot;:&quot;/m/api/deviceInit&quot;,
&quot;deviceUpdateApi&quot;:&quot;/m/api/deviceUpdate&quot;
}
}
</code></pre><h3 id="-">设备注册</h3>
<p><strong>请求URL:</strong> m/api/register</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 设备注册,成功返回响应rabbmit连接参数,如未找到该设备,系统会根据设备码创建新设备</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>deviceCode</td>
<td>String</td>
<td>设备编码,唯一</td>
<td></td>
<td>可是编码或者mac地址,由平台创建</td>
</tr>
<tr>
<td>deviceVersion</td>
<td>String</td>
<td>设备版本信息</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{
&quot;deviceCode&quot;:&quot;a12345678&quot;,
&quot;deviceVersion&quot;:&quot;1&quot;
}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码(-1.失败,1.成功)</td>
<td>-</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;content</td>
<td>String</td>
<td>加密后的内容</td>
<td>AES加密</td>
</tr>
</tbody>
</table>
<p><strong>content解密参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>rabbmitInfo</td>
<td>Object</td>
<td>rabbmit相关链接信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;downTopicFilter</td>
<td>String</td>
<td>下行队列topic</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;uploadTopicFilter</td>
<td>String</td>
<td>上行队列topic</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;username</td>
<td>String</td>
<td>rabbmit用户名</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;password</td>
<td>String</td>
<td>rabbmit密码</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;host</td>
<td>String</td>
<td>ip</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;port</td>
<td>String</td>
<td>端口</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;virtualHost</td>
<td>String</td>
<td>虚拟机</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;exchangeName</td>
<td>String</td>
<td>交换机名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;messageTtl</td>
<td>String</td>
<td>队列消息超时时间,毫秒</td>
<td>-</td>
</tr>
<tr>
<td>serviceInfo</td>
<td>Object</td>
<td>服务接口连接信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;homeUrl</td>
<td>String</td>
<td>首页</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;eventUrl</td>
<td>String</td>
<td>事件地址</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;serverUrl</td>
<td>String</td>
<td>前端服务接口地址</td>
<td>-</td>
</tr>
<tr>
<td>deviceInfo</td>
<td>Object</td>
<td>设备基础信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteId</td>
<td>Long</td>
<td>站点ID</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteCode</td>
<td>String</td>
<td>站点编码</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteName</td>
<td>String</td>
<td>站点名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productId</td>
<td>Long</td>
<td>设备产品类型Id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productName</td>
<td>String</td>
<td>设备产品类型</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;enabled</td>
<td>Integer</td>
<td>设备启用状态 (0.停止,1.启用)</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;source</td>
<td>Integer</td>
<td>设备来源,默认1(0.旧设备,1.新设备)</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>{
&quot;code&quot;:1,
&quot;data&quot;:{
&quot;content&quot;:&quot;hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA=&quot;
}
}
</code></pre><h3 id="-">设备初始化信息</h3>
<p><strong>请求URL:</strong> m/api/deviceInit</p>
<p><strong>请求方式:</strong> GET</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 设备初始化信息,提供手机编辑设备入口信息</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码(-1.失败,1.成功)</td>
<td>-</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productList</td>
<td>array</td>
<td>产品列表</td>
<td>数组</td>
</tr>
<tr>
<td>&emsp;&emsp;productId</td>
<td>Long</td>
<td>产品id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;productName</td>
<td>String</td>
<td>产品名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;productCode</td>
<td>String</td>
<td>产品编码</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;firmList</td>
<td>array</td>
<td>设备生产商列表</td>
<td>数组</td>
</tr>
<tr>
<td>&emsp;&emsp;deviceFirmId</td>
<td>Long</td>
<td>生产商id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;deviceFirmname</td>
<td>String</td>
<td>生产商名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteList</td>
<td>array</td>
<td>站点列表</td>
<td>数组</td>
</tr>
<tr>
<td>&emsp;&emsp;siteId</td>
<td>Long</td>
<td>站点id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;siteName</td>
<td>String</td>
<td>站点名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;siteCode</td>
<td>String</td>
<td>站点编码</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>{
&quot;code&quot;: 1,
&quot;data&quot;: {
&quot;firmList&quot;: [
{
&quot;deviceFirmId&quot;: 1,
&quot;deviceFirmname&quot;: &quot;四川新鸿翔&quot;
}
],
&quot;productList&quot;: [
{
&quot;productCode&quot;: &quot;pdj&quot;,
&quot;productId&quot;: 1,
&quot;productName&quot;: &quot;排队机&quot;
},
{
&quot;productCode&quot;: &quot;ckp&quot;,
&quot;productId&quot;: 2,
&quot;productName&quot;: &quot;窗口屏&quot;
}
],
&quot;siteList&quot;: [
{
&quot;siteCode&quot;: &quot;510105521000-0001&quot;,
&quot;siteId&quot;: 1,
&quot;siteName&quot;: &quot;测试站点1&quot;
},
{
&quot;siteCode&quot;: &quot;513400000000-0001&quot;,
&quot;siteId&quot;: 2,
&quot;siteName&quot;: &quot;凉山州行政审批局&quot;
}
]
}
}
</code></pre><h3 id="-">设备新增或更新</h3>
<p><strong>请求URL:</strong> m/api/deviceUpdate</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 设备新增或更新,提供给前端手机页面更新设备操作</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>deviceName</td>
<td>String</td>
<td></td>
<td>设备名称</td>
</tr>
<tr>
<td>deviceCode</td>
<td>String</td>
<td></td>
<td>设备编码,默认为MAC地址</td>
</tr>
<tr>
<td>deviceMac</td>
<td>String</td>
<td></td>
<td>设备MAC地址,如不填写,默认等于deviceCode</td>
</tr>
<tr>
<td>siteId</td>
<td>Long</td>
<td></td>
<td>站点Id</td>
</tr>
<tr>
<td>siteCode</td>
<td>String</td>
<td></td>
<td>站点编号</td>
</tr>
<tr>
<td>siteName</td>
<td>String</td>
<td></td>
<td>站点名称</td>
</tr>
<tr>
<td>productId</td>
<td>Long</td>
<td></td>
<td>产品Id</td>
</tr>
<tr>
<td>deviceFirmId</td>
<td>Long</td>
<td></td>
<td>设备生产厂商ID</td>
</tr>
<tr>
<td>deviceFirmname</td>
<td>String</td>
<td></td>
<td>设备生产厂商名称</td>
</tr>
<tr>
<td>lon</td>
<td>String</td>
<td></td>
<td>经度</td>
</tr>
<tr>
<td>lati</td>
<td>String</td>
<td></td>
<td>经度</td>
</tr>
<tr>
<td>deviceInBuilding</td>
<td>Integer</td>
<td></td>
<td>所属楼栋</td>
</tr>
<tr>
<td>deviceInFloor</td>
<td>Integer</td>
<td></td>
<td>所属楼层</td>
</tr>
<tr>
<td>defectsLiabilityPeriod</td>
<td>Date</td>
<td></td>
<td>保修期,如2020-08-12 15:00:00</td>
</tr>
<tr>
<td>leadingOfficial</td>
<td>String</td>
<td></td>
<td>负责人</td>
</tr>
<tr>
<td>leadingOfficialTelephone</td>
<td>String</td>
<td></td>
<td>联系电话</td>
</tr>
<tr>
<td>source</td>
<td>Integer</td>
<td></td>
<td>设备来源,默认1(0.旧设备,1.新设备)</td>
</tr>
<tr>
<td>active</td>
<td>Integer</td>
<td></td>
<td>设备激活,默认0(0.否,1.是)</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{
&quot;deviceName&quot;:&quot;agpla8&quot;,
&quot;deviceCode&quot;:&quot;a1-a2&quot;,
&quot;deviceMac&quot;:&quot;a1-a2&quot;,
&quot;siteId&quot;:1,
&quot;siteCode&quot;:&quot;510105521000-0001&quot;,
&quot;siteName&quot;:&quot;测试站点1&quot;,
&quot;productId&quot;:1,
&quot;deviceFirmId&quot;:1,
&quot;lon&quot;:&quot;12&quot;,
&quot;lati&quot;:&quot;22&quot;,
&quot;deviceInBuilding&quot;:13,
&quot;deviceInFloor&quot;:22,
&quot;defectsLiabilityPeriod&quot;:&quot;2022-06-30&quot;,
&quot;leadingOfficial&quot;:&quot;张三&quot;,
&quot;leadingOfficialTelephone&quot;:&quot;13281114856&quot;,
&quot;source&quot;:1,
&quot;active&quot;:1
}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码</td>
<td>见附录码表</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;content</td>
<td>String</td>
<td>加密后的内容</td>
<td>AES加密</td>
</tr>
</tbody>
</table>
<p><strong>content解密参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>rabbmitInfo</td>
<td>Object</td>
<td>rabbmit相关链接信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;downTopicFilter</td>
<td>String</td>
<td>下行队列topic</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;uploadTopicFilter</td>
<td>String</td>
<td>上行队列topic</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;username</td>
<td>String</td>
<td>rabbmit用户名</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;password</td>
<td>String</td>
<td>rabbmit密码</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;host</td>
<td>String</td>
<td>ip</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;port</td>
<td>String</td>
<td>端口</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;virtualHost</td>
<td>String</td>
<td>虚拟机</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;exchangeName</td>
<td>String</td>
<td>交换机名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;messageTtl</td>
<td>String</td>
<td>队列消息超时时间,毫秒</td>
<td>-</td>
</tr>
<tr>
<td>serviceInfo</td>
<td>Object</td>
<td>服务接口连接信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;homeUrl</td>
<td>String</td>
<td>首页</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;serverUrl</td>
<td>String</td>
<td>前端服务接口地址</td>
<td>-</td>
</tr>
<tr>
<td>serviceInfo</td>
<td>Object</td>
<td>服务接口连接信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;homeUrl</td>
<td>String</td>
<td>首页</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;eventUrl</td>
<td>String</td>
<td>事件地址</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;serverUrl</td>
<td>String</td>
<td>前端服务接口地址</td>
<td>-</td>
</tr>
<tr>
<td>deviceInfo</td>
<td>Object</td>
<td>设备基础信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteId</td>
<td>Long</td>
<td>站点ID</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteCode</td>
<td>String</td>
<td>站点编码</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;siteName</td>
<td>String</td>
<td>站点名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productId</td>
<td>Long</td>
<td>设备产品类型Id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productName</td>
<td>String</td>
<td>设备产品类型</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;enabled</td>
<td>Integer</td>
<td>设备启用状态 (0.停止,1.启用)</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>{
&quot;code&quot;:1,
&quot;data&quot;:{
&quot;content&quot;:&quot;hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA=&quot;
}
}
</code></pre><h3 id="-">设备版本检查</h3>
<p><strong>请求URL:</strong> m/api/checkVersion</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 检查当前设备所属版本最新版本信息</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>deviceCode</td>
<td>String</td>
<td>设备编码,唯一</td>
<td></td>
<td>可是编码或者mac地址,由平台创建</td>
</tr>
<tr>
<td>deviceVersion</td>
<td>String</td>
<td>设备版本信息</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{
&quot;deviceCode&quot;:&quot;a12345678&quot;
}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码(-1.失败,1.成功)</td>
<td>-</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;content</td>
<td>String</td>
<td>加密后的内容</td>
<td>AES加密</td>
</tr>
</tbody>
</table>
<p><strong>content解密参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>&emsp;productId</td>
<td>Long</td>
<td>产品Id</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productCode</td>
<td>String</td>
<td>产品编号</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;productName</td>
<td>String</td>
<td>产品名称</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;version</td>
<td>Int</td>
<td>版本号</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;remark</td>
<td>String</td>
<td>备注信息</td>
<td>-</td>
</tr>
<tr>
<td>&emsp;downloadUrl</td>
<td>String</td>
<td>版本下载地址</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>{
&quot;code&quot;:1,
&quot;data&quot;:{
&quot;content&quot;:&quot;hRNPu+V1hc4lGRHtXGyVOF0U7ez8/ZxFke9L4o7DWVLMfsZwkViAChfLKSydAEWAdsbgP1dzfNrQTq7X0diu1awR/qdPNcDcpj5/hBozLn+OmuTKLUWhq9+WGtuoF3BTbtIpWkpQWDGolOCfRadenGUkuMozjEwwkt5CIDa+nzOqh56BJIhGahlx79Qt30ugj3UNhLTfvw5lpN9jY7u+icx+xnCRWIAKF8spLJ0ARYAbMXXhI21dYty7e1b+Cb2wZobupPyXRmyuy8Fkn4bculmkCywq78F6tPlu0rCCgJA=&quot;
}
}
</code></pre><h2 id="-">对外平台接口服务</h2>
<h3 id="-token">获取接口访问token</h3>
<p><strong>请求URL:</strong> m/api/getToken</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 获取接口访问token</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>loginName</td>
<td>String</td>
<td>平台用户名称</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>password</td>
<td>String</td>
<td>平台用户密码</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码</td>
<td>见附录码表</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>
</code></pre><h3 id="-">接收第三方平台设备消息</h3>
<p><strong>请求URL:</strong> m/api/receive</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>鉴权头信息:</strong> Authorization: {{token}}</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> </p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">参数名称</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">备注</th>
<th style="text-align:left">必填</th>
<th style="text-align:left">其它</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">receiveMethod</td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">1:新增,2:修改,3:删除,4:激活,5:启用,6:停用</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">deviceName</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备名称</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">deviceCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备编码,如MAC地址</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">platformCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">平台系统编码</td>
<td style="text-align:left"></td>
<td style="text-align:left">见平台编码附录</td>
</tr>
<tr>
<td style="text-align:left">productCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">产品编码</td>
<td style="text-align:left"></td>
<td style="text-align:left">见产品编码附录</td>
</tr>
<tr>
<td style="text-align:left">ip</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备访问ip</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">port</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备端口</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">siteId</td>
<td style="text-align:left">Long</td>
<td style="text-align:left">站点ID,来源基础服务平台</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">leadingOfficial</td>
<td style="text-align:left">String</td>
<td style="text-align:left">负责人</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">leadingOfficialTelephone</td>
<td style="text-align:left">String</td>
<td style="text-align:left"></td>
<td style="text-align:left">联系电话</td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">siteCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">站点编号,来源基础服务平台</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">siteName</td>
<td style="text-align:left">String</td>
<td style="text-align:left">站点名称</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">homeUrl</td>
<td style="text-align:left">String</td>
<td style="text-align:left">首页地址</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">deviceRemark</td>
<td style="text-align:left">String</td>
<td style="text-align:left">备注</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">deviceStatus</td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">设备状态 (0.未激活,1.离线,2.在线)</td>
<td style="text-align:left"></td>
<td style="text-align:left">默认0为激活</td>
</tr>
<tr>
<td style="text-align:left">source</td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">(0.旧设备,1.新设备)</td>
<td style="text-align:left"></td>
<td style="text-align:left">默认1新设备</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码</td>
<td>见附录码表</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>
</code></pre><h3 id="-">接收第三方平台命令消息</h3>
<p><strong>请求URL:</strong> m/api/callback</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 以数组方式进行提交</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">参数名称</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">备注</th>
<th style="text-align:left">必填</th>
<th style="text-align:left">其它</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">deviceCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备编码,如MAC地址</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">messageType</td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息类型</td>
<td style="text-align:left"></td>
<td style="text-align:left">如HEART_BEAT</td>
</tr>
<tr>
<td style="text-align:left">timestamp</td>
<td style="text-align:left">Long</td>
<td style="text-align:left">时间戳</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">String</td>
<td style="text-align:left">数据体,内容自行定义</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>[
{
&quot;data&quot;:&quot;{xxxx}&quot;,
&quot;deviceCode&quot;:&quot;a1&quot;,
&quot;messageType&quot;:&quot;HEART_BEAT&quot;,
&quot;timestamp&quot;:1654656951795
},
{
&quot;data&quot;:&quot;{bbbbbb}&quot;,
&quot;deviceCode&quot;:&quot;a2&quot;,
&quot;messageType&quot;:&quot;HEART_BEAT&quot;,
&quot;timestamp&quot;:1654656951795
}
]
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码</td>
<td>见附录码表</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>
</code></pre><h3 id="-">回调各个平台通知消息</h3>
<p><strong>请求URL:</strong> 各平台通知地址</p>
<p><strong>请求方式:</strong> POST</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 设备消息通知各个平台,当配置了地址时候</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">参数名称</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">备注</th>
<th style="text-align:left">必填</th>
<th style="text-align:left">其它</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">type</td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">消息类型</td>
<td style="text-align:left"></td>
<td style="text-align:left">0:设备增删改查,data数据域封装具体设备消息,1:设备消息类,数据域透传设备上行消息体。</td>
</tr>
<tr>
<td style="text-align:left">msg</td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">data</td>
<td style="text-align:left">object</td>
<td style="text-align:left">数据对象</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;deviceStatus</td>
<td style="text-align:left">Integer</td>
<td style="text-align:left"></td>
<td style="text-align:left"></td>
<td style="text-align:left">状态,1:新增,2:修改,3:删除,4:激活,5:启用,6:停用,7:上线,8:下线</td>
</tr>
<tr>
<td style="text-align:left">&emsp;deviceName</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备名称</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;deviceCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备编码,如MAC地址</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;productCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">产品编码</td>
<td style="text-align:left"></td>
<td style="text-align:left">见附录</td>
</tr>
<tr>
<td style="text-align:left">&emsp;ip</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备访问ip</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;port</td>
<td style="text-align:left">String</td>
<td style="text-align:left">设备端口</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;leadingOfficial</td>
<td style="text-align:left">String</td>
<td style="text-align:left">负责人</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;leadingOfficialTelephone</td>
<td style="text-align:left">String</td>
<td style="text-align:left">联系电话</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;siteId</td>
<td style="text-align:left">Long</td>
<td style="text-align:left">站点ID,来源基础服务平台</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;siteCode</td>
<td style="text-align:left">String</td>
<td style="text-align:left">站点编号,来源基础服务平台</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;siteName</td>
<td style="text-align:left">String</td>
<td style="text-align:left">站点名称</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
<tr>
<td style="text-align:left">&emsp;deviceRemark</td>
<td style="text-align:left">String</td>
<td style="text-align:left">备注</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{}
</code></pre><p><strong>响应参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>参数类型</th>
<th>备注</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>Integer</td>
<td>结果码</td>
<td>见附录码表</td>
</tr>
<tr>
<td>msg</td>
<td>String</td>
<td>消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>响应消息样例:</strong></p>
<pre><code>
</code></pre><h2 id="-">设备消息</h2>
<h3 id="-">上行消息</h3>
<p><strong>topic:</strong> uploadTopicFilter</p>
<p><strong>请求方式:</strong> rabbmitMQ</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 上行消息存放队列</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>headers</td>
<td>Object</td>
<td>消息头</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;data</td>
<td>Object</td>
<td>消息头数据对象</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;protocol</td>
<td>String</td>
<td>数据域协议类型,默认json</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;messageType</td>
<td>String</td>
<td>上报消息类型</td>
<td></td>
<td>HEART_BEAT</td>
</tr>
<tr>
<td>&emsp;&emsp;deviceCode</td>
<td>String</td>
<td>设备编码信息</td>
<td></td>
<td>如:mac地址</td>
</tr>
<tr>
<td>&emsp;&emsp;sign</td>
<td>String</td>
<td>签名</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;timestamp</td>
<td>String</td>
<td>时间戳</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>byte[]</td>
<td>byte数组,base64编码</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>key</td>
<td>String</td>
<td>消息唯一标识</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{
&quot;data&quot;:&quot;YWJjZDEyMzQ=&quot;,
&quot;headers&quot;:{
&quot;data&quot;:{
&quot;protocol&quot;:&quot;json&quot;,
&quot;messageType&quot;:&quot;HEART_BEAT&quot;,
&quot;deviceCode&quot;:&quot;A1:A2:A3:A4:A5:A6&quot;,
&quot;sign&quot;:&quot;abcd1234&quot;,
&quot;timestamp&quot;:&quot;2022-04-15 09:48:05&quot;
}
},
&quot;key&quot;:&quot;d3635cd0597d46c88b85797c3846b04f&quot;
}
</code></pre><h3 id="-">下行消息</h3>
<p><strong>topic:</strong> downTopicFilter</p>
<p><strong>请求方式:</strong> rabbmitMQ</p>
<p><strong>内容类型:</strong> application/json;charset=utf-8</p>
<p><strong>简要描述:</strong> 下行消息存放队列</p>
<p><strong>请求参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>备注</th>
<th>必填</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>headers</td>
<td>Object</td>
<td>消息头</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;data</td>
<td>Object</td>
<td>消息头数据对象</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;protocol</td>
<td>String</td>
<td>数据域协议类型,默认json</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;messageType</td>
<td>String</td>
<td>下发消息类型</td>
<td></td>
<td>UPGREAD</td>
</tr>
<tr>
<td>&emsp;&emsp;deviceCode</td>
<td>String</td>
<td>设备编码信息</td>
<td></td>
<td>如:mac地址</td>
</tr>
<tr>
<td>&emsp;&emsp;sign</td>
<td>String</td>
<td>签名</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>&emsp;&emsp;timestamp</td>
<td>String</td>
<td>时间戳</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>byte[]</td>
<td>byte数组,base64编码</td>
<td></td>
<td>-</td>
</tr>
<tr>
<td>key</td>
<td>String</td>
<td>消息唯一标识</td>
<td></td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>请求样例:</strong></p>
<pre><code>{
&quot;data&quot;:&quot;YWJjZDEyMzQ=&quot;,
&quot;headers&quot;:{
&quot;data&quot;:{
&quot;protocol&quot;:&quot;json&quot;,
&quot;messageType&quot;:&quot;UPGREAD&quot;,
&quot;deviceCode&quot;:&quot;A1:A2:A3:A4:A5:A6&quot;,
&quot;sign&quot;:&quot;abcd1234&quot;,
&quot;downloadUrl&quot;:&quot;http://xxxxx&quot;,
&quot;timestamp&quot;:&quot;2022-04-15 09:48:05&quot;
}
},
&quot;key&quot;:&quot;d3635cd0597d46c88b85797c3846b04f&quot;
}
</code></pre><h2 id="-">码表</h2>
<h3 id="-">响应结果码表</h3>
<table>
<thead>
<tr>
<th>结果码</th>
<th>结果</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>成功</td>
<td>-</td>
</tr>
<tr>
<td>1001</td>
<td>当前设备编码不存在</td>
<td>-</td>
</tr>
<tr>
<td>1002</td>
<td>当前设备编码已存在</td>
<td>-</td>
</tr>
<tr>
<td>1003</td>
<td>所属产品编码不存在</td>
<td>-</td>
</tr>
<tr>
<td>1004</td>
<td>当前设备未激活,请在后台配置后再激活</td>
<td>-</td>
</tr>
<tr>
<td>1005</td>
<td>所属平台不存在!请在后台添加后再激活</td>
<td>-</td>
</tr>
<tr>
<td>1006</td>
<td>当前设备所属产品平台未配置,请在后台配置后再激活</td>
<td>-</td>
</tr>
<tr>
<td>1007</td>
<td>站点ID为空</td>
<td>-</td>
</tr>
<tr>
<td>1008</td>
<td>设备已创建,请完善设备配置信息</td>
<td>-</td>
</tr>
<tr>
<td>1009</td>
<td>当前设备不存在</td>
<td>-</td>
</tr>
<tr>
<td>1010</td>
<td>token认证失败</td>
<td>-</td>
</tr>
<tr>
<td>1011</td>
<td>未找到设备版本信息</td>
<td>-</td>
</tr>
<tr>
<td>-1</td>
<td>系统内部异常</td>
<td>-</td>
</tr>
</tbody>
</table>
<h2 id="-">附录</h2>
<h3 id="-">业务上行下行消息类型</h3>
<table>
<thead>
<tr>
<th>编码</th>
<th>说明</th>
<th>其它</th>
</tr>
</thead>
<tbody>
<tr>
<td>HEART_BEAT</td>
<td>设备心跳消息</td>
<td>设备上行发送</td>
</tr>
</tbody>
</table>
</article>
</div>
</div>
</body>
</html>
<script type="text/javascript" src="toc/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="toc/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="toc/js/ztree_toc.js"></script>
<script type="text/javascript" src="toc_conf.js"></script>
<SCRIPT type="text/javascript" >
<!--
$(document).ready(function(){
var css_conf = eval(markdown_panel_style);
$('#readme').css(css_conf)
var conf = eval(jquery_ztree_toc_opts);
$('#tree').ztree_toc(conf);
});
//-->
</SCRIPT>
\ No newline at end of file
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
h1 {font-size: 24px;line-height: 34px;text-align: center;}
h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
a {color:#3C6E31;text-decoration: underline;}
a:hover {background-color:#3C6E31;color:white;}
input.radio {margin: 0 2px 0 8px;}
input.radio.first {margin-left:0;}
input.empty {color: lightgray;}
code {color: #2f332a;}
.highlight_red {color:#A60000;}
.highlight_green {color:#A7F43D;}
li {list-style: circle;font-size: 12px;}
li.title {list-style: none;}
ul.list {margin-left: 17px;}
div.content_wrap {width: 600px;height:380px;}
div.content_wrap div.left{float: left;width: 250px;}
div.content_wrap div.right{float: right;width: 340px;}
div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
ul.log.small {height:45px;}
ul.log li {color: #666666;list-style: none;padding-left: 10px;}
ul.log li.dark {background-color: #E3E3E3;}
/* ruler */
div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
\ No newline at end of file
/*-------------------------------------
zTree Style
version: 3.4
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
.ztree {margin:0; padding:5px; color:#333}
.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
.ztree li ul{ margin:0; padding:0 0 0 18px}
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
text-decoration:none; vertical-align:top; display: inline-block}
.ztree li a:hover {text-decoration:underline}
.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
font-size:12px; border:1px #7EC4CC solid; *border:0px}
.ztree li span {line-height:16px; margin-right:2px}
.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
border:0 none; cursor: pointer;outline:none;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
.ztree li span.button.switch {width:18px; height:18px}
.ztree li span.button.root_open{background-position:-92px -54px}
.ztree li span.button.root_close{background-position:-74px -54px}
.ztree li span.button.roots_open{background-position:-92px 0}
.ztree li span.button.roots_close{background-position:-74px 0}
.ztree li span.button.center_open{background-position:-92px -18px}
.ztree li span.button.center_close{background-position:-74px -18px}
.ztree li span.button.bottom_open{background-position:-92px -36px}
.ztree li span.button.bottom_close{background-position:-74px -36px}
.ztree li span.button.noline_open{background-position:-92px -72px}
.ztree li span.button.noline_close{background-position:-74px -72px}
.ztree li span.button.root_docu{ background:none;}
.ztree li span.button.roots_docu{background-position:-56px 0}
.ztree li span.button.center_docu{background-position:-56px -18px}
.ztree li span.button.bottom_docu{background-position:-56px -36px}
.ztree li span.button.noline_docu{ background:none;}
.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
\ No newline at end of file
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Thu Nov 11 19:04:53 2010 -0500
*/
(function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
"`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
"margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
-1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
!F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
[];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
"none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
"click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
"form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
"file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
"object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
(function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
[y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
"")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
"first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
"object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
!T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
[b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
"inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
"marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
/*
* JQuery zTree core 3.5.02
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2013-01-28
*/
(function(k){var F,G,H,I,J,K,r={},L={},t={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[],otherParam:[],
dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},u=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated,[a,c,g])});
a.bind(c.CLICK,function(a,c,g,l,h){j.apply(b.callback.onClick,[c,g,l,h])});a.bind(c.EXPAND,function(a,c,g){j.apply(b.callback.onExpand,[a,c,g])});a.bind(c.COLLAPSE,function(a,c,g){j.apply(b.callback.onCollapse,[a,c,g])});a.bind(c.ASYNC_SUCCESS,function(a,c,g,l){j.apply(b.callback.onAsyncSuccess,[a,c,g,l])});a.bind(c.ASYNC_ERROR,function(a,c,g,l,h,e){j.apply(b.callback.onAsyncError,[a,c,g,l,h,e])})}],v=[function(b){var a=e.event;b.treeObj.unbind(a.NODECREATED).unbind(a.CLICK).unbind(a.EXPAND).unbind(a.COLLAPSE).unbind(a.ASYNC_SUCCESS).unbind(a.ASYNC_ERROR)}],
w=[function(b){var a=h.getCache(b);a||(a={},h.setCache(b,a));a.nodes=[];a.doms=[]}],x=[function(b,a,c,d,f,g){if(c){var l=h.getRoot(b),e=b.data.key.children;c.level=a;c.tId=b.treeId+"_"+ ++l.zId;c.parentTId=d?d.tId:null;if(c[e]&&c[e].length>0){if(typeof c.open=="string")c.open=j.eqs(c.open,"true");c.open=!!c.open;c.isParent=!0;c.zAsync=!0}else{c.open=!1;if(typeof c.isParent=="string")c.isParent=j.eqs(c.isParent,"true");c.isParent=!!c.isParent;c.zAsync=!c.isParent}c.isFirstNode=f;c.isLastNode=g;c.getParentNode=
function(){return h.getNodeCache(b,c.parentTId)};c.getPreNode=function(){return h.getPreNode(b,c)};c.getNextNode=function(){return h.getNextNode(b,c)};c.isAjaxing=!1;h.fixPIdKeyValue(b,c)}}],y=[function(b){var a=b.target,c=h.getSetting(b.data.treeId),d="",f=null,g="",l="",i=null,n=null,p=null;if(j.eqs(b.type,"mousedown"))l="mousedown";else if(j.eqs(b.type,"mouseup"))l="mouseup";else if(j.eqs(b.type,"contextmenu"))l="contextmenu";else if(j.eqs(b.type,"click"))if(j.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+
e.id.SWITCH)!==null)d=(k(a).parent("li").get(0)||k(a).parentsUntil("li").parent().get(0)).id,g="switchNode";else{if(p=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}]))d=(k(p).parent("li").get(0)||k(p).parentsUntil("li").parent().get(0)).id,g="clickNode"}else if(j.eqs(b.type,"dblclick")&&(l="dblclick",p=j.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=(k(p).parent("li").get(0)||k(p).parentsUntil("li").parent().get(0)).id,g="switchNode";if(l.length>0&&d.length==0&&(p=j.getMDom(c,
a,[{tagName:"a",attrName:"treeNode"+e.id.A}])))d=(k(p).parent("li").get(0)||k(p).parentsUntil("li").parent().get(0)).id;if(d.length>0)switch(f=h.getNodeCache(c,d),g){case "switchNode":f.isParent?j.eqs(b.type,"click")||j.eqs(b.type,"dblclick")&&j.apply(c.view.dblClickExpand,[c.treeId,f],c.view.dblClickExpand)?i=F:g="":g="";break;case "clickNode":i=G}switch(l){case "mousedown":n=H;break;case "mouseup":n=I;break;case "dblclick":n=J;break;case "contextmenu":n=K}return{stop:!1,node:f,nodeEventType:g,nodeEventCallback:i,
treeEventType:l,treeEventCallback:n}}],z=[function(b){var a=h.getRoot(b);a||(a={},h.setRoot(b,a));a[b.data.key.children]=[];a.expandTriggerFlag=!1;a.curSelectedList=[];a.noSelection=!0;a.createdNodes=[];a.zId=0;a._ver=(new Date).getTime()}],A=[],B=[],C=[],D=[],E=[],h={addNodeCache:function(b,a){h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=a},getNodeCacheId:function(b){return b.substring(b.lastIndexOf("_")+1)},addAfterA:function(b){B.push(b)},addBeforeA:function(b){A.push(b)},addInnerAfterA:function(b){D.push(b)},
addInnerBeforeA:function(b){C.push(b)},addInitBind:function(b){u.push(b)},addInitUnBind:function(b){v.push(b)},addInitCache:function(b){w.push(b)},addInitNode:function(b){x.push(b)},addInitProxy:function(b){y.push(b)},addInitRoot:function(b){z.push(b)},addNodesData:function(b,a,c){var d=b.data.key.children;a[d]||(a[d]=[]);if(a[d].length>0)a[d][a[d].length-1].isLastNode=!1,i.setNodeLineIcos(b,a[d][a[d].length-1]);a.isParent=!0;a[d]=a[d].concat(c)},addSelectedNode:function(b,a){var c=h.getRoot(b);h.isSelectedNode(b,
a)||c.curSelectedList.push(a)},addCreatedNode:function(b,a){(b.callback.onNodeCreated||b.view.addDiyDom)&&h.getRoot(b).createdNodes.push(a)},addZTreeTools:function(b){E.push(b)},exSetting:function(b){k.extend(!0,M,b)},fixPIdKeyValue:function(b,a){b.data.simpleData.enable&&(a[b.data.simpleData.pIdKey]=a.parentTId?a.getParentNode()[b.data.simpleData.idKey]:b.data.simpleData.rootPId)},getAfterA:function(b,a,c){for(var d=0,f=B.length;d<f;d++)B[d].apply(this,arguments)},getBeforeA:function(b,a,c){for(var d=
0,f=A.length;d<f;d++)A[d].apply(this,arguments)},getInnerAfterA:function(b,a,c){for(var d=0,f=D.length;d<f;d++)D[d].apply(this,arguments)},getInnerBeforeA:function(b,a,c){for(var d=0,f=C.length;d<f;d++)C[d].apply(this,arguments)},getCache:function(b){return t[b.treeId]},getNextNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length-1;f<=g;f++)if(d[c][f]===a)return f==g?null:d[c][f+1];return null},getNodeByParam:function(b,a,
c,d){if(!a||!c)return null;for(var f=b.data.key.children,g=0,l=a.length;g<l;g++){if(a[g][c]==d)return a[g];var e=h.getNodeByParam(b,a[g][f],c,d);if(e)return e}return null},getNodeCache:function(b,a){if(!a)return null;var c=t[b.treeId].nodes[h.getNodeCacheId(a)];return c?c:null},getNodeName:function(b,a){return""+a[b.data.key.name]},getNodeTitle:function(b,a){return""+a[b.data.key.title===""?b.data.key.name:b.data.key.title]},getNodes:function(b){return h.getRoot(b)[b.data.key.children]},getNodesByParam:function(b,
a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)a[l][c]==d&&g.push(a[l]),g=g.concat(h.getNodesByParam(b,a[l][f],c,d));return g},getNodesByParamFuzzy:function(b,a,c,d){if(!a||!c)return[];for(var f=b.data.key.children,g=[],l=0,e=a.length;l<e;l++)typeof a[l][c]=="string"&&a[l][c].indexOf(d)>-1&&g.push(a[l]),g=g.concat(h.getNodesByParamFuzzy(b,a[l][f],c,d));return g},getNodesByFilter:function(b,a,c,d,f){if(!a)return d?null:[];for(var g=b.data.key.children,l=d?null:
[],e=0,i=a.length;e<i;e++){if(j.apply(c,[a[e],f],!1)){if(d)return a[e];l.push(a[e])}var k=h.getNodesByFilter(b,a[e][g],c,d,f);if(d&&k)return k;l=d?k:l.concat(k)}return l},getPreNode:function(b,a){if(!a)return null;for(var c=b.data.key.children,d=a.parentTId?a.getParentNode():h.getRoot(b),f=0,g=d[c].length;f<g;f++)if(d[c][f]===a)return f==0?null:d[c][f-1];return null},getRoot:function(b){return b?L[b.treeId]:null},getSetting:function(b){return r[b]},getSettings:function(){return r},getZTreeTools:function(b){return(b=
this.getRoot(this.getSetting(b)))?b.treeTools:null},initCache:function(b){for(var a=0,c=w.length;a<c;a++)w[a].apply(this,arguments)},initNode:function(b,a,c,d,f,g){for(var l=0,e=x.length;l<e;l++)x[l].apply(this,arguments)},initRoot:function(b){for(var a=0,c=z.length;a<c;a++)z[a].apply(this,arguments)},isSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d])return!0;return!1},removeNodeCache:function(b,a){var c=b.data.key.children;if(a[c])for(var d=
0,f=a[c].length;d<f;d++)arguments.callee(b,a[c][d]);h.getCache(b).nodes[h.getNodeCacheId(a.tId)]=null},removeSelectedNode:function(b,a){for(var c=h.getRoot(b),d=0,f=c.curSelectedList.length;d<f;d++)if(a===c.curSelectedList[d]||!h.getNodeCache(b,c.curSelectedList[d].tId))c.curSelectedList.splice(d,1),d--,f--},setCache:function(b,a){t[b.treeId]=a},setRoot:function(b,a){L[b.treeId]=a},setZTreeTools:function(b,a){for(var c=0,d=E.length;c<d;c++)E[c].apply(this,arguments)},transformToArrayFormat:function(b,
a){if(!a)return[];var c=b.data.key.children,d=[];if(j.isArray(a))for(var f=0,g=a.length;f<g;f++)d.push(a[f]),a[f][c]&&(d=d.concat(h.transformToArrayFormat(b,a[f][c])));else d.push(a),a[c]&&(d=d.concat(h.transformToArrayFormat(b,a[c])));return d},transformTozTreeFormat:function(b,a){var c,d,f=b.data.simpleData.idKey,g=b.data.simpleData.pIdKey,e=b.data.key.children;if(!f||f==""||!a)return[];if(j.isArray(a)){var h=[],i=[];for(c=0,d=a.length;c<d;c++)i[a[c][f]]=a[c];for(c=0,d=a.length;c<d;c++)i[a[c][g]]&&
a[c][f]!=a[c][g]?(i[a[c][g]][e]||(i[a[c][g]][e]=[]),i[a[c][g]][e].push(a[c])):h.push(a[c]);return h}else return[a]}},m={bindEvent:function(b){for(var a=0,c=u.length;a<c;a++)u[a].apply(this,arguments)},unbindEvent:function(b){for(var a=0,c=v.length;a<c;a++)v[a].apply(this,arguments)},bindTree:function(b){var a={treeId:b.treeId},b=b.treeObj;b.bind("selectstart",function(a){a=a.srcElement.nodeName.toLowerCase();return a==="input"||a==="textarea"}).css({"-moz-user-select":"-moz-none"});b.bind("click",
a,m.proxy);b.bind("dblclick",a,m.proxy);b.bind("mouseover",a,m.proxy);b.bind("mouseout",a,m.proxy);b.bind("mousedown",a,m.proxy);b.bind("mouseup",a,m.proxy);b.bind("contextmenu",a,m.proxy)},unbindTree:function(b){b.treeObj.unbind("click",m.proxy).unbind("dblclick",m.proxy).unbind("mouseover",m.proxy).unbind("mouseout",m.proxy).unbind("mousedown",m.proxy).unbind("mouseup",m.proxy).unbind("contextmenu",m.proxy)},doProxy:function(b){for(var a=[],c=0,d=y.length;c<d;c++){var f=y[c].apply(this,arguments);
a.push(f);if(f.stop)break}return a},proxy:function(b){var a=h.getSetting(b.data.treeId);if(!j.uCanDo(a,b))return!0;for(var a=m.doProxy(b),c=!0,d=0,f=a.length;d<f;d++){var g=a[d];g.nodeEventCallback&&(c=g.nodeEventCallback.apply(g,[b,g.node])&&c);g.treeEventCallback&&(c=g.treeEventCallback.apply(g,[b,g.node])&&c)}return c}};F=function(b,a){var c=h.getSetting(b.data.treeId);if(a.open){if(j.apply(c.callback.beforeCollapse,[c.treeId,a],!0)==!1)return!0}else if(j.apply(c.callback.beforeExpand,[c.treeId,
a],!0)==!1)return!0;h.getRoot(c).expandTriggerFlag=!0;i.switchNode(c,a);return!0};G=function(b,a){var c=h.getSetting(b.data.treeId),d=c.view.autoCancelSelected&&b.ctrlKey&&h.isSelectedNode(c,a)?0:c.view.autoCancelSelected&&b.ctrlKey&&c.view.selectedMulti?2:1;if(j.apply(c.callback.beforeClick,[c.treeId,a,d],!0)==!1)return!0;d===0?i.cancelPreSelectedNode(c,a):i.selectNode(c,a,d===2);c.treeObj.trigger(e.event.CLICK,[b,c.treeId,a,d]);return!0};H=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseDown,
[c.treeId,a],!0)&&j.apply(c.callback.onMouseDown,[b,c.treeId,a]);return!0};I=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeMouseUp,[c.treeId,a],!0)&&j.apply(c.callback.onMouseUp,[b,c.treeId,a]);return!0};J=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeDblClick,[c.treeId,a],!0)&&j.apply(c.callback.onDblClick,[b,c.treeId,a]);return!0};K=function(b,a){var c=h.getSetting(b.data.treeId);j.apply(c.callback.beforeRightClick,[c.treeId,a],!0)&&j.apply(c.callback.onRightClick,
[b,c.treeId,a]);return typeof c.callback.onRightClick!="function"};var j={apply:function(b,a,c){return typeof b=="function"?b.apply(N,a?a:[]):c},canAsync:function(b,a){var c=b.data.key.children;return b.async.enable&&a&&a.isParent&&!(a.zAsync||a[c]&&a[c].length>0)},clone:function(b){if(b===null)return null;var a=b.constructor===Array?[]:{},c;for(c in b)a[c]=b[c]instanceof Date?new Date(b[c].getTime()):typeof b[c]==="object"?arguments.callee(b[c]):b[c];return a},eqs:function(b,a){return b.toLowerCase()===
a.toLowerCase()},isArray:function(b){return Object.prototype.toString.apply(b)==="[object Array]"},getMDom:function(b,a,c){if(!a)return null;for(;a&&a.id!==b.treeId;){for(var d=0,f=c.length;a.tagName&&d<f;d++)if(j.eqs(a.tagName,c[d].tagName)&&a.getAttribute(c[d].attrName)!==null)return a;a=a.parentNode}return null},uCanDo:function(){return!0}},i={addNodes:function(b,a,c,d){if(!b.data.keep.leaf||!a||a.isParent)if(j.isArray(c)||(c=[c]),b.data.simpleData.enable&&(c=h.transformTozTreeFormat(b,c)),a){var f=
k("#"+a.tId+e.id.SWITCH),g=k("#"+a.tId+e.id.ICON),l=k("#"+a.tId+e.id.UL);if(!a.open)i.replaceSwitchClass(a,f,e.folder.CLOSE),i.replaceIcoClass(a,g,e.folder.CLOSE),a.open=!1,l.css({display:"none"});h.addNodesData(b,a,c);i.createNodes(b,a.level+1,c,a);d||i.expandCollapseParentNode(b,a,!0)}else h.addNodesData(b,h.getRoot(b),c),i.createNodes(b,0,c,null)},appendNodes:function(b,a,c,d,f,g){if(!c)return[];for(var e=[],j=b.data.key.children,k=0,m=c.length;k<m;k++){var o=c[k];if(f){var s=(d?d:h.getRoot(b))[j].length==
c.length&&k==0;h.initNode(b,a,o,d,s,k==c.length-1,g);h.addNodeCache(b,o)}s=[];o[j]&&o[j].length>0&&(s=i.appendNodes(b,a+1,o[j],o,f,g&&o.open));g&&(i.makeDOMNodeMainBefore(e,b,o),i.makeDOMNodeLine(e,b,o),h.getBeforeA(b,o,e),i.makeDOMNodeNameBefore(e,b,o),h.getInnerBeforeA(b,o,e),i.makeDOMNodeIcon(e,b,o),h.getInnerAfterA(b,o,e),i.makeDOMNodeNameAfter(e,b,o),h.getAfterA(b,o,e),o.isParent&&o.open&&i.makeUlHtml(b,o,e,s.join("")),i.makeDOMNodeMainAfter(e,b,o),h.addCreatedNode(b,o))}return e},appendParentULDom:function(b,
a){var c=[],d=k("#"+a.tId),f=k("#"+a.tId+e.id.UL),g=i.appendNodes(b,a.level+1,a[b.data.key.children],a,!1,!0);i.makeUlHtml(b,a,c,g.join(""));!d.get(0)&&a.parentTId&&(i.appendParentULDom(b,a.getParentNode()),d=k("#"+a.tId));f.get(0)&&f.remove();d.append(c.join(""))},asyncNode:function(b,a,c,d){var f,g;if(a&&!a.isParent)return j.apply(d),!1;else if(a&&a.isAjaxing)return!1;else if(j.apply(b.callback.beforeAsync,[b.treeId,a],!0)==!1)return j.apply(d),!1;if(a)a.isAjaxing=!0,k("#"+a.tId+e.id.ICON).attr({style:"",
"class":"button ico_loading"});var l={};for(f=0,g=b.async.autoParam.length;a&&f<g;f++){var q=b.async.autoParam[f].split("="),n=q;q.length>1&&(n=q[1],q=q[0]);l[n]=a[q]}if(j.isArray(b.async.otherParam))for(f=0,g=b.async.otherParam.length;f<g;f+=2)l[b.async.otherParam[f]]=b.async.otherParam[f+1];else for(var m in b.async.otherParam)l[m]=b.async.otherParam[m];var o=h.getRoot(b)._ver;k.ajax({contentType:b.async.contentType,type:b.async.type,url:j.apply(b.async.url,[b.treeId,a],b.async.url),data:l,dataType:b.async.dataType,
success:function(f){if(o==h.getRoot(b)._ver){var g=[];try{g=!f||f.length==0?[]:typeof f=="string"?eval("("+f+")"):f}catch(l){g=f}if(a)a.isAjaxing=null,a.zAsync=!0;i.setNodeLineIcos(b,a);g&&g!==""?(g=j.apply(b.async.dataFilter,[b.treeId,a,g],g),i.addNodes(b,a,g?j.clone(g):[],!!c)):i.addNodes(b,a,[],!!c);b.treeObj.trigger(e.event.ASYNC_SUCCESS,[b.treeId,a,f]);j.apply(d)}},error:function(c,d,f){if(o==h.getRoot(b)._ver){if(a)a.isAjaxing=null;i.setNodeLineIcos(b,a);b.treeObj.trigger(e.event.ASYNC_ERROR,
[b.treeId,a,c,d,f])}}});return!0},cancelPreSelectedNode:function(b,a){for(var c=h.getRoot(b).curSelectedList,d=c.length-1;d>=0;d--)if(!a||a===c[d])if(k("#"+c[d].tId+e.id.A).removeClass(e.node.CURSELECTED),a){h.removeSelectedNode(b,a);break}if(!a)h.getRoot(b).curSelectedList=[]},createNodeCallback:function(b){if(b.callback.onNodeCreated||b.view.addDiyDom)for(var a=h.getRoot(b);a.createdNodes.length>0;){var c=a.createdNodes.shift();j.apply(b.view.addDiyDom,[b.treeId,c]);b.callback.onNodeCreated&&b.treeObj.trigger(e.event.NODECREATED,
[b.treeId,c])}},createNodes:function(b,a,c,d){if(c&&c.length!=0){var f=h.getRoot(b),g=b.data.key.children,g=!d||d.open||!!k("#"+d[g][0].tId).get(0);f.createdNodes=[];a=i.appendNodes(b,a,c,d,!0,g);d?(d=k("#"+d.tId+e.id.UL),d.get(0)&&d.append(a.join(""))):b.treeObj.append(a.join(""));i.createNodeCallback(b)}},destroy:function(b){b&&(h.initCache(b),h.initRoot(b),m.unbindTree(b),m.unbindEvent(b),b.treeObj.empty())},expandCollapseNode:function(b,a,c,d,f){var g=h.getRoot(b),l=b.data.key.children;if(a){if(g.expandTriggerFlag){var q=
f,f=function(){q&&q();a.open?b.treeObj.trigger(e.event.EXPAND,[b.treeId,a]):b.treeObj.trigger(e.event.COLLAPSE,[b.treeId,a])};g.expandTriggerFlag=!1}if(!a.open&&a.isParent&&(!k("#"+a.tId+e.id.UL).get(0)||a[l]&&a[l].length>0&&!k("#"+a[l][0].tId).get(0)))i.appendParentULDom(b,a),i.createNodeCallback(b);if(a.open==c)j.apply(f,[]);else{var c=k("#"+a.tId+e.id.UL),g=k("#"+a.tId+e.id.SWITCH),n=k("#"+a.tId+e.id.ICON);a.isParent?(a.open=!a.open,a.iconOpen&&a.iconClose&&n.attr("style",i.makeNodeIcoStyle(b,
a)),a.open?(i.replaceSwitchClass(a,g,e.folder.OPEN),i.replaceIcoClass(a,n,e.folder.OPEN),d==!1||b.view.expandSpeed==""?(c.show(),j.apply(f,[])):a[l]&&a[l].length>0?c.slideDown(b.view.expandSpeed,f):(c.show(),j.apply(f,[]))):(i.replaceSwitchClass(a,g,e.folder.CLOSE),i.replaceIcoClass(a,n,e.folder.CLOSE),d==!1||b.view.expandSpeed==""||!(a[l]&&a[l].length>0)?(c.hide(),j.apply(f,[])):c.slideUp(b.view.expandSpeed,f))):j.apply(f,[])}}else j.apply(f,[])},expandCollapseParentNode:function(b,a,c,d,f){a&&(a.parentTId?
(i.expandCollapseNode(b,a,c,d),a.parentTId&&i.expandCollapseParentNode(b,a.getParentNode(),c,d,f)):i.expandCollapseNode(b,a,c,d,f))},expandCollapseSonNode:function(b,a,c,d,f){var g=h.getRoot(b),e=b.data.key.children,g=a?a[e]:g[e],e=a?!1:d,j=h.getRoot(b).expandTriggerFlag;h.getRoot(b).expandTriggerFlag=!1;if(g)for(var k=0,m=g.length;k<m;k++)g[k]&&i.expandCollapseSonNode(b,g[k],c,e);h.getRoot(b).expandTriggerFlag=j;i.expandCollapseNode(b,a,c,d,f)},makeDOMNodeIcon:function(b,a,c){var d=h.getNodeName(a,
c),d=a.view.nameIsHTML?d:d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");b.push("<span id='",c.tId,e.id.ICON,"' title='' treeNode",e.id.ICON," class='",i.makeNodeIcoClass(a,c),"' style='",i.makeNodeIcoStyle(a,c),"'></span><span id='",c.tId,e.id.SPAN,"'>",d,"</span>")},makeDOMNodeLine:function(b,a,c){b.push("<span id='",c.tId,e.id.SWITCH,"' title='' class='",i.makeNodeLineClass(a,c),"' treeNode",e.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(b){b.push("</li>")},makeDOMNodeMainBefore:function(b,
a,c){b.push("<li id='",c.tId,"' class='level",c.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(b){b.push("</a>")},makeDOMNodeNameBefore:function(b,a,c){var d=h.getNodeTitle(a,c),f=i.makeNodeUrl(a,c),g=i.makeNodeFontCss(a,c),l=[],k;for(k in g)l.push(k,":",g[k],";");b.push("<a id='",c.tId,e.id.A,"' class='level",c.level,"' treeNode",e.id.A,' onclick="',c.click||"",'" ',f!=null&&f.length>0?"href='"+f+"'":""," target='",i.makeNodeTarget(c),"' style='",l.join(""),"'");
j.apply(a.view.showTitle,[a.treeId,c],a.view.showTitle)&&d&&b.push("title='",d.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'");b.push(">")},makeNodeFontCss:function(b,a){var c=j.apply(b.view.fontCss,[b.treeId,a],b.view.fontCss);return c&&typeof c!="function"?c:{}},makeNodeIcoClass:function(b,a){var c=["ico"];a.isAjaxing||(c[0]=(a.iconSkin?a.iconSkin+"_":"")+c[0],a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU));return"button "+c.join("_")},makeNodeIcoStyle:function(b,
a){var c=[];if(!a.isAjaxing){var d=a.isParent&&a.iconOpen&&a.iconClose?a.open?a.iconOpen:a.iconClose:a.icon;d&&c.push("background:url(",d,") 0 0 no-repeat;");(b.view.showIcon==!1||!j.apply(b.view.showIcon,[b.treeId,a],!0))&&c.push("width:0px;height:0px;")}return c.join("")},makeNodeLineClass:function(b,a){var c=[];b.view.showLine?a.level==0&&a.isFirstNode&&a.isLastNode?c.push(e.line.ROOT):a.level==0&&a.isFirstNode?c.push(e.line.ROOTS):a.isLastNode?c.push(e.line.BOTTOM):c.push(e.line.CENTER):c.push(e.line.NOLINE);
a.isParent?c.push(a.open?e.folder.OPEN:e.folder.CLOSE):c.push(e.folder.DOCU);return i.makeNodeLineClassEx(a)+c.join("_")},makeNodeLineClassEx:function(b){return"button level"+b.level+" switch "},makeNodeTarget:function(b){return b.target||"_blank"},makeNodeUrl:function(b,a){var c=b.data.key.url;return a[c]?a[c]:null},makeUlHtml:function(b,a,c,d){c.push("<ul id='",a.tId,e.id.UL,"' class='level",a.level," ",i.makeUlLineClass(b,a),"' style='display:",a.open?"block":"none","'>");c.push(d);c.push("</ul>")},
makeUlLineClass:function(b,a){return b.view.showLine&&!a.isLastNode?e.line.LINE:""},removeChildNodes:function(b,a){if(a){var c=b.data.key.children,d=a[c];if(d){for(var f=0,g=d.length;f<g;f++)h.removeNodeCache(b,d[f]);h.removeSelectedNode(b);delete a[c];b.data.keep.parent?k("#"+a.tId+e.id.UL).empty():(a.isParent=!1,a.open=!1,c=k("#"+a.tId+e.id.SWITCH),d=k("#"+a.tId+e.id.ICON),i.replaceSwitchClass(a,c,e.folder.DOCU),i.replaceIcoClass(a,d,e.folder.DOCU),k("#"+a.tId+e.id.UL).remove())}}},setFirstNode:function(b,
a){var c=b.data.key.children;if(a[c].length>0)a[c][0].isFirstNode=!0},setLastNode:function(b,a){var c=b.data.key.children,d=a[c].length;if(d>0)a[c][d-1].isLastNode=!0},removeNode:function(b,a){var c=h.getRoot(b),d=b.data.key.children,f=a.parentTId?a.getParentNode():c;a.isFirstNode=!1;a.isLastNode=!1;a.getPreNode=function(){return null};a.getNextNode=function(){return null};if(h.getNodeCache(b,a.tId)){k("#"+a.tId).remove();h.removeNodeCache(b,a);h.removeSelectedNode(b,a);for(var g=0,l=f[d].length;g<
l;g++)if(f[d][g].tId==a.tId){f[d].splice(g,1);break}i.setFirstNode(b,f);i.setLastNode(b,f);var j,g=f[d].length;if(!b.data.keep.parent&&g==0)f.isParent=!1,f.open=!1,g=k("#"+f.tId+e.id.UL),l=k("#"+f.tId+e.id.SWITCH),j=k("#"+f.tId+e.id.ICON),i.replaceSwitchClass(f,l,e.folder.DOCU),i.replaceIcoClass(f,j,e.folder.DOCU),g.css("display","none");else if(b.view.showLine&&g>0){var n=f[d][g-1],g=k("#"+n.tId+e.id.UL),l=k("#"+n.tId+e.id.SWITCH);j=k("#"+n.tId+e.id.ICON);f==c?f[d].length==1?i.replaceSwitchClass(n,
l,e.line.ROOT):(c=k("#"+f[d][0].tId+e.id.SWITCH),i.replaceSwitchClass(f[d][0],c,e.line.ROOTS),i.replaceSwitchClass(n,l,e.line.BOTTOM)):i.replaceSwitchClass(n,l,e.line.BOTTOM);g.removeClass(e.line.LINE)}}},replaceIcoClass:function(b,a,c){if(a&&!b.isAjaxing&&(b=a.attr("class"),b!=void 0)){b=b.split("_");switch(c){case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:b[b.length-1]=c}a.attr("class",b.join("_"))}},replaceSwitchClass:function(b,a,c){if(a){var d=a.attr("class");if(d!=void 0){d=d.split("_");
switch(c){case e.line.ROOT:case e.line.ROOTS:case e.line.CENTER:case e.line.BOTTOM:case e.line.NOLINE:d[0]=i.makeNodeLineClassEx(b)+c;break;case e.folder.OPEN:case e.folder.CLOSE:case e.folder.DOCU:d[1]=c}a.attr("class",d.join("_"));c!==e.folder.DOCU?a.removeAttr("disabled"):a.attr("disabled","disabled")}}},selectNode:function(b,a,c){c||i.cancelPreSelectedNode(b);k("#"+a.tId+e.id.A).addClass(e.node.CURSELECTED);h.addSelectedNode(b,a)},setNodeFontCss:function(b,a){var c=k("#"+a.tId+e.id.A),d=i.makeNodeFontCss(b,
a);d&&c.css(d)},setNodeLineIcos:function(b,a){if(a){var c=k("#"+a.tId+e.id.SWITCH),d=k("#"+a.tId+e.id.UL),f=k("#"+a.tId+e.id.ICON),g=i.makeUlLineClass(b,a);g.length==0?d.removeClass(e.line.LINE):d.addClass(g);c.attr("class",i.makeNodeLineClass(b,a));a.isParent?c.removeAttr("disabled"):c.attr("disabled","disabled");f.removeAttr("style");f.attr("style",i.makeNodeIcoStyle(b,a));f.attr("class",i.makeNodeIcoClass(b,a))}},setNodeName:function(b,a){var c=h.getNodeTitle(b,a),d=k("#"+a.tId+e.id.SPAN);d.empty();
b.view.nameIsHTML?d.html(h.getNodeName(b,a)):d.text(h.getNodeName(b,a));j.apply(b.view.showTitle,[b.treeId,a],b.view.showTitle)&&k("#"+a.tId+e.id.A).attr("title",!c?"":c)},setNodeTarget:function(b){k("#"+b.tId+e.id.A).attr("target",i.makeNodeTarget(b))},setNodeUrl:function(b,a){var c=k("#"+a.tId+e.id.A),d=i.makeNodeUrl(b,a);d==null||d.length==0?c.removeAttr("href"):c.attr("href",d)},switchNode:function(b,a){a.open||!j.canAsync(b,a)?i.expandCollapseNode(b,a,!a.open):b.async.enable?i.asyncNode(b,a)||
i.expandCollapseNode(b,a,!a.open):a&&i.expandCollapseNode(b,a,!a.open)}};k.fn.zTree={consts:{event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},
_z:{tools:j,view:i,event:m,data:h},getZTreeObj:function(b){return(b=h.getZTreeTools(b))?b:null},destroy:function(b){if(b&&b.length>0)i.destroy(h.getSetting(b));else for(var a in r)i.destroy(r[a])},init:function(b,a,c){var d=j.clone(M);k.extend(!0,d,a);d.treeId=b.attr("id");d.treeObj=b;d.treeObj.empty();r[d.treeId]=d;if(typeof document.body.style.maxHeight==="undefined")d.view.expandSpeed="";h.initRoot(d);b=h.getRoot(d);a=d.data.key.children;c=c?j.clone(j.isArray(c)?c:[c]):[];b[a]=d.data.simpleData.enable?
h.transformTozTreeFormat(d,c):c;h.initCache(d);m.unbindTree(d);m.bindTree(d);m.unbindEvent(d);m.bindEvent(d);c={setting:d,addNodes:function(a,b,c){function e(){i.addNodes(d,a,h,c==!0)}if(!b)return null;a||(a=null);if(a&&!a.isParent&&d.data.keep.leaf)return null;var h=j.clone(j.isArray(b)?b:[b]);j.canAsync(d,a)?i.asyncNode(d,a,c,e):e();return h},cancelSelectedNode:function(a){i.cancelPreSelectedNode(this.setting,a)},destroy:function(){i.destroy(this.setting)},expandAll:function(a){a=!!a;i.expandCollapseSonNode(this.setting,
null,a,!0);return a},expandNode:function(a,b,c,e,n){if(!a||!a.isParent)return null;b!==!0&&b!==!1&&(b=!a.open);if((n=!!n)&&b&&j.apply(d.callback.beforeExpand,[d.treeId,a],!0)==!1)return null;else if(n&&!b&&j.apply(d.callback.beforeCollapse,[d.treeId,a],!0)==!1)return null;b&&a.parentTId&&i.expandCollapseParentNode(this.setting,a.getParentNode(),b,!1);if(b===a.open&&!c)return null;h.getRoot(d).expandTriggerFlag=n;if(c)i.expandCollapseSonNode(this.setting,a,b,!0,function(){if(e!==!1)try{k("#"+a.tId).focus().blur()}catch(b){}});
else if(a.open=!b,i.switchNode(this.setting,a),e!==!1)try{k("#"+a.tId).focus().blur()}catch(m){}return b},getNodes:function(){return h.getNodes(this.setting)},getNodeByParam:function(a,b,c){return!a?null:h.getNodeByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodeByTId:function(a){return h.getNodeCache(this.setting,a)},getNodesByParam:function(a,b,c){return!a?null:h.getNodesByParam(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),
a,b)},getNodesByParamFuzzy:function(a,b,c){return!a?null:h.getNodesByParamFuzzy(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b)},getNodesByFilter:function(a,b,c,d){b=!!b;return!a||typeof a!="function"?b?null:[]:h.getNodesByFilter(this.setting,c?c[this.setting.data.key.children]:h.getNodes(this.setting),a,b,d)},getNodeIndex:function(a){if(!a)return null;for(var b=d.data.key.children,c=a.parentTId?a.getParentNode():h.getRoot(this.setting),e=0,i=c[b].length;e<i;e++)if(c[b][e]==
a)return e;return-1},getSelectedNodes:function(){for(var a=[],b=h.getRoot(this.setting).curSelectedList,c=0,d=b.length;c<d;c++)a.push(b[c]);return a},isSelectedNode:function(a){return h.isSelectedNode(this.setting,a)},reAsyncChildNodes:function(a,b,c){if(this.setting.async.enable){var j=!a;j&&(a=h.getRoot(this.setting));if(b=="refresh"){for(var b=this.setting.data.key.children,m=0,p=a[b]?a[b].length:0;m<p;m++)h.removeNodeCache(d,a[b][m]);h.removeSelectedNode(d);a[b]=[];j?this.setting.treeObj.empty():
k("#"+a.tId+e.id.UL).empty()}i.asyncNode(this.setting,j?null:a,!!c)}},refresh:function(){this.setting.treeObj.empty();var a=h.getRoot(this.setting),b=a[this.setting.data.key.children];h.initRoot(this.setting);a[this.setting.data.key.children]=b;h.initCache(this.setting);i.createNodes(this.setting,0,a[this.setting.data.key.children])},removeChildNodes:function(a){if(!a)return null;var b=a[d.data.key.children];i.removeChildNodes(d,a);return b?b:null},removeNode:function(a,b){a&&(b=!!b,b&&j.apply(d.callback.beforeRemove,
[d.treeId,a],!0)==!1||(i.removeNode(d,a),b&&this.setting.treeObj.trigger(e.event.REMOVE,[d.treeId,a])))},selectNode:function(a,b){if(a&&j.uCanDo(this.setting)){b=d.view.selectedMulti&&b;if(a.parentTId)i.expandCollapseParentNode(this.setting,a.getParentNode(),!0,!1,function(){try{k("#"+a.tId).focus().blur()}catch(b){}});else try{k("#"+a.tId).focus().blur()}catch(c){}i.selectNode(this.setting,a,b)}},transformTozTreeNodes:function(a){return h.transformTozTreeFormat(this.setting,a)},transformToArray:function(a){return h.transformToArrayFormat(this.setting,
a)},updateNode:function(a){a&&k("#"+a.tId).get(0)&&j.uCanDo(this.setting)&&(i.setNodeName(this.setting,a),i.setNodeTarget(a),i.setNodeUrl(this.setting,a),i.setNodeLineIcos(this.setting,a),i.setNodeFontCss(this.setting,a))}};b.treeTools=c;h.setZTreeTools(d,c);b[a]&&b[a].length>0?i.createNodes(d,0,b[a]):d.async.enable&&d.async.url&&d.async.url!==""&&i.asyncNode(d);return c}};var N=k.fn.zTree,e=N.consts})(jQuery);
/*
* JQuery zTree excheck 3.5.02
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2013-01-28
*/
(function(m){var p,q,r,n={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:n.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:n.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,
a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=b.data.key.checked;if(l.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=m("#"+a.tId+i.id.CHECK);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(i.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=m("#"+a.tId+i.id.CHECK);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===
!0)return!1;var b=g.getSetting(c.data.treeId),d=m("#"+a.tId+i.id.CHECK);a.check_Focus=!1;e.setChkClass(b,d,a);return!0};m.extend(!0,m.fn.zTree.consts,n);m.extend(!0,m.fn.zTree._z,{tools:{},view:{checkNodeRelation:function(c,a){var b,d,h,k=c.data.key.children,j=c.data.key.checked;b=i.radio;if(c.check.chkStyle==b.STYLE){var f=g.getRadioCheckedList(c);if(a[j])if(c.check.radioType==b.TYPE_ALL){for(d=f.length-1;d>=0;d--)b=f[d],b[j]=!1,f.splice(d,1),e.setChkClass(c,m("#"+b.tId+i.id.CHECK),b),b.parentTId!=
a.parentTId&&e.repairParentChkClassWithSelf(c,b);f.push(a)}else{f=a.parentTId?a.getParentNode():g.getRoot(c);for(d=0,h=f[k].length;d<h;d++)b=f[k][d],b[j]&&b!=a&&(b[j]=!1,e.setChkClass(c,m("#"+b.tId+i.id.CHECK),b))}else if(c.check.radioType==b.TYPE_ALL)for(d=0,h=f.length;d<h;d++)if(a==f[d]){f.splice(d,1);break}}else a[j]&&(!a[k]||a[k].length==0||c.check.chkboxType.Y.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,a,!0),!a[j]&&(!a[k]||a[k].length==0||c.check.chkboxType.N.indexOf("s")>-1)&&e.setSonNodeCheckBox(c,
a,!1),a[j]&&c.check.chkboxType.Y.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!0),!a[j]&&c.check.chkboxType.N.indexOf("p")>-1&&e.setParentNodeCheckBox(c,a,!1)},makeChkClass:function(c,a){var b=c.data.key.checked,d=i.checkbox,h=i.radio,k="",k=a.chkDisabled===!0?d.DISABLED:a.halfCheck?d.PART:c.check.chkStyle==h.STYLE?a.check_Child_State<1?d.FULL:d.PART:a[b]?a.check_Child_State===2||a.check_Child_State===-1?d.FULL:d.PART:a.check_Child_State<1?d.FULL:d.PART,b=c.check.chkStyle+"_"+(a[b]?d.TRUE:d.FALSE)+
"_"+k,b=a.check_Focus&&a.chkDisabled!==!0?b+"_"+d.FOCUS:b;return"button "+d.DEFAULT+" "+b},repairAllChk:function(c,a){if(c.check.enable&&c.check.chkStyle===i.checkbox.STYLE)for(var b=c.data.key.checked,d=c.data.key.children,h=g.getRoot(c),k=0,j=h[d].length;k<j;k++){var f=h[d][k];f.nocheck!==!0&&f.chkDisabled!==!0&&(f[b]=a);e.setSonNodeCheckBox(c,f,a)}},repairChkClass:function(c,a){if(a&&(g.makeChkFlag(c,a),a.nocheck!==!0)){var b=m("#"+a.tId+i.id.CHECK);e.setChkClass(c,b,a)}},repairParentChkClass:function(c,
a){if(a&&a.parentTId){var b=a.getParentNode();e.repairChkClass(c,b);e.repairParentChkClass(c,b)}},repairParentChkClassWithSelf:function(c,a){if(a){var b=c.data.key.children;a[b]&&a[b].length>0?e.repairParentChkClass(c,a[b][0]):e.repairParentChkClass(c,a)}},repairSonChkDisabled:function(c,a,b,d){if(a){var h=c.data.key.children;if(a.chkDisabled!=b)a.chkDisabled=b;e.repairChkClass(c,a);if(a[h]&&d)for(var k=0,j=a[h].length;k<j;k++)e.repairSonChkDisabled(c,a[h][k],b,d)}},repairParentChkDisabled:function(c,
a,b,d){if(a){if(a.chkDisabled!=b&&d)a.chkDisabled=b;e.repairChkClass(c,a);e.repairParentChkDisabled(c,a.getParentNode(),b,d)}},setChkClass:function(c,a,b){a&&(b.nocheck===!0?a.hide():a.show(),a.removeClass(),a.addClass(e.makeChkClass(c,b)))},setParentNodeCheckBox:function(c,a,b,d){var h=c.data.key.children,k=c.data.key.checked,j=m("#"+a.tId+i.id.CHECK);d||(d=a);g.makeChkFlag(c,a);a.nocheck!==!0&&a.chkDisabled!==!0&&(a[k]=b,e.setChkClass(c,j,a),c.check.autoCheckTrigger&&a!=d&&c.treeObj.trigger(i.event.CHECK,
[null,c.treeId,a]));if(a.parentTId){j=!0;if(!b)for(var h=a.getParentNode()[h],f=0,o=h.length;f<o;f++)if(h[f].nocheck!==!0&&h[f].chkDisabled!==!0&&h[f][k]||(h[f].nocheck===!0||h[f].chkDisabled===!0)&&h[f].check_Child_State>0){j=!1;break}j&&e.setParentNodeCheckBox(c,a.getParentNode(),b,d)}},setSonNodeCheckBox:function(c,a,b,d){if(a){var h=c.data.key.children,k=c.data.key.checked,j=m("#"+a.tId+i.id.CHECK);d||(d=a);var f=!1;if(a[h])for(var o=0,l=a[h].length;o<l&&a.chkDisabled!==!0;o++){var n=a[h][o];
e.setSonNodeCheckBox(c,n,b,d);n.chkDisabled===!0&&(f=!0)}if(a!=g.getRoot(c)&&a.chkDisabled!==!0){f&&a.nocheck!==!0&&g.makeChkFlag(c,a);if(a.nocheck!==!0&&a.chkDisabled!==!0){if(a[k]=b,!f)a.check_Child_State=a[h]&&a[h].length>0?b?2:0:-1}else a.check_Child_State=-1;e.setChkClass(c,j,a);c.check.autoCheckTrigger&&a!=d&&a.nocheck!==!0&&a.chkDisabled!==!0&&c.treeObj.trigger(i.event.CHECK,[null,c.treeId,a])}}}},event:{},data:{getRadioCheckedList:function(c){for(var a=g.getRoot(c).radioCheckedList,b=0,d=
a.length;b<d;b++)g.getNodeCache(c,a[b].tId)||(a.splice(b,1),b--,d--);return a},getCheckStatus:function(c,a){if(!c.check.enable||a.nocheck||a.chkDisabled)return null;var b=c.data.key.checked;return{checked:a[b],half:a.halfCheck?a.halfCheck:c.check.chkStyle==i.radio.STYLE?a.check_Child_State===2:a[b]?a.check_Child_State>-1&&a.check_Child_State<2:a.check_Child_State>0}},getTreeCheckedNodes:function(c,a,b,d){if(!a)return[];for(var h=c.data.key.children,k=c.data.key.checked,e=b&&c.check.chkStyle==i.radio.STYLE&&
c.check.radioType==i.radio.TYPE_ALL,d=!d?[]:d,f=0,o=a.length;f<o;f++){if(a[f].nocheck!==!0&&a[f].chkDisabled!==!0&&a[f][k]==b&&(d.push(a[f]),e))break;g.getTreeCheckedNodes(c,a[f][h],b,d);if(e&&d.length>0)break}return d},getTreeChangeCheckedNodes:function(c,a,b){if(!a)return[];for(var d=c.data.key.children,h=c.data.key.checked,b=!b?[]:b,k=0,e=a.length;k<e;k++)a[k].nocheck!==!0&&a[k].chkDisabled!==!0&&a[k][h]!=a[k].checkedOld&&b.push(a[k]),g.getTreeChangeCheckedNodes(c,a[k][d],b);return b},makeChkFlag:function(c,
a){if(a){var b=c.data.key.children,d=c.data.key.checked,h=-1;if(a[b])for(var e=0,j=a[b].length;e<j;e++){var f=a[b][e],g=-1;if(c.check.chkStyle==i.radio.STYLE)if(g=f.nocheck===!0||f.chkDisabled===!0?f.check_Child_State:f.halfCheck===!0?2:f[d]?2:f.check_Child_State>0?2:0,g==2){h=2;break}else g==0&&(h=0);else if(c.check.chkStyle==i.checkbox.STYLE)if(g=f.nocheck===!0||f.chkDisabled===!0?f.check_Child_State:f.halfCheck===!0?1:f[d]?f.check_Child_State===-1||f.check_Child_State===2?2:1:f.check_Child_State>
0?1:0,g===1){h=1;break}else if(g===2&&h>-1&&e>0&&g!==h){h=1;break}else if(h===2&&g>-1&&g<2){h=1;break}else g>-1&&(h=g)}a.check_Child_State=h}}}});var n=m.fn.zTree,l=n._z.tools,i=n.consts,e=n._z.view,g=n._z.data;g.exSetting(v);g.addInitBind(function(c){c.treeObj.bind(i.event.CHECK,function(a,b,d,h){l.apply(c.callback.onCheck,[b?b:a,d,h])})});g.addInitUnBind(function(c){c.treeObj.unbind(i.event.CHECK)});g.addInitCache(function(){});g.addInitNode(function(c,a,b,d){if(b){a=c.data.key.checked;typeof b[a]==
"string"&&(b[a]=l.eqs(b[a],"true"));b[a]=!!b[a];b.checkedOld=b[a];if(typeof b.nocheck=="string")b.nocheck=l.eqs(b.nocheck,"true");b.nocheck=!!b.nocheck||c.check.nocheckInherit&&d&&!!d.nocheck;if(typeof b.chkDisabled=="string")b.chkDisabled=l.eqs(b.chkDisabled,"true");b.chkDisabled=!!b.chkDisabled||c.check.chkDisabledInherit&&d&&!!d.chkDisabled;if(typeof b.halfCheck=="string")b.halfCheck=l.eqs(b.halfCheck,"true");b.halfCheck=!!b.halfCheck;b.check_Child_State=-1;b.check_Focus=!1;b.getCheckStatus=function(){return g.getCheckStatus(c,
b)}}});g.addInitProxy(function(c){var a=c.target,b=g.getSetting(c.data.treeId),d="",h=null,e="",j=null;if(l.eqs(c.type,"mouseover")){if(b.check.enable&&l.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,e="mouseoverCheck"}else if(l.eqs(c.type,"mouseout")){if(b.check.enable&&l.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+i.id.CHECK)!==null)d=a.parentNode.id,e="mouseoutCheck"}else if(l.eqs(c.type,"click")&&b.check.enable&&l.eqs(a.tagName,"span")&&a.getAttribute("treeNode"+
i.id.CHECK)!==null)d=a.parentNode.id,e="checkNode";if(d.length>0)switch(h=g.getNodeCache(b,d),e){case "checkNode":j=p;break;case "mouseoverCheck":j=q;break;case "mouseoutCheck":j=r}return{stop:!1,node:h,nodeEventType:e,nodeEventCallback:j,treeEventType:"",treeEventCallback:null}});g.addInitRoot(function(c){g.getRoot(c).radioCheckedList=[]});g.addBeforeA(function(c,a,b){var d=c.data.key.checked;c.check.enable&&(g.makeChkFlag(c,a),c.check.chkStyle==i.radio.STYLE&&c.check.radioType==i.radio.TYPE_ALL&&
a[d]&&g.getRoot(c).radioCheckedList.push(a),b.push("<span ID='",a.tId,i.id.CHECK,"' class='",e.makeChkClass(c,a),"' treeNode",i.id.CHECK,a.nocheck===!0?" style='display:none;'":"","></span>"))});g.addZTreeTools(function(c,a){a.checkNode=function(a,b,g,j){var f=this.setting.data.key.checked;if(a.chkDisabled!==!0&&(b!==!0&&b!==!1&&(b=!a[f]),j=!!j,(a[f]!==b||g)&&!(j&&l.apply(this.setting.callback.beforeCheck,[this.setting.treeId,a],!0)==!1)&&l.uCanDo(this.setting)&&this.setting.check.enable&&a.nocheck!==
!0))a[f]=b,b=m("#"+a.tId+i.id.CHECK),(g||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,a),e.setChkClass(this.setting,b,a),e.repairParentChkClassWithSelf(this.setting,a),j&&c.treeObj.trigger(i.event.CHECK,[null,c.treeId,a])};a.checkAllNodes=function(a){e.repairAllChk(this.setting,!!a)};a.getCheckedNodes=function(a){var b=this.setting.data.key.children;return g.getTreeCheckedNodes(this.setting,g.getRoot(c)[b],a!==!1)};a.getChangeCheckedNodes=function(){var a=this.setting.data.key.children;
return g.getTreeChangeCheckedNodes(this.setting,g.getRoot(c)[a])};a.setChkDisabled=function(a,b,c,g){b=!!b;c=!!c;e.repairSonChkDisabled(this.setting,a,b,!!g);e.repairParentChkDisabled(this.setting,a.getParentNode(),b,c)};var b=a.updateNode;a.updateNode=function(c,h){b&&b.apply(a,arguments);if(c&&this.setting.check.enable&&m("#"+c.tId).get(0)&&l.uCanDo(this.setting)){var g=m("#"+c.tId+i.id.CHECK);(h==!0||this.setting.check.chkStyle===i.radio.STYLE)&&e.checkNodeRelation(this.setting,c);e.setChkClass(this.setting,
g,c);e.repairParentChkClassWithSelf(this.setting,c)}}});var s=e.createNodes;e.createNodes=function(c,a,b,d){s&&s.apply(e,arguments);b&&e.repairParentChkClassWithSelf(c,d)};var t=e.removeNode;e.removeNode=function(c,a){var b=a.getParentNode();t&&t.apply(e,arguments);a&&b&&(e.repairChkClass(c,b),e.repairParentChkClass(c,b))};var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,i){var j="";u&&(j=u.apply(e,arguments));d&&g.makeChkFlag(c,d);return j}})(jQuery);
/*
* JQuery zTree exedit 3.5.02
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
*
* Licensed same as jquery - MIT License
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2013-01-28
*/
(function(k){var F={event:{DRAG:"ztree_drag",DROP:"ztree_drop",REMOVE:"ztree_remove",RENAME:"ztree_rename"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},D={onHoverOverNode:function(b,a){var c=p.getSetting(b.data.treeId),d=p.getRoot(c);if(d.curHoverNode!=a)D.onHoverOutNode(b);d.curHoverNode=a;e.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
p.getSetting(b.data.treeId),a=p.getRoot(b);if(a.curHoverNode&&!p.isSelectedNode(b,a.curHoverNode))e.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(z.dragFlag==0&&Math.abs(K-b.clientX)<g.edit.drag.minMoveSize&&Math.abs(L-b.clientY)<g.edit.drag.minMoveSize)return!0;var a,c,f,j,l;l=g.data.key.children;k("body").css("cursor","pointer");if(z.dragFlag==0){if(h.apply(g.callback.beforeDrag,[g.treeId,m],!0)==!1)return q(b),!0;for(a=0,c=m.length;a<c;a++){if(a==
0)z.dragNodeShowBefore=[];f=m[a];f.isParent&&f.open?(e.expandCollapseNode(g,f,!f.open),z.dragNodeShowBefore[f.tId]=!0):z.dragNodeShowBefore[f.tId]=!1}z.dragFlag=1;z.showHoverDom=!1;h.showIfameMask(g,!0);f=!0;j=-1;if(m.length>1){var s=m[0].parentTId?m[0].getParentNode()[l]:p.getNodes(g);l=[];for(a=0,c=s.length;a<c;a++)if(z.dragNodeShowBefore[s[a].tId]!==void 0&&(f&&j>-1&&j+1!==a&&(f=!1),l.push(s[a]),j=a),m.length===l.length){m=l;break}}f&&(D=m[0].getPreNode(),E=m[m.length-1].getNextNode());y=k("<ul class='zTreeDragUL'></ul>");
for(a=0,c=m.length;a<c;a++)if(f=m[a],f.editNameFlag=!1,e.selectNode(g,f,a>0),e.removeTreeDom(g,f),j=k("<li id='"+f.tId+"_tmp'></li>"),j.append(k("#"+f.tId+d.id.A).clone()),j.css("padding","0"),j.children("#"+f.tId+d.id.A).removeClass(d.node.CURSELECTED),y.append(j),a==g.edit.drag.maxShowNodeNum-1){j=k("<li id='"+f.tId+"_moretmp'><a> ... </a></li>");y.append(j);break}y.attr("id",m[0].tId+d.id.UL+"_tmp");y.addClass(g.treeObj.attr("class"));y.appendTo("body");t=k("<span class='tmpzTreeMove_arrow'></span>");
t.attr("id","zTreeMove_arrow_tmp");t.appendTo("body");g.treeObj.trigger(d.event.DRAG,[b,g.treeId,m])}if(z.dragFlag==1){r&&t.attr("id")==b.target.id&&u&&b.clientX+x.scrollLeft()+2>k("#"+u+d.id.A,r).offset().left?(f=k("#"+u+d.id.A,r),b.target=f.length>0?f.get(0):b.target):r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_INNER));
u=r=null;G=!1;i=g;f=p.getSettings();for(var B in f)if(f[B].treeId&&f[B].edit.enable&&f[B].treeId!=g.treeId&&(b.target.id==f[B].treeId||k(b.target).parents("#"+f[B].treeId).length>0))G=!0,i=f[B];B=x.scrollTop();j=x.scrollLeft();l=i.treeObj.offset();a=i.treeObj.get(0).scrollHeight;f=i.treeObj.get(0).scrollWidth;c=b.clientY+B-l.top;var o=i.treeObj.height()+l.top-b.clientY-B,n=b.clientX+j-l.left,H=i.treeObj.width()+l.left-b.clientX-j;l=c<g.edit.drag.borderMax&&c>g.edit.drag.borderMin;var s=o<g.edit.drag.borderMax&&
o>g.edit.drag.borderMin,I=n<g.edit.drag.borderMax&&n>g.edit.drag.borderMin,C=H<g.edit.drag.borderMax&&H>g.edit.drag.borderMin,o=c>g.edit.drag.borderMin&&o>g.edit.drag.borderMin&&n>g.edit.drag.borderMin&&H>g.edit.drag.borderMin,n=l&&i.treeObj.scrollTop()<=0,H=s&&i.treeObj.scrollTop()+i.treeObj.height()+10>=a,M=I&&i.treeObj.scrollLeft()<=0,N=C&&i.treeObj.scrollLeft()+i.treeObj.width()+10>=f;if(b.target.id&&i.treeObj.find("#"+b.target.id).length>0){for(var A=b.target;A&&A.tagName&&!h.eqs(A.tagName,"li")&&
A.id!=i.treeId;)A=A.parentNode;var O=!0;for(a=0,c=m.length;a<c;a++)if(f=m[a],A.id===f.tId){O=!1;break}else if(k("#"+f.tId).find("#"+A.id).length>0){O=!1;break}if(O&&b.target.id&&(b.target.id==A.id+d.id.A||k(b.target).parents("#"+A.id+d.id.A).length>0))r=k(A),u=A.id}f=m[0];if(o&&(b.target.id==i.treeId||k(b.target).parents("#"+i.treeId).length>0)){if(!r&&(b.target.id==i.treeId||n||H||M||N)&&(G||!G&&f.parentTId))r=i.treeObj;l?i.treeObj.scrollTop(i.treeObj.scrollTop()-10):s&&i.treeObj.scrollTop(i.treeObj.scrollTop()+
10);I?i.treeObj.scrollLeft(i.treeObj.scrollLeft()-10):C&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+10);r&&r!=i.treeObj&&r.offset().left<i.treeObj.offset().left&&i.treeObj.scrollLeft(i.treeObj.scrollLeft()+r.offset().left-i.treeObj.offset().left)}y.css({top:b.clientY+B+3+"px",left:b.clientX+j+3+"px"});l=a=0;if(r&&r.attr("id")!=i.treeId){var w=u==null?null:p.getNodeCache(i,u);c=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&g.edit.drag.isCopy;a=!!(D&&u===D.tId);l=!!(E&&u===
E.tId);j=f.parentTId&&f.parentTId==u;f=(c||!l)&&h.apply(i.edit.drag.prev,[i.treeId,m,w],!!i.edit.drag.prev);a=(c||!a)&&h.apply(i.edit.drag.next,[i.treeId,m,w],!!i.edit.drag.next);C=(c||!j)&&!(i.data.keep.leaf&&!w.isParent)&&h.apply(i.edit.drag.inner,[i.treeId,m,w],!!i.edit.drag.inner);if(!f&&!a&&!C){if(r=null,u="",v=d.move.TYPE_INNER,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null}else{c=k("#"+u+d.id.A,r);l=w.isLastNode?null:k("#"+
w.getNextNode().tId+d.id.A,r.next());s=c.offset().top;j=c.offset().left;I=f?C?0.25:a?0.5:1:-1;C=a?C?0.75:f?0.5:0:-1;b=(b.clientY+B-s)/c.height();(I==1||b<=I&&b>=-0.2)&&f?(a=1-t.width(),l=s-t.height()/2,v=d.move.TYPE_PREV):(C==0||b>=C&&b<=1.2)&&a?(a=1-t.width(),l=l==null||w.isParent&&w.open?s+c.height()-t.height()/2:l.offset().top-t.height()/2,v=d.move.TYPE_NEXT):(a=5-t.width(),l=s,v=d.move.TYPE_INNER);t.css({display:"block",top:l+"px",left:j+a+"px"});c.addClass(d.node.TMPTARGET_NODE+"_"+v);if(P!=
u||Q!=v)J=(new Date).getTime();if(w&&w.isParent&&v==d.move.TYPE_INNER&&(b=!0,window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==w.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===w.tId&&(b=!1),b))window.zTreeMoveTimer=setTimeout(function(){v==d.move.TYPE_INNER&&w&&w.isParent&&!w.open&&(new Date).getTime()-J>i.edit.drag.autoOpenTime&&h.apply(i.callback.beforeDragOpen,[i.treeId,w],!0)&&(e.switchNode(i,w),i.edit.drag.autoExpandTrigger&&
i.treeObj.trigger(d.event.EXPAND,[i.treeId,w]))},i.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=w.tId}}else if(v=d.move.TYPE_INNER,r&&h.apply(i.edit.drag.inner,[i.treeId,m,null],!!i.edit.drag.inner)?r.addClass(d.node.TMPTARGET_TREE):r=null,t.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;P=u;Q=v}return!1}function q(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;Q=P=null;
x.unbind("mousemove",c);x.unbind("mouseup",q);x.unbind("selectstart",f);k("body").css("cursor","auto");r&&(r.removeClass(d.node.TMPTARGET_TREE),u&&k("#"+u+d.id.A,r).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+F.move.TYPE_INNER));h.showIfameMask(g,!1);z.showHoverDom=!0;if(z.dragFlag!=0){z.dragFlag=0;var a,l,j;for(a=0,l=m.length;a<l;a++)j=m[a],j.isParent&&z.dragNodeShowBefore[j.tId]&&!j.open&&(e.expandCollapseNode(g,
j,!j.open),delete z.dragNodeShowBefore[j.tId]);y&&y.remove();t&&t.remove();var o=b.ctrlKey&&g.edit.drag.isMove&&g.edit.drag.isCopy||!g.edit.drag.isMove&&g.edit.drag.isCopy;!o&&r&&u&&m[0].parentTId&&u==m[0].parentTId&&v==d.move.TYPE_INNER&&(r=null);if(r){var n=u==null?null:p.getNodeCache(i,u);if(h.apply(g.callback.beforeDrop,[i.treeId,m,n,v,o],!0)!=!1){var s=o?h.clone(m):m;a=function(){if(G){if(!o)for(var a=0,c=m.length;a<c;a++)e.removeNode(g,m[a]);if(v==d.move.TYPE_INNER)e.addNodes(i,n,s);else if(e.addNodes(i,
n.getParentNode(),s),v==d.move.TYPE_PREV)for(a=0,c=s.length;a<c;a++)e.moveNode(i,n,s[a],v,!1);else for(a=-1,c=s.length-1;a<c;c--)e.moveNode(i,n,s[c],v,!1)}else if(o&&v==d.move.TYPE_INNER)e.addNodes(i,n,s);else if(o&&e.addNodes(i,n.getParentNode(),s),v!=d.move.TYPE_NEXT)for(a=0,c=s.length;a<c;a++)e.moveNode(i,n,s[a],v,!1);else for(a=-1,c=s.length-1;a<c;c--)e.moveNode(i,n,s[c],v,!1);for(a=0,c=s.length;a<c;a++)e.selectNode(i,s[a],a>0);k("#"+s[0].tId).focus().blur();g.treeObj.trigger(d.event.DROP,[b,
i.treeId,s,n,v,o])};v==d.move.TYPE_INNER&&h.canAsync(i,n)?e.asyncNode(i,n,!1,a):a()}}else{for(a=0,l=m.length;a<l;a++)e.selectNode(i,m[a],a>0);g.treeObj.trigger(d.event.DROP,[b,g.treeId,m,null,null,null])}}}function f(){return!1}var l,j,g=p.getSetting(b.data.treeId),z=p.getRoot(g);if(b.button==2||!g.edit.enable||!g.edit.drag.isCopy&&!g.edit.drag.isMove)return!0;var o=b.target,n=p.getRoot(g).curSelectedList,m=[];if(p.isSelectedNode(g,a))for(l=0,j=n.length;l<j;l++){if(n[l].editNameFlag&&h.eqs(o.tagName,
"input")&&o.getAttribute("treeNode"+d.id.INPUT)!==null)return!0;m.push(n[l]);if(m[0].parentTId!==n[l].parentTId){m=[a];break}}else m=[a];e.editNodeBlur=!0;e.cancelCurEditNode(g,null,!0);var x=k(document),y,t,r,G=!1,i=g,D,E,P=null,Q=null,u=null,v=d.move.TYPE_INNER,K=b.clientX,L=b.clientY,J=(new Date).getTime();h.uCanDo(g)&&x.bind("mousemove",c);x.bind("mouseup",q);x.bind("selectstart",f);b.preventDefault&&b.preventDefault();return!0}};k.extend(!0,k.fn.zTree.consts,F);k.extend(!0,k.fn.zTree._z,{tools:{getAbs:function(b){b=
b.getBoundingClientRect();return[b.left,b.top]},inputFocus:function(b){b.get(0)&&(b.focus(),h.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=p.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),
c.dragMaskList.shift();if(a)for(var d=k("iframe"),f=0,e=d.length;f<e;f++){var j=d.get(f),g=h.getAbs(j),j=k("<div id='zTreeMask_"+f+"' class='zTreeMask' style='top:"+g[1]+"px; left:"+g[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>");j.appendTo("body");c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.EDIT).length>0)&&h.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=k("#"+a.tId+d.id.A),q="<span class='button edit' id='"+
a.tId+d.id.EDIT+"' title='"+h.apply(b.edit.renameTitle,[b.treeId,a],b.edit.renameTitle)+"' treeNode"+d.id.EDIT+" style='display:none;'></span>";c.append(q);k("#"+a.tId+d.id.EDIT).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;e.editNode(b,a);return!1}).show()}},addRemoveBtn:function(b,a){if(!(a.editNameFlag||k("#"+a.tId+d.id.REMOVE).length>0)&&h.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=k("#"+a.tId+d.id.A),q="<span class='button remove' id='"+
a.tId+d.id.REMOVE+"' title='"+h.apply(b.edit.removeTitle,[b.treeId,a],b.edit.removeTitle)+"' treeNode"+d.id.REMOVE+" style='display:none;'></span>";c.append(q);k("#"+a.tId+d.id.REMOVE).bind("click",function(){if(!h.uCanDo(b)||h.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;e.removeNode(b,a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(p.getRoot(b).showHoverDom)a.isHover=!0,b.edit.enable&&(e.addEditBtn(b,
a),e.addRemoveBtn(b,a)),h.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a){var c=p.getRoot(b),q=b.data.key.name,f=c.curEditNode;if(f){var l=c.curEditInput,j=a?a:l.val();if(!a&&h.apply(b.callback.beforeRename,[b.treeId,f,j],!0)===!1)return!1;else f[q]=j?j:l.val(),a||b.treeObj.trigger(d.event.RENAME,[b.treeId,f]);k("#"+f.tId+d.id.A).removeClass(d.node.CURSELECTED_EDIT);l.unbind();e.setNodeName(b,f);f.editNameFlag=!1;c.curEditNode=null;c.curEditInput=null;e.selectNode(b,f,!1)}return c.noSelection=
!0},editNode:function(b,a){var c=p.getRoot(b);e.editNodeBlur=!1;if(p.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){h.inputFocus(c.curEditInput)},0);else{var q=b.data.key.name;a.editNameFlag=!0;e.removeTreeDom(b,a);e.cancelCurEditNode(b);e.selectNode(b,a,!1);k("#"+a.tId+d.id.SPAN).html("<input type=text class='rename' id='"+a.tId+d.id.INPUT+"' treeNode"+d.id.INPUT+" >");var f=k("#"+a.tId+d.id.INPUT);f.attr("value",a[q]);b.edit.editNameSelectAll?h.inputSelect(f):h.inputFocus(f);
f.bind("blur",function(){e.editNodeBlur||e.cancelCurEditNode(b)}).bind("keydown",function(c){c.keyCode=="13"?(e.editNodeBlur=!0,e.cancelCurEditNode(b,null,!0)):c.keyCode=="27"&&e.cancelCurEditNode(b,a[q])}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});k("#"+a.tId+d.id.A).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=f;c.noSelection=!1;c.curEditNode=a}},moveNode:function(b,a,c,q,f,l){var j=p.getRoot(b),g=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||
q!=d.move.TYPE_INNER)){var h=c.parentTId?c.getParentNode():j,o=a===null||a==j;o&&a===null&&(a=j);if(o)q=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(q!=d.move.TYPE_PREV&&q!=d.move.TYPE_NEXT)q=d.move.TYPE_INNER;if(q==d.move.TYPE_INNER)if(o)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,e.setNodeLineIcos(b,a);c.parentTId=a.tId}var n;o?n=o=b.treeObj:(!l&&q==d.move.TYPE_INNER?e.expandCollapseNode(b,a,!0,!1):l||e.expandCollapseNode(b,a.getParentNode(),!0,!1),o=k("#"+a.tId),
n=k("#"+a.tId+d.id.UL),o.get(0)&&!n.get(0)&&(n=[],e.makeUlHtml(b,a,n,""),o.append(n.join(""))),n=k("#"+a.tId+d.id.UL));var m=k("#"+c.tId);m.get(0)?o.get(0)||m.remove():m=e.appendNodes(b,c.level,[c],null,!1,!0).join("");n.get(0)&&q==d.move.TYPE_INNER?n.append(m):o.get(0)&&q==d.move.TYPE_PREV?o.before(m):o.get(0)&&q==d.move.TYPE_NEXT&&o.after(m);var x=-1,y=0,t=null,o=null,r=c.level;if(c.isFirstNode){if(x=0,h[g].length>1)t=h[g][1],t.isFirstNode=!0}else if(c.isLastNode)x=h[g].length-1,t=h[g][x-1],t.isLastNode=
!0;else for(n=0,m=h[g].length;n<m;n++)if(h[g][n].tId==c.tId){x=n;break}x>=0&&h[g].splice(x,1);if(q!=d.move.TYPE_INNER)for(n=0,m=j[g].length;n<m;n++)j[g][n].tId==a.tId&&(y=n);if(q==d.move.TYPE_INNER){a[g]||(a[g]=[]);if(a[g].length>0)o=a[g][a[g].length-1],o.isLastNode=!1;a[g].splice(a[g].length,0,c);c.isLastNode=!0;c.isFirstNode=a[g].length==1}else a.isFirstNode&&q==d.move.TYPE_PREV?(j[g].splice(y,0,c),o=a,o.isFirstNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!0,c.isLastNode=!1):a.isLastNode&&q==d.move.TYPE_NEXT?
(j[g].splice(y+1,0,c),o=a,o.isLastNode=!1,c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!0):(q==d.move.TYPE_PREV?j[g].splice(y,0,c):j[g].splice(y+1,0,c),c.parentTId=a.parentTId,c.isFirstNode=!1,c.isLastNode=!1);p.fixPIdKeyValue(b,c);p.setSonNodeLevel(b,c.getParentNode(),c);e.setNodeLineIcos(b,c);e.repairNodeLevelClass(b,c,r);!b.data.keep.parent&&h[g].length<1?(h.isParent=!1,h.open=!1,a=k("#"+h.tId+d.id.UL),q=k("#"+h.tId+d.id.SWITCH),g=k("#"+h.tId+d.id.ICON),e.replaceSwitchClass(h,q,d.folder.DOCU),
e.replaceIcoClass(h,g,d.folder.DOCU),a.css("display","none")):t&&e.setNodeLineIcos(b,t);o&&e.setNodeLineIcos(b,o);b.check&&b.check.enable&&e.repairChkClass&&(e.repairChkClass(b,h),e.repairParentChkClassWithSelf(b,h),h!=c.parent&&e.repairParentChkClassWithSelf(b,c));l||e.expandCollapseParentNode(b,c.getParentNode(),!0,f)}},removeEditBtn:function(b){k("#"+b.tId+d.id.EDIT).unbind().remove()},removeRemoveBtn:function(b){k("#"+b.tId+d.id.REMOVE).unbind().remove()},removeTreeDom:function(b,a){a.isHover=
!1;e.removeEditBtn(a);e.removeRemoveBtn(a);h.apply(b.view.removeHoverDom,[b.treeId,a])},repairNodeLevelClass:function(b,a,c){if(c!==a.level){var b=k("#"+a.tId),e=k("#"+a.tId+d.id.A),f=k("#"+a.tId+d.id.UL),c="level"+c,a="level"+a.level;b.removeClass(c);b.addClass(a);e.removeClass(c);e.addClass(a);f.removeClass(c);f.addClass(a)}}},event:{},data:{setSonNodeLevel:function(b,a,c){if(c){var d=b.data.key.children;c.level=a?a.level+1:0;if(c[d])for(var a=0,f=c[d].length;a<f;a++)c[d][a]&&p.setSonNodeLevel(b,
c,c[d][a])}}}});var E=k.fn.zTree,h=E._z.tools,d=E.consts,e=E._z.view,p=E._z.data;p.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,
onDrop:null,onRename:null}});p.addInitBind(function(b){var a=b.treeObj,c=d.event;a.bind(c.RENAME,function(a,c,d){h.apply(b.callback.onRename,[a,c,d])});a.bind(c.REMOVE,function(a,c,d){h.apply(b.callback.onRemove,[a,c,d])});a.bind(c.DRAG,function(a,c,d,e){h.apply(b.callback.onDrag,[c,d,e])});a.bind(c.DROP,function(a,c,d,e,g,k,o){h.apply(b.callback.onDrop,[c,d,e,g,k,o])})});p.addInitUnBind(function(b){var b=b.treeObj,a=d.event;b.unbind(a.RENAME);b.unbind(a.REMOVE);b.unbind(a.DRAG);b.unbind(a.DROP)});
p.addInitCache(function(){});p.addInitNode(function(b,a,c){if(c)c.isHover=!1,c.editNameFlag=!1});p.addInitProxy(function(b){var a=b.target,c=p.getSetting(b.data.treeId),e=b.relatedTarget,f="",l=null,j="",g=null,k=null;if(h.eqs(b.type,"mouseover")){if(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}]))f=k.parentNode.id,j="hoverOverNode"}else if(h.eqs(b.type,"mouseout"))k=h.getMDom(c,e,[{tagName:"a",attrName:"treeNode"+d.id.A}]),k||(f="remove",j="hoverOutNode");else if(h.eqs(b.type,"mousedown")&&
(k=h.getMDom(c,a,[{tagName:"a",attrName:"treeNode"+d.id.A}])))f=k.parentNode.id,j="mousedownNode";if(f.length>0)switch(l=p.getNodeCache(c,f),j){case "mousedownNode":g=D.onMousedownNode;break;case "hoverOverNode":g=D.onHoverOverNode;break;case "hoverOutNode":g=D.onHoverOutNode}return{stop:!1,node:l,nodeEventType:j,nodeEventCallback:g,treeEventType:"",treeEventCallback:null}});p.addInitRoot(function(b){b=p.getRoot(b);b.curEditNode=null;b.curEditInput=null;b.curHoverNode=null;b.dragFlag=0;b.dragNodeShowBefore=
[];b.dragMaskList=[];b.showHoverDom=!0});p.addZTreeTools(function(b,a){a.cancelEditName=function(a){var d=p.getRoot(b),f=b.data.key.name,h=d.curEditNode;d.curEditNode&&e.cancelCurEditNode(b,a?a:h[f])};a.copyNode=function(a,k,f,l){if(!k)return null;if(a&&!a.isParent&&b.data.keep.leaf&&f===d.move.TYPE_INNER)return null;var j=h.clone(k);if(!a)a=null,f=d.move.TYPE_INNER;f==d.move.TYPE_INNER?(k=function(){e.addNodes(b,a,[j],l)},h.canAsync(b,a)?e.asyncNode(b,a,l,k):k()):(e.addNodes(b,a.parentNode,[j],l),
e.moveNode(b,a,j,f,!1,l));return j};a.editName=function(a){a&&a.tId&&a===p.getNodeCache(b,a.tId)&&(a.parentTId&&e.expandCollapseParentNode(b,a.getParentNode(),!0),e.editNode(b,a))};a.moveNode=function(a,q,f,l){function j(){e.moveNode(b,a,q,f,!1,l)}if(!q)return q;if(a&&!a.isParent&&b.data.keep.leaf&&f===d.move.TYPE_INNER)return null;else if(a&&(q.parentTId==a.tId&&f==d.move.TYPE_INNER||k("#"+q.tId).find("#"+a.tId).length>0))return null;else a||(a=null);h.canAsync(b,a)?e.asyncNode(b,a,l,j):j();return q};
a.setEditable=function(a){b.edit.enable=a;return this.refresh()}});var K=e.cancelPreSelectedNode;e.cancelPreSelectedNode=function(b,a){for(var c=p.getRoot(b).curSelectedList,d=0,f=c.length;d<f;d++)if(!a||a===c[d])if(e.removeTreeDom(b,c[d]),a)break;K&&K.apply(e,arguments)};var L=e.createNodes;e.createNodes=function(b,a,c,d){L&&L.apply(e,arguments);c&&e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(b,d)};var R=e.makeNodeUrl;e.makeNodeUrl=function(b,a){return b.edit.enable?null:R.apply(e,
arguments)};var J=e.removeNode;e.removeNode=function(b,a){var c=p.getRoot(b);if(c.curEditNode===a)c.curEditNode=null;J&&J.apply(e,arguments)};var M=e.selectNode;e.selectNode=function(b,a,c){var d=p.getRoot(b);if(p.isSelectedNode(b,a)&&d.curEditNode==a&&a.editNameFlag)return!1;M&&M.apply(e,arguments);e.addHoverDom(b,a);return!0};var N=h.uCanDo;h.uCanDo=function(b,a){var c=p.getRoot(b);return a&&(h.eqs(a.type,"mouseover")||h.eqs(a.type,"mouseout")||h.eqs(a.type,"mousedown")||h.eqs(a.type,"mouseup"))?
!0:!c.curEditNode&&(N?N.apply(e,arguments):!0)}})(jQuery);
/*! ztree_toc - v0.2.2 - 2014-02-08
* https://github.com/i5ting/jQuery.zTree_Toc.js
* Copyright (c) 2014 alfred.sang; Licensed MIT */
function encode_id_with_array(opts,arr) {
var result = 0;
for(var z = 0; z < arr.length; z++ ) {
result += factor(opts, arr.length - z ,arr[z]);
}
return result;
}
/**
* 1.1.1 = 1*100*100 + 1*100 + 1
* 1.2.2 = 1*100*100 + 2*100 + 3
*
* 1 = 0*100 +1
1,1 = 100
*/
function get_parent_id_with_array(opts,arr) {
var result_arr = [];
for(var z = 0; z < arr.length; z++ ) {
result_arr.push(arr[z]);
}
result_arr.pop();
var result = 0;
for(var z = 0; z < result_arr.length; z++ ) {
result += factor(opts,result_arr.length - z,result_arr[z]);
}
return result;
}
function factor(opts ,count,current) {
if(1 == count) {
return current;
}
var str = '';
for(var i = count - 1;i > 0; i-- ) {
str += current * opts.step+'*';
}
return eval( str + '1' );
}
;(function($) {
/*
* 根据header创建目录内容
*/
function create_toc(opts) {
$(opts.documment_selector).find(':header').each(function() {
var level = parseInt(this.nodeName.substring(1), 10);
_rename_header_content(opts,this,level);
_add_header_node(opts,$(this));
});//end each
}
/*
* 渲染ztree
*/
function render_with_ztree(opts) {
var t = $(opts._zTree);
t = $.fn.zTree.init(t,opts.ztreeSetting,opts._header_nodes).expandAll(opts.is_expand_all);
// alert(opts._headers * 88);
// $(opts._zTree).height(opts._headers * 33 + 33);
$(opts._zTree).css(opts.ztreeStyle);
}
/*
* 将已有header编号,并重命名
*/
function _rename_header_content(opts ,header_obj ,level) {
if(opts._headers.length == level) {
opts._headers[level - 1]++;
} else if(opts._headers.length > level) {
opts._headers = opts._headers.slice(0, level);
opts._headers[level - 1] ++;
} else if(opts._headers.length < level) {
for(var i = 0; i < (level - opts._headers.length); i++) {
// console.log('push 1');
opts._headers.push(1);
}
}
if(opts.is_auto_number == true) {
//另存为的文件里会有编号,所以有编号的就不再重新替换
if($(header_obj).text().indexOf( opts._headers.join('.') ) != -1){
}else{
$(header_obj).text(opts._headers.join('.') + '. ' + $(header_obj).text());
}
}
}
/*
* 给ztree用的header_nodes增加数据
*/
function _add_header_node(opts ,header_obj) {
var id = encode_id_with_array(opts,opts._headers);
var pid = get_parent_id_with_array(opts,opts._headers);
// 设置锚点id
$(header_obj).attr('id',id);
log($(header_obj).text());
opts._header_offsets.push($(header_obj).offset().top - opts.highlight_offset);
log('h offset ='+( $(header_obj).offset().top - opts.highlight_offset ) );
opts._header_nodes.push({
id:id,
pId:pid ,
name:$(header_obj).text()||'null',
open:true,
url:'#'+ id,
target:'_self'
});
}
/*
* 根据滚动确定当前位置,并更新ztree
*/
function bind_scroll_event_and_update_postion(opts) {
var timeout;
var highlight_on_scroll = function(e) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(function() {
var top = $(window).scrollTop(),highlighted;
if(opts.debug) console.log('top='+top);
for (var i = 0, c = opts._header_offsets.length; i < c; i++) {
// fixed: top+5防止点击ztree的时候,出现向上抖动的情况
if (opts._header_offsets[i] >= (top + 5) ) {
console.log('opts._header_offsets['+ i +'] = '+opts._header_offsets[i]);
$('a').removeClass('curSelectedNode');
// 由于有root节点,所以i应该从1开始
var obj = $('#tree_' + (i+1) + '_a').addClass('curSelectedNode');
break;
}
}
}, opts.refresh_scroll_time);
};
if (opts.highlight_on_scroll) {
$(window).bind('scroll', highlight_on_scroll);
highlight_on_scroll();
}
}
/*
* 初始化
*/
function init_with_config(opts) {
opts.highlight_offset = $(opts.documment_selector).offset().top;
}
/*
* 日志
*/
function log(str) {
return;
if($.fn.ztree_toc.defaults.debug == true) {
console.log(str);
}
}
$.fn.ztree_toc = function(options) {
// 将defaults 和 options 参数合并到{}
var opts = $.extend({},$.fn.ztree_toc.defaults,options);
return this.each(function() {
opts._zTree = $(this);
// 初始化
init_with_config(opts);
// 创建table of content,获取元数据_headers
create_toc(opts);
// 根据_headers生成ztree
render_with_ztree(opts);
// 根据滚动确定当前位置,并更新ztree
bind_scroll_event_and_update_postion(opts);
});
// each end
}
//定义默认
$.fn.ztree_toc.defaults = {
_zTree: null,
_headers: [],
_header_offsets: [],
_header_nodes: [{ id:1, pId:0, name:"Table of Content",open:true}],
debug: true,
highlight_offset: 0,
highlight_on_scroll: true,
/*
* 计算滚动判断当前位置的时间,默认是50毫秒
*/
refresh_scroll_time: 50,
documment_selector: 'body',
is_posion_top: false,
/*
* 默认是否显示header编号
*/
is_auto_number: false,
/*
* 默认是否展开全部
*/
is_expand_all: true,
/*
* 是否对选中行,显示高亮效果
*/
is_highlight_selected_line: true,
step: 100,
ztreeStyle: {
width:'260px',
overflow: 'auto',
position: 'fixed',
'z-index': 2147483647,
border: '0px none',
left: '0px',
bottom: '0px',
// height:'100px'
},
ztreeSetting: {
view: {
dblClickExpand: false,
showLine: true,
showIcon: false,
selectedMulti: false
},
data: {
simpleData: {
enable: true,
idKey : "id",
pIdKey: "pId",
// rootPId: "0"
}
},
callback: {
beforeClick: function(treeId, treeNode) {
$('a').removeClass('curSelectedNode');
if(treeNode.id == 1){
// TODO: when click root node
console.log('click root table of content');
}
if($.fn.ztree_toc.defaults.is_highlight_selected_line == true) {
$('#' + treeNode.id).css('color' ,'red').fadeOut("slow" ,function() {
// Animation complete.
$(this).show().css('color','black');
});
}
},
onRightClick: function(event, treeId, treeNode) {
if(treeNode.id == 1){
// TODO: when right_click root node:table content
console.log('right_click root table of content');
}
}
}
}
};
})(jQuery);
\ No newline at end of file
/*! ztree_toc - v0.2.2 - 2014-02-08
* https://github.com/i5ting/jQuery.zTree_Toc.js
* Copyright (c) 2014 alfred.sang; Licensed MIT */
function encode_id_with_array(a,b){for(var c=0,d=0;d<b.length;d++)c+=factor(a,b.length-d,b[d]);return c}function get_parent_id_with_array(a,b){for(var c=[],d=0;d<b.length;d++)c.push(b[d]);c.pop();for(var e=0,d=0;d<c.length;d++)e+=factor(a,c.length-d,c[d]);return e}function factor(opts,count,current){if(1==count)return current;for(var str="",i=count-1;i>0;i--)str+=current*opts.step+"*";return eval(str+"1")}!function(a){function b(b){a(b.documment_selector).find(":header").each(function(){var c=parseInt(this.nodeName.substring(1),10);d(b,this,c),e(b,a(this))})}function c(b){var c=a(b._zTree);c=a.fn.zTree.init(c,b.ztreeSetting,b._header_nodes).expandAll(b.is_expand_all),a(b._zTree).css(b.ztreeStyle)}function d(b,c,d){if(b._headers.length==d)b._headers[d-1]++;else if(b._headers.length>d)b._headers=b._headers.slice(0,d),b._headers[d-1]++;else if(b._headers.length<d)for(var e=0;e<d-b._headers.length;e++)b._headers.push(1);1==b.is_auto_number&&(-1!=a(c).text().indexOf(b._headers.join("."))||a(c).text(b._headers.join(".")+". "+a(c).text()))}function e(b,c){var d=encode_id_with_array(b,b._headers),e=get_parent_id_with_array(b,b._headers);a(c).attr("id",d),h(a(c).text()),b._header_offsets.push(a(c).offset().top-b.highlight_offset),h("h offset ="+(a(c).offset().top-b.highlight_offset)),b._header_nodes.push({id:d,pId:e,name:a(c).text()||"null",open:!0,url:"#"+d,target:"_self"})}function f(b){var c,d=function(){c&&clearTimeout(c),c=setTimeout(function(){var c=a(window).scrollTop();b.debug&&console.log("top="+c);for(var d=0,e=b._header_offsets.length;e>d;d++)if(b._header_offsets[d]>=c+5){console.log("opts._header_offsets["+d+"] = "+b._header_offsets[d]),a("a").removeClass("curSelectedNode"),a("#tree_"+(d+1)+"_a").addClass("curSelectedNode");break}},b.refresh_scroll_time)};b.highlight_on_scroll&&(a(window).bind("scroll",d),d())}function g(b){b.highlight_offset=a(b.documment_selector).offset().top}function h(a){}a.fn.ztree_toc=function(d){var e=a.extend({},a.fn.ztree_toc.defaults,d);return this.each(function(){e._zTree=a(this),g(e),b(e),c(e),f(e)})},a.fn.ztree_toc.defaults={_zTree:null,_headers:[],_header_offsets:[],_header_nodes:[{id:1,pId:0,name:"Table of Content",open:!0}],debug:!0,highlight_offset:0,highlight_on_scroll:!0,refresh_scroll_time:50,documment_selector:"body",is_posion_top:!1,is_auto_number:!1,is_expand_all:!0,is_highlight_selected_line:!0,step:100,ztreeStyle:{width:"260px",overflow:"auto",position:"fixed","z-index":2147483647,border:"0px none",left:"0px",bottom:"0px"},ztreeSetting:{view:{dblClickExpand:!1,showLine:!0,showIcon:!1,selectedMulti:!1},data:{simpleData:{enable:!0,idKey:"id",pIdKey:"pId"}},callback:{beforeClick:function(b,c){a("a").removeClass("curSelectedNode"),1==c.id&&console.log("click root table of content"),1==a.fn.ztree_toc.defaults.is_highlight_selected_line&&a("#"+c.id).css("color","red").fadeOut("slow",function(){a(this).show().css("color","black")})},onRightClick:function(a,b,c){1==c.id&&console.log("right_click root table of content")}}}}}(jQuery);
\ No newline at end of file
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #fff;
background-color: #282a36;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #59acf3;
}
a:hover {
color: #a7d8ff;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #fff;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
color: #ff4a14;
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #bf370f;
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #282a36;
color: #ff4a14;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
\ No newline at end of file
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #737373;
background-color: white;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #0069d6;
}
a:hover {
color: #0050a3;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #404040;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
background-color: #fee9cc;
color: rgba(0, 0, 0, 0.75);
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #d9d9d9;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #fff;
color:#737373;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
\ No newline at end of file
*{margin:0;padding:0;}
body {
font:13.34px helvetica,arial,freesans,clean,sans-serif;
color:black;
line-height:1.4em;
background-color: #F8F8F8;
padding: 0.7em;
}
p {
margin:1em 0;
line-height:1.5em;
}
table {
font-size:inherit;
font:100%;
margin:1em;
}
table th{border-bottom:1px solid #bbb;padding:.2em 1em;}
table td{border-bottom:1px solid #ddd;padding:.2em 1em;}
input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}
select,option{padding:0 .25em;}
optgroup{margin-top:.5em;}
pre,code{font:12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;}
pre {
margin:1em 0;
font-size:12px;
background-color:#eee;
border:1px solid #ddd;
padding:5px;
line-height:1.5em;
color:#444;
overflow:auto;
-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;
-webkit-border-radius:3px;
-moz-border-radius:3px;border-radius:3px;
}
pre code {
padding:0;
font-size:12px;
background-color:#eee;
border:none;
}
code {
font-size:12px;
background-color:#f8f8ff;
color:#444;
padding:0 .2em;
border:1px solid #dedede;
}
img{border:0;max-width:100%;}
abbr{border-bottom:none;}
a{color:#4183c4;text-decoration:none;}
a:hover{text-decoration:underline;}
a code,a:link code,a:visited code{color:#4183c4;}
h2,h3{margin:1em 0;}
h1,h2,h3,h4,h5,h6{border:0;}
h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;}
h1:first-child{margin-top:0;padding-top:.25em;border-top:none;}
h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;}
h3{margin-top:1em;}
hr{border:1px solid #ddd;}
ul{margin:1em 0 1em 2em;}
ol{margin:1em 0 1em 2em;}
ul li,ol li{margin-top:.5em;margin-bottom:.5em;}
ul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;}
blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;}
dt{font-weight:bold;margin-left:1em;}
dd{margin-left:2em;margin-bottom:1em;}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
\ No newline at end of file
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
margin-top: 0 !important; }
body > *:last-child {
margin-bottom: 0 !important; }
a {
color: #4183C4; }
a.absent {
color: #cc0000; }
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;
text-decoration: none; }
h1 tt, h1 code {
font-size: inherit; }
h2 tt, h2 code {
font-size: inherit; }
h3 tt, h3 code {
font-size: inherit; }
h4 tt, h4 code {
font-size: inherit; }
h5 tt, h5 code {
font-size: inherit; }
h6 tt, h6 code {
font-size: inherit; }
h1 {
font-size: 28px;
color: black; }
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
h3 {
font-size: 18px; }
h4 {
font-size: 16px; }
h5 {
font-size: 14px; }
h6 {
color: #777777;
font-size: 14px; }
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0; }
hr {
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0;
}
body > h2:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0; }
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0; }
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0; }
li p.first {
display: inline-block; }
li {
margin: 0; }
ul, ol {
padding-left: 30px; }
ul :first-child, ol :first-child {
margin-top: 0; }
dl {
padding: 0; }
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
dl dt:first-child {
padding: 0; }
dl dt > :first-child {
margin-top: 0; }
dl dt > :last-child {
margin-bottom: 0; }
dl dd {
margin: 0 0 15px;
padding: 0 15px; }
dl dd > :first-child {
margin-top: 0; }
dl dd > :last-child {
margin-bottom: 0; }
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
table {
padding: 0;border-collapse: collapse; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
img {
max-width: 100%; }
span.frame {
display: block;
overflow: hidden; }
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
span.frame span img {
display: block;
float: left; }
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
span.align-center {
display: block;
overflow: hidden;
clear: both; }
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
span.align-center span img {
margin: 0 auto;
text-align: center; }
span.align-right {
display: block;
overflow: hidden;
clear: both; }
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
span.align-right span img {
margin: 0;
text-align: right; }
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
span.float-left span {
margin: 13px 0 0; }
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
code, tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px; }
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent; }
.highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre code, pre tt {
background-color: transparent;
border: none; }
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
}
/* BODY
=============================================================================*/
body {
font-family: Helvetica, arial, freesans, clean, sans-serif;
font-size: 14px;
line-height: 1.6;
color: #333;
background-color: #fff;
padding: 20px;
max-width: 960px;
margin: 0 auto;
}
body>*:first-child {
margin-top: 0 !important;
}
body>*:last-child {
margin-bottom: 0 !important;
}
/* BLOCKS
=============================================================================*/
p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}
/* HEADERS
=============================================================================*/
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}
h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}
h1 {
font-size: 28px;
color: #000;
}
h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777;
font-size: 14px;
}
body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}
/* LINKS
=============================================================================*/
a {
color: #4183C4;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* LISTS
=============================================================================*/
ul, ol {
padding-left: 30px;
}
ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}
ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}
dl {
padding: 0;
}
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}
dl dt:first-child {
padding: 0;
}
dl dt>:first-child {
margin-top: 0px;
}
dl dt>:last-child {
margin-bottom: 0px;
}
dl dd {
margin: 0 0 15px;
padding: 0 15px;
}
dl dd>:first-child {
margin-top: 0px;
}
dl dd>:last-child {
margin-bottom: 0px;
}
/* CODE
=============================================================================*/
pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}
pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
pre code, pre tt {
background-color: transparent;
border: none;
}
kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}
/* QUOTES
=============================================================================*/
blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}
blockquote>:first-child {
margin-top: 0px;
}
blockquote>:last-child {
margin-bottom: 0px;
}
/* HORIZONTAL RULES
=============================================================================*/
hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}
/* TABLES
=============================================================================*/
table th {
font-weight: bold;
}
table th, table td {
border: 1px solid #ccc;
padding: 6px 13px;
}
table tr {
border-top: 1px solid #ccc;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
/* IMAGES
=============================================================================*/
img {
max-width: 100%
}
var jquery_ztree_toc_opts = {
debug:false,
is_auto_number:true,
documment_selector:'.markdown-body',
ztreeStyle: {
width:'326px',
overflow: 'auto',
position: 'fixed',
'z-index': 2147483647,
border: '0px none',
left: '0px',
top: '0px',
// 'overflow-x': 'hidden',
'height': $(window).height() + 'px'
}
}
var markdown_panel_style = {
'width':'70%',
'margin-left':'25%'
};
\ No newline at end of file
框架说明
1、已内置基本的系统管理模块(用户,角色,菜单,资源,参数,任务,区域,操作日志)
2、本基础项目基于springboot+ mybatis + mysql + vue
3、依赖外部环境有:redis,mysql,node.js,kafka等
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
后端说明
1.拷贝maven_jar文件夹下面的包到本地maven仓库(当前框架包需手动复制到本地仓库,后期搭建maven私服仓库则可略过)
2.Mysql导入数据库,sql脚本在db目录下,导入顺序:
base.sql (必须)
base-area.sql(可选,如不要区域模块,可不导入此脚本)
3、配置本地hosts:
#编辑C:\Windows\System32\drivers\etc\hosts,添加下面本地域名映射
127.0.0.1 base.testnew.com
4、启动项目,顺序:
4.4 启动管理前台:需安装node.js环境,命令行进入iot-manager-ui目录,依次执行yarn->yarn dev
4.5 启动业务后台:(可选)运行iot-handler下HandlerApplication.java
5、浏览器访问:
http://base.testnew.com:8081/
登录:admin/admin
前端说明
....
代码生成器说明:
1.本地启动codegen.jar 启动命令(java -jar codegen.jar)
2.浏览器访问本地http://localhost:8089/codegen
3.上传文档或者链接本地数据库自动构建源码包
4.生成代码结构,
(1)结构化代码 分为web,model,service,dao,拷贝到指定工程目录
(2)sql映射文件,拷贝到resources\sqlmap目录下
(3)db,根据文档自动生成的sql脚本文件
文档例子:当前目录下的 说明文档.docx
远程代码生成器地址 http://192.168.0.251:1023/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment