diff --git a/dist/js/chunk-2d0c0a44.js b/dist/js/chunk-2d0c0a44.js index dbb2958e..8fe2792f 100644 --- a/dist/js/chunk-2d0c0a44.js +++ b/dist/js/chunk-2d0c0a44.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0a44"],{"433b":function(v,_,e){"use strict";e.r(_);var o=function(){var v=this;v._self._c;return v._m(0)},t=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("Node实例")]),_("p",[v._v("每个节点都会实例化一个"),_("code",[v._v("node")]),v._v("实例")]),_("h2",[v._v("属性")]),_("h3",[v._v("nodeData")]),_("p",[v._v("该节点对应的真实数据")]),_("h3",[v._v("uid")]),_("p",[v._v("该节点唯一的标识")]),_("h3",[v._v("isRoot")]),_("p",[v._v("是否是根节点")]),_("h3",[v._v("layerIndex")]),_("p",[v._v("节点层级")]),_("h3",[v._v("width")]),_("p",[v._v("节点的宽")]),_("h3",[v._v("height")]),_("p",[v._v("节点的高")]),_("h3",[v._v("left")]),_("p",[v._v("节点的"),_("code",[v._v("left")]),v._v("位置")]),_("h3",[v._v("top")]),_("p",[v._v("节点的"),_("code",[v._v("top")]),v._v("位置")]),_("h3",[v._v("parent")]),_("p",[v._v("节点的父节点")]),_("h3",[v._v("children")]),_("p",[v._v("节点的子节点列表")]),_("h3",[v._v("group")]),_("p",[v._v("节点是内容容器,"),_("code",[v._v("svg")]),v._v("对象")]),_("h3",[v._v("isDrag")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("节点是否正在拖拽中")]),_("h2",[v._v("方法")]),_("h3",[v._v("setGeneralizationOpacity(val)")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("ul",[_("li",[_("code",[v._v("val")]),v._v(":Number, 0-1,透明度")])]),_("p",[v._v("设置概要节点及曲线的透明度。")]),_("h3",[v._v("formatGetGeneralization()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取节点概要数据。")]),_("h3",[v._v("getIndexInBrothers()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取该节点在兄弟节点列表中的索引。")]),_("h3",[v._v("getRectInSvg()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取节点的尺寸和位置信息,宽高是应用了缩放效果后的实际宽高,位置信息相对于画布。")]),_("h3",[v._v("getRect()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("获取节点的尺寸和位置信息,宽高是应用了缩放效果后的实际宽高,位置是相对于浏览器窗口左上角的位置。")]),_("h3",[v._v("ancestorHasGeneralization()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("检查是否存在有概要的祖先节点。")]),_("h3",[v._v("getNoteContentPosition()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("获取节点备注显示位置。当节点存在备注且正在显示状态时,如果拖动或缩放会导致备注浮层和节点脱离,那么可以通过该方法获取新位置更新备注浮层。")]),_("h3",[v._v("updateNodeByActive(active)")]),_("blockquote",[_("p",[v._v("v0.8.0+")])]),_("ul",[_("li",[_("code",[v._v("active")]),v._v(":Boolean,激活状态。")])]),_("p",[v._v("根据是否激活更新节点。主要是更新节点的展开收起按钮的显示隐藏。")]),_("h3",[v._v("setOpacity(val)")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("ul",[_("li",[_("code",[v._v("val")]),v._v(":透明度,0-1")])]),_("p",[v._v("设置节点透明度,包括连接线和下级节点。")]),_("h3",[v._v("hideChildren()")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("p",[v._v("隐藏下级节点。")]),_("h3",[v._v("showChildren()")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("p",[v._v("显示下级节点。")]),_("h3",[v._v("hasCustomStyle()")]),_("blockquote",[_("p",[v._v("v0.6.2+")])]),_("p",[v._v("获取是否设置了自定义样式。")]),_("h3",[v._v("getSize()")]),_("p",[v._v("通过重新创建节点内容更新节点的宽高,返回一个布尔值,代表是否宽高发生了变化")]),_("h3",[v._v("render()")]),_("p",[v._v("递归渲染该节点及其所有子节点")]),_("h3",[v._v("updateNodeShape()")]),_("blockquote",[_("p",[v._v("v0.5.0+")])]),_("p",[v._v("更新节点形状节点。比如当节点状态改变后,调用该方法显示或取消激活样式。")]),_("h3",[v._v("remove()")]),_("p",[v._v("递归删除,只是从画布删除,节点容器还在,后续还可以重新插回画布")]),_("h3",[v._v("destroy()")]),_("blockquote",[_("p",[v._v("v0.5.0+")])]),_("p",[v._v("销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布")]),_("h3",[v._v("renderLine()")]),_("p",[v._v("重新渲染该节点到其子节点之间的连线")]),_("h3",[v._v("removeLine()")]),_("p",[v._v("移除该节点到其子节点之间的连线")]),_("h3",[v._v("renderExpandBtn()")]),_("p",[v._v("渲染展开收缩按钮的内容")]),_("h3",[v._v("removeExpandBtn()")]),_("p",[v._v("移除展开收缩按钮")]),_("h3",[v._v("getStyle(prop, root, isActive)")]),_("p",[v._v("获取某个最终应用到该节点的样式值")]),_("p",[_("code",[v._v("prop")]),v._v(":要获取的样式属性")]),_("p",[_("code",[v._v("root")]),v._v(":是否是根节点,默认"),_("code",[v._v("false")])]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃,获取的是否是激活状态的样式值,默认"),_("code",[v._v("false")])]),_("h3",[v._v("setStyle(prop, value, isActive)")]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃")]),_("p",[v._v("修改节点的某个样式,"),_("code",[v._v("SET_NODE_STYLE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setStyles(style, isActive)")]),_("blockquote",[_("p",[v._v("v0.6.12+")])]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃")]),_("p",[v._v("修改节点多个样式,"),_("code",[v._v("SET_NODE_STYLES")]),v._v("命令的快捷方法")]),_("h3",[v._v("getData(key)")]),_("p",[v._v("获取该节点真实数据"),_("code",[v._v("nodeData")]),v._v("的"),_("code",[v._v("data")]),v._v("对象里的指定值,"),_("code",[v._v("key")]),v._v("不传返回这个"),_("code",[v._v("data")]),v._v("对象")]),_("h3",[v._v("setData(data)")]),_("p",[v._v("设置节点数据,"),_("code",[v._v("SET_NODE_DATA")]),v._v("命令的快捷方法")]),_("h3",[v._v("setText(text, richText, resetRichText)")]),_("ul",[_("li",[_("p",[_("code",[v._v("richText")]),v._v(":v0.4.2+,"),_("code",[v._v("Boolean")]),v._v(",如果要设置的是富文本内容,也就是"),_("code",[v._v("html")]),v._v("字符,"),_("code",[v._v("richText")]),v._v("需要传"),_("code",[v._v("true")])])]),_("li",[_("p",[_("code",[v._v("resetRichText")]),v._v(":v0.6.10+,"),_("code",[v._v("Boolean")]),v._v(",是否要复位富文本,默认为"),_("code",[v._v("false")]),v._v(",如果传"),_("code",[v._v("true")]),v._v("那么会重置富文本节点的样式")])])]),_("p",[v._v("设置节点文本,"),_("code",[v._v("SET_NODE_TEXT")]),v._v("命令的快捷方法")]),_("h3",[v._v("setImage(imgData)")]),_("p",[v._v("设置节点图片,"),_("code",[v._v("SET_NODE_IMAGE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setIcon(icons)")]),_("p",[v._v("设置节点图标,"),_("code",[v._v("SET_NODE_ICON")]),v._v("命令的快捷方法")]),_("h3",[v._v("setHyperlink(link, title)")]),_("p",[v._v("设置节点超链接,"),_("code",[v._v("SET_NODE_HYPERLINK")]),v._v("命令的快捷方法")]),_("h3",[v._v("setNote(note)")]),_("p",[v._v("设置节点备注,"),_("code",[v._v("SET_NODE_NOTE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setTag(tag)")]),_("p",[v._v("设置节点标签,"),_("code",[v._v("SET_NODE_TAG")]),v._v("的快捷方法")]),_("h3",[v._v("hide()")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("隐藏节点及其下级节点")]),_("h3",[v._v("show()")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("显示节点及其下级节点")]),_("h3",[v._v("isParent(node)")]),_("blockquote",[_("p",[v._v("v0.1.5+:检测当前节点是否是某个节点的祖先节点")])]),_("blockquote",[_("p",[v._v("v0.8.1+:检测当前节点是否是某个节点的父节点")])]),_("h3",[v._v("isAncestor(node)")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("检测当前节点是否是某个节点的祖先节点")]),_("h3",[v._v("isBrother(node)")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("检测当前节点是否是某个节点的兄弟节点")]),_("h3",[v._v("checkHasGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查是否存在概要")]),_("h3",[v._v("checkHasSelfGeneralization()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("检查是否存在自身的概要,非子节点区间概要")]),_("h3",[v._v("hideGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("隐藏概要节点")]),_("h3",[v._v("showGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("显示概要节点")]),_("h3",[v._v("updateGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("更新概要节点")]),_("h3",[v._v("hasCustomPosition()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查节点是否存在自定义数据")]),_("h3",[v._v("ancestorHasCustomPosition()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查节点是否存在自定义位置的祖先节点")]),_("h3",[v._v("getShape()")]),_("blockquote",[_("p",[v._v("v0.2.4+")])]),_("p",[v._v("获取节点形状")]),_("h3",[v._v("setShape(shape)")]),_("blockquote",[_("p",[v._v("v0.2.4+")])]),_("p",[v._v("设置节点形状,"),_("code",[v._v("SET_NODE_SHAPE")]),v._v("命令的快捷方法")]),_("h3",[v._v("getSelfStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取节点自身的自定义样式")]),_("h3",[v._v("getParentSelfStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取最近一个存在自身自定义样式的祖先节点的自定义样式")]),_("h3",[v._v("getSelfInhertStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取自身可继承的自定义样式")])])}],p={},c=p,h=e("2877"),l=Object(h["a"])(c,o,t,!1,null,null,null);_["default"]=l.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0a44"],{"433b":function(v,_,e){"use strict";e.r(_);var o=function(){var v=this;v._self._c;return v._m(0)},t=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("Node实例")]),_("p",[v._v("每个节点都会实例化一个"),_("code",[v._v("node")]),v._v("实例")]),_("h2",[v._v("属性")]),_("h3",[v._v("nodeData")]),_("p",[v._v("该节点对应的真实数据")]),_("h3",[v._v("uid")]),_("p",[v._v("该节点唯一的标识")]),_("h3",[v._v("isRoot")]),_("p",[v._v("是否是根节点")]),_("h3",[v._v("layerIndex")]),_("p",[v._v("节点层级")]),_("h3",[v._v("width")]),_("p",[v._v("节点的宽")]),_("h3",[v._v("height")]),_("p",[v._v("节点的高")]),_("h3",[v._v("left")]),_("p",[v._v("节点的"),_("code",[v._v("left")]),v._v("位置")]),_("h3",[v._v("top")]),_("p",[v._v("节点的"),_("code",[v._v("top")]),v._v("位置")]),_("h3",[v._v("parent")]),_("p",[v._v("节点的父节点")]),_("h3",[v._v("children")]),_("p",[v._v("节点的子节点列表")]),_("h3",[v._v("group")]),_("p",[v._v("节点是内容容器,"),_("code",[v._v("svg")]),v._v("对象")]),_("h3",[v._v("isDrag")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("节点是否正在拖拽中")]),_("h2",[v._v("方法")]),_("h3",[v._v("getPureData(removeActiveState = true, removeId = false)")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("ul",[_("li",[_("p",[_("code",[v._v("removeActiveState")]),v._v(":是否移除节点的激活状态")])]),_("li",[_("p",[_("code",[v._v("removeId")]),v._v(":是否移除节点的uid字段")])])]),_("p",[v._v("序列化节点,获取该节点的纯数据,不包含对节点实例的引用。")]),_("h3",[v._v("setGeneralizationOpacity(val)")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("ul",[_("li",[_("code",[v._v("val")]),v._v(":Number, 0-1,透明度")])]),_("p",[v._v("设置概要节点及曲线的透明度。")]),_("h3",[v._v("formatGetGeneralization()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取节点概要数据。")]),_("h3",[v._v("getIndexInBrothers()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取该节点在兄弟节点列表中的索引。")]),_("h3",[v._v("getRectInSvg()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("获取节点的尺寸和位置信息,宽高是应用了缩放效果后的实际宽高,位置信息相对于画布。")]),_("h3",[v._v("getRect()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("获取节点的尺寸和位置信息,宽高是应用了缩放效果后的实际宽高,位置是相对于浏览器窗口左上角的位置。")]),_("h3",[v._v("ancestorHasGeneralization()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("检查是否存在有概要的祖先节点。")]),_("h3",[v._v("getNoteContentPosition()")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("获取节点备注显示位置。当节点存在备注且正在显示状态时,如果拖动或缩放会导致备注浮层和节点脱离,那么可以通过该方法获取新位置更新备注浮层。")]),_("h3",[v._v("updateNodeByActive(active)")]),_("blockquote",[_("p",[v._v("v0.8.0+")])]),_("ul",[_("li",[_("code",[v._v("active")]),v._v(":Boolean,激活状态。")])]),_("p",[v._v("根据是否激活更新节点。主要是更新节点的展开收起按钮的显示隐藏。")]),_("h3",[v._v("setOpacity(val)")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("ul",[_("li",[_("code",[v._v("val")]),v._v(":透明度,0-1")])]),_("p",[v._v("设置节点透明度,包括连接线和下级节点。")]),_("h3",[v._v("hideChildren()")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("p",[v._v("隐藏下级节点。")]),_("h3",[v._v("showChildren()")]),_("blockquote",[_("p",[v._v("v0.7.2+")])]),_("p",[v._v("显示下级节点。")]),_("h3",[v._v("hasCustomStyle()")]),_("blockquote",[_("p",[v._v("v0.6.2+")])]),_("p",[v._v("获取是否设置了自定义样式。")]),_("h3",[v._v("getSize()")]),_("p",[v._v("通过重新创建节点内容更新节点的宽高,返回一个布尔值,代表是否宽高发生了变化")]),_("h3",[v._v("render()")]),_("p",[v._v("递归渲染该节点及其所有子节点")]),_("h3",[v._v("updateNodeShape()")]),_("blockquote",[_("p",[v._v("v0.5.0+")])]),_("p",[v._v("更新节点形状节点。比如当节点状态改变后,调用该方法显示或取消激活样式。")]),_("h3",[v._v("remove()")]),_("p",[v._v("递归删除,只是从画布删除,节点容器还在,后续还可以重新插回画布")]),_("h3",[v._v("destroy()")]),_("blockquote",[_("p",[v._v("v0.5.0+")])]),_("p",[v._v("销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布")]),_("h3",[v._v("renderLine()")]),_("p",[v._v("重新渲染该节点到其子节点之间的连线")]),_("h3",[v._v("removeLine()")]),_("p",[v._v("移除该节点到其子节点之间的连线")]),_("h3",[v._v("renderExpandBtn()")]),_("p",[v._v("渲染展开收缩按钮的内容")]),_("h3",[v._v("removeExpandBtn()")]),_("p",[v._v("移除展开收缩按钮")]),_("h3",[v._v("getStyle(prop, root, isActive)")]),_("p",[v._v("获取某个最终应用到该节点的样式值")]),_("p",[_("code",[v._v("prop")]),v._v(":要获取的样式属性")]),_("p",[_("code",[v._v("root")]),v._v(":是否是根节点,默认"),_("code",[v._v("false")])]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃,获取的是否是激活状态的样式值,默认"),_("code",[v._v("false")])]),_("h3",[v._v("setStyle(prop, value, isActive)")]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃")]),_("p",[v._v("修改节点的某个样式,"),_("code",[v._v("SET_NODE_STYLE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setStyles(style, isActive)")]),_("blockquote",[_("p",[v._v("v0.6.12+")])]),_("p",[_("code",[v._v("isActive")]),v._v(":v0.7.0+已废弃")]),_("p",[v._v("修改节点多个样式,"),_("code",[v._v("SET_NODE_STYLES")]),v._v("命令的快捷方法")]),_("h3",[v._v("getData(key)")]),_("p",[v._v("获取该节点真实数据"),_("code",[v._v("nodeData")]),v._v("的"),_("code",[v._v("data")]),v._v("对象里的指定值,"),_("code",[v._v("key")]),v._v("不传返回这个"),_("code",[v._v("data")]),v._v("对象")]),_("h3",[v._v("setData(data)")]),_("p",[v._v("设置节点数据,"),_("code",[v._v("SET_NODE_DATA")]),v._v("命令的快捷方法")]),_("h3",[v._v("setText(text, richText, resetRichText)")]),_("ul",[_("li",[_("p",[_("code",[v._v("richText")]),v._v(":v0.4.2+,"),_("code",[v._v("Boolean")]),v._v(",如果要设置的是富文本内容,也就是"),_("code",[v._v("html")]),v._v("字符,"),_("code",[v._v("richText")]),v._v("需要传"),_("code",[v._v("true")])])]),_("li",[_("p",[_("code",[v._v("resetRichText")]),v._v(":v0.6.10+,"),_("code",[v._v("Boolean")]),v._v(",是否要复位富文本,默认为"),_("code",[v._v("false")]),v._v(",如果传"),_("code",[v._v("true")]),v._v("那么会重置富文本节点的样式")])])]),_("p",[v._v("设置节点文本,"),_("code",[v._v("SET_NODE_TEXT")]),v._v("命令的快捷方法")]),_("h3",[v._v("setImage(imgData)")]),_("p",[v._v("设置节点图片,"),_("code",[v._v("SET_NODE_IMAGE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setIcon(icons)")]),_("p",[v._v("设置节点图标,"),_("code",[v._v("SET_NODE_ICON")]),v._v("命令的快捷方法")]),_("h3",[v._v("setHyperlink(link, title)")]),_("p",[v._v("设置节点超链接,"),_("code",[v._v("SET_NODE_HYPERLINK")]),v._v("命令的快捷方法")]),_("h3",[v._v("setNote(note)")]),_("p",[v._v("设置节点备注,"),_("code",[v._v("SET_NODE_NOTE")]),v._v("命令的快捷方法")]),_("h3",[v._v("setTag(tag)")]),_("p",[v._v("设置节点标签,"),_("code",[v._v("SET_NODE_TAG")]),v._v("的快捷方法")]),_("h3",[v._v("hide()")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("隐藏节点及其下级节点")]),_("h3",[v._v("show()")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("显示节点及其下级节点")]),_("h3",[v._v("isParent(node)")]),_("blockquote",[_("p",[v._v("v0.1.5+:检测当前节点是否是某个节点的祖先节点")])]),_("blockquote",[_("p",[v._v("v0.8.1+:检测当前节点是否是某个节点的父节点")])]),_("h3",[v._v("isAncestor(node)")]),_("blockquote",[_("p",[v._v("v0.8.1+")])]),_("p",[v._v("检测当前节点是否是某个节点的祖先节点")]),_("h3",[v._v("isBrother(node)")]),_("blockquote",[_("p",[v._v("v0.1.5+")])]),_("p",[v._v("检测当前节点是否是某个节点的兄弟节点")]),_("h3",[v._v("checkHasGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查是否存在概要")]),_("h3",[v._v("checkHasSelfGeneralization()")]),_("blockquote",[_("p",[v._v("v0.9.0+")])]),_("p",[v._v("检查是否存在自身的概要,非子节点区间概要")]),_("h3",[v._v("hideGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("隐藏概要节点")]),_("h3",[v._v("showGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("显示概要节点")]),_("h3",[v._v("updateGeneralization()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("更新概要节点")]),_("h3",[v._v("hasCustomPosition()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查节点是否存在自定义数据")]),_("h3",[v._v("ancestorHasCustomPosition()")]),_("blockquote",[_("p",[v._v("v0.2.0+")])]),_("p",[v._v("检查节点是否存在自定义位置的祖先节点")]),_("h3",[v._v("getShape()")]),_("blockquote",[_("p",[v._v("v0.2.4+")])]),_("p",[v._v("获取节点形状")]),_("h3",[v._v("setShape(shape)")]),_("blockquote",[_("p",[v._v("v0.2.4+")])]),_("p",[v._v("设置节点形状,"),_("code",[v._v("SET_NODE_SHAPE")]),v._v("命令的快捷方法")]),_("h3",[v._v("getSelfStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取节点自身的自定义样式")]),_("h3",[v._v("getParentSelfStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取最近一个存在自身自定义样式的祖先节点的自定义样式")]),_("h3",[v._v("getSelfInhertStyle(prop)")]),_("blockquote",[_("p",[v._v("v0.2.5+")])]),_("p",[v._v("获取自身可继承的自定义样式")])])}],p={},c=p,h=e("2877"),l=Object(h["a"])(c,o,t,!1,null,null,null);_["default"]=l.exports}}]); \ No newline at end of file diff --git a/dist/js/chunk-2d0f026c.js b/dist/js/chunk-2d0f026c.js index 9581037d..9d14c214 100644 --- a/dist/js/chunk-2d0f026c.js +++ b/dist/js/chunk-2d0f026c.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f026c"],{"9ac1":function(v,_,p){"use strict";p.r(_);var o=function(){var v=this;v._self._c;return v._m(0)},e=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("Changelog")]),_("h2",[v._v("0.9.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复自定义节点内容时导出图片、svg、pdf报错的问题。")]),_("p",[v._v("2.优化节点激活事件的派发,激活节点未改变时不派发事件,短时间派发多次事件时跳过中间事件。")]),_("p",[v._v("3.修复节点处于编辑状态时,通过鼠标滚动移动画布后编辑框和节点脱离的问题。")]),_("p",[v._v("4.修复在节点编辑状态中通过鼠标滚轮缩放画布再退出节点编辑后快捷键失效的问题。")]),_("p",[v._v("5.修复点击节点也会触发node_dragend事件的问题。")]),_("p",[v._v("6.修复不在格式刷时点击画布和节点也会触发painter_end事件的问题。")]),_("p",[v._v("7.修复在节点文本编辑中和关联线文本编辑中时销毁思维导图文本编辑框未被销毁的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.按住Ctrl键时禁用节点双击事件。")]),_("p",[v._v("2.支持配置创建新节点时的行为:聚焦且进入编辑、不聚焦、只聚焦。")]),_("p",[v._v("3.只读模式下搜索时给当前匹配到的节点增加高亮效果。")]),_("p",[v._v("4.鼠标滚轮行为默认改为上下移动画布;默认改为向前滚动放大画布,向后缩小。")]),_("p",[v._v("5.在鼠标滚轮行为为上下移动画布时,支持按住Ctrl键进行放大缩小画布。")])]),_("p",[v._v("Demo:支持配置创建新节点时的行为。")]),_("h2",[v._v("0.9.0")]),_("p",[v._v("新增:")]),_("p",[v._v("1.支持对同一个节点的部分子节点添加概要。")]),_("p",[v._v("2.鼠标移入概要会高亮其所属节点。")]),_("p",[v._v("3.导入和导出xmind文件支持处理概要。")]),_("h2",[v._v("0.8.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复历史记录数据中概要节点的激活状态未被删除的问题,会导致点击概要节点时触发data_change事件。")]),_("p",[v._v("2.修复在safari浏览器中运行时,页面空白且控制台抛出异常的问题。")]),_("p",[v._v("3.修复缩放画布时图标浮层和备注浮层和节点脱离的问题。")]),_("p",[v._v("4.修复只读模式下可以全选节点的问题。")]),_("p",[v._v("5.修复富文本模式下节点内容存在 时导出为图片出错的问题。")]),_("p",[v._v("6.修复先给自身添加概要,再给下级添加概要会出现概要重叠的问题;修复同时给存在上下级关系的节点添加概要时概要重叠的问题。")]),_("p",[v._v("7.修复节点数量很多的情况下导出pdf报错的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增禁止拖动画布的配置选项。")]),_("p",[v._v("2.新增禁止双指缩放画布的配置选项。")]),_("p",[v._v("3.导出png的方法新增压缩参数;优化大数据量节点导出pdf时体积过大的问题。")]),_("p",[v._v("4.将节点实例的isParent方法改名为isAncestor,同时新增isParent方法。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复只读模式下仍旧可以搜索替换和编辑大纲的问题。")]),_("p",[v._v("2.修复节点内容为html标签时大纲无法显示和编辑的问题。")]),_("p",[v._v("3.修复同时选中多个节点添加图标时,所有节点图标都会统一为第一个节点的图标的问题。")]),_("p",[v._v("4.导出操作增加loading。")])]),_("h2",[v._v("0.8.0-fix.1")]),_("p",[v._v("修复:修复直接粘贴的方式创建新节点时如果粘贴的内容带有<>等html标签符号时新创建的节点内容为空的问题。")]),_("h2",[v._v("0.8.0")]),_("p",[v._v("破坏性更新:大幅优化部分代码,小幅提升性能,主要是"),_("code",[v._v("render")]),v._v("类,删除无用逻辑、调整不合理的实现、提取重复代码;修改函数名称、函数功能等。")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复导出图片和svg时关联线的箭头消失的问题。")]),_("p",[v._v("2.修复调整容器大小后回到根节点的操作异常的问题。")]),_("p",[v._v("3.修复插入概要、上移、下移、一键整理布局的快捷键操作没有触发data_change事件的问题。")]),_("p",[v._v("4.修复存在水印时导出图片、svg、pdf时每个节点都会显示边框的问题。")]),_("p",[v._v("5.修复容器尺寸改变后没有水印没有重新绘制的问题。")]),_("p",[v._v("6.修复存在水印时小地图渲染非常慢的问题。")]),_("p",[v._v("7.修复协同插件当创建新节点时新节点未显示创建人头像的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.优化画布DOM结构,将节点、连线、关联线分层渲染。")]),_("p",[v._v("2.优化水印插件。")]),_("p",[v._v("3.setTheme、setThemeConfig、setLayout函数增加不触发重新渲染的参数。")]),_("p",[v._v("4.新增插入父节点的命令。")]),_("p",[v._v("5.新增仅删除当前节点的命令。")]),_("p",[v._v("6.插入概要时自动展开子节点。")]),_("p",[v._v("7.鼠标右键单击画布时清除当前激活节点。")]),_("p",[v._v("8.被收起的激活节点同步从激活节点列表里删除。")]),_("p",[v._v("9.粘贴带换行的文本支持控制是否按换行分割节点。")]),_("p",[v._v("10.小地图插件支持返回图片类型的小地图。")]),_("p",[v._v("11.指定时间内只允许添加一次历史记录,避免添加没有必要的中间状态。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修改回到根节点的方法及文案。")]),_("p",[v._v("2.修复覆盖方式切换主题时第一次切换不生效的问题。")]),_("p",[v._v("3.右键菜单新增插入父节点和仅删除当前节点的功能。")]),_("p",[v._v("4.顶部工具栏支持根据窗口宽度自动收起到更多中。")]),_("p",[v._v("5.支持手动输入缩放倍数。")]),_("p",[v._v("6.完善界面英文翻译。")]),_("p",[v._v("7.小地图改为通过图片渲染。")])]),_("h2",[v._v("0.7.3-fix.2")]),_("p",[v._v("修复协同编辑的一些问题:")]),_("p",[v._v("1.插入同级节点时新节点位置不正确;")]),_("p",[v._v("2.在同级节点中移动位置没有触发更新;")]),_("p",[v._v("3.移动节点作为兄弟节点插入时位置不正确;")]),_("h2",[v._v("0.7.3-fix.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复一些情况下多选节点时的框选区域没有消失的问题。")]),_("p",[v._v("2.修复多选节点时在节点上松开鼠标时框选区域不会消失的问题。")]),_("p",[v._v("3.修复多次粘贴节点时由于节点uid重复造成的渲染异常问题。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.超链接输入框增加协议选择功能。")])]),_("h2",[v._v("0.7.3")]),_("p",[v._v("新增:1.新增协同编辑插件。")]),_("p",[v._v("Demo:1.修复公式侧边栏组件导致的侧边栏自动关闭问题。")]),_("h2",[v._v("0.7.2")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复多选节点时选区未包含节点边界时节点不会被选中的问题。")]),_("p",[v._v("2.修复节点文本不为字符串时报错的问题。")]),_("p",[v._v("3.修复非富文本模式下文本中存在<>&字符时再次编辑时部分文本会消失的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.支持插入数学公式。")]),_("p",[v._v("2.支持同时拖拽移动多个节点。")]),_("p",[v._v("3.支持同时复制、剪切多个节点。")]),_("p",[v._v("4.节点标签颜色改为根据标签内容生成,即同样的标签内容会生成相同的颜色。")]),_("p",[v._v("5.优化子节点的插入:1.同时对多个节点插入子节点时,不进入编辑状态;2.新插入的子节点自动进入激活状态。")]),_("p",[v._v("6.优化兄弟节点的插入:1.支持同时对多个节点插入兄弟节点;2.对根节点调用插入兄弟节点的命令时不再创建子节点。")]),_("p",[v._v("7.新增同时插入多个同级节点、多个子节点的命令。")]),_("p",[v._v("8.将节点唯一标识由id全部改为uid,主要影响关联线,之前版本的关联线可能无法正常显示。")]),_("p",[v._v("9.优化图标合并逻辑,支持扩展库内部分类下的图标。")]),_("p",[v._v("10.关联线:1.双击关联线进入关联线文本编辑模式;2.关联线文本为默认文本的话不保存;3.存在激活节点时点击关联线可直接激活关联线。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复复制知犀思维导图多个节点时无法粘贴的问题。")]),_("p",[v._v("2.新增公式编辑的侧边栏。")])]),_("h2",[v._v("0.7.1-fix.2")]),_("p",[v._v("修复:1.修复插件注册方法链式调用报错的问题。")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增思维导图初次加载时适应画布大小的配置选项。")]),_("p",[v._v("2.新增自动生成dts声明文件的命令。")])]),_("h2",[v._v("0.7.1-fix.1")]),_("p",[v._v("修复:修复拖拽节点时没有排除被拖拽节点的下级节点的问题。")]),_("h2",[v._v("0.7.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复关联线端点改变后未保存的问题。")]),_("p",[v._v("2.修复画布左上角距浏览器窗口不为0时多选节点鼠标移动到边缘时画布滚动异常的问题。")]),_("p",[v._v("3.修复导入存在为标题为空的节点的xmind文件报错的问题。")]),_("p",[v._v("4.修复导出的xmind文件在最新版xmind软件上打开时提示已损坏的问题。")]),_("p",[v._v("5.修复导出带有贴纸的数据为xmind格式时贴纸无法显示的问题。")]),_("p",[v._v("6.修复没有注册select插件时节点右键事件报错的问题。")]),_("p",[v._v("7.修复注册插件的方法没有去重的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.重构节点拖拽逻辑:优化一些情况下的拖拽难问题、适配各种结构、拖拽时鼠标移动到画布边缘时画布自动移动。")]),_("p",[v._v("2.重构滚动条插件,优化使用体验。")]),_("p",[v._v("3.不完美的解决逻辑结构图、思维导图、目录组织图、组织结构图概要和节点的冲突问题(概要后面应该会重写或删除)。")]),_("p",[v._v("4.删除节点后激活相邻节点。")]),_("p",[v._v("5.节点数据data中以_开头的字段被认为是自定义字段。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.页面增加显示当前核心库版本号。")])]),_("h2",[v._v("0.7.0")]),_("p",[v._v("破坏性更新:删除了主题文件中节点激活样式的部分,不再支持设置节点的激活样式,激活效果改为统一的节点外边框样式,同时支持鼠标hover效果。")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复节点边框尺寸比较大的情况下的的渲染异常问题。")]),_("p",[v._v("2.修复切换主题时存在关联线的节点样式不会更新的问题。")]),_("p",[v._v("3.修复全选没有触发node_active事件的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.收起节点时,显示折叠的节点数量。")]),_("p",[v._v("2.支持关联线端点的位置跟随鼠标拖拽变化。")]),_("p",[v._v("3.新增滚动条插件。")]),_("p",[v._v("4.支持在url中通过fileURL查询参数打开指定的在线文件。")]),_("p",[v._v("5.鱼骨图支持设置节点margin。")]),_("p",[v._v("6.默认关闭双击复位画布。")]),_("p",[v._v("7.修改导出图片方法的参数,导出pdf时如果思维导图尺寸小于a4纸那么不旋转方向。")]),_("p",[v._v("8.提升导出的图片和pdf在高清屏的清晰度。")]),_("p",[v._v("9.插件新增销毁前生命周期函数,解决销毁思维导图时插件的一些副作用没有清除的问题。")]),_("p",[v._v("10.优化基础样式的设置,修改不影响大小的主题属性时不触发全量渲染。")]),_("p",[v._v("11.右键多选节点结束时禁止触发节点右键菜单事件,避免触发右键菜单显示。")]),_("p",[v._v("12.优化Select插件,如果多选节点没有变化,那么不触发激活激活事件。")]),_("p",[v._v("13.node_active事件抛出的激活节点列表不再直接引用内部激活列表。")]),_("p",[v._v("14.优化鼠标按下节点事件逻辑,在右键拖拽画布模式下支持右键按住根节点拖拽画布。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.不直接引用内部激活节点列表,优化性能。")]),_("p",[v._v("2.支持配置是否显示滚动条。")]),_("p",[v._v("3.删除侧边栏节点样式配置部分的激活节点配置。")])]),_("h2",[v._v("0.6.17")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复导入百度脑图导出的xmind文件报错的问题。")]),_("p",[v._v("2.修复mindMap.export方法代码错误。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增index.d.ts。")]),_("p",[v._v("2.支持配置是否开启双击复位思维导图。")]),_("p",[v._v("3.拦截富文本编辑时的粘贴操作,去掉格式,只允许粘贴纯文本。")])]),_("h2",[v._v("0.6.16")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.优化富文本测量元素的逻辑,删除样式的重复设置和节点的重复添加。")]),_("p",[v._v("2.优化导出图片逻辑,遍历节点转换图片的url时,如果已经是data:URL形式不重复处理。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.去除导出svg方法的第二个参数,改为通过实例化配置。")]),_("p",[v._v("2.导出图片不再使用外部库。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复单独编辑大纲时能给根节点添加兄弟节点的bug。")])]),_("h2",[v._v("0.6.15-fix.2")]),_("p",[v._v("修复:修复在Firefox浏览器中富文本节点无法显示的问题。")]),_("h2",[v._v("0.6.15-fix.1")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.导出pdf支持根据图片大小分页导出。")]),_("p",[v._v("2.导出pdf支持根据长宽比自动调整方向。")]),_("p",[v._v("3.优化展开收起按钮的占位元素:1.没有子节点的节点不渲染该元素;2.根据是否存在子节点动态更新该元素。")]),_("p",[v._v("4.新增禁止鼠标滚轮缩放的配置。")]),_("p",[v._v("5.支持传递错误处理函数。")])]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复节点文本为空时显示异常问题。")]),_("p",[v._v("2.导出svg的图形的paddingX和paddingY改为单侧padding。")]),_("p",[v._v("3.修复画布距浏览器窗口左上角不为0时鼠标缩放时不以鼠标为中心的问题。")]),_("p",[v._v("4.修复节点边框会重合的问题。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.右下角支持跳转相关链接。")]),_("p",[v._v("2.调整小地图位置,解决被侧边按钮遮挡的问题。")]),_("p",[v._v("3.修复打开本地文件右上角的提示无法关闭的问题。")]),_("p",[v._v("4.单独编辑大纲不再和画布联动,优化大数据量下的编辑体验。")]),_("p",[v._v("5.侧边栏涉及图形的选项增加可视化效果。")])]),_("h2",[v._v("0.6.14")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.去除创建隐藏输入框,通过navigator.clipboard实现复制粘贴;支持跨浏览器粘贴思维导图节点数据;支持自定义处理剪贴板中的文本数据。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复开启输入自动进入文本编辑模式和其他输入框冲突的问题。")]),_("p",[v._v("2.修复无法在节点图片弹窗里删除节点图片的问题。")]),_("p",[v._v("3.修复在节点样式侧边栏里无法去除节点的文本修饰线样式的问题。")]),_("p",[v._v("4.颜色选择器支持选择透明颜色。")]),_("p",[v._v("5.修复基础样式侧边栏打开状态下,导入思维导图数据后侧边栏数据未更新的问题。")]),_("p",[v._v("6.修复大纲修改一个节点的文本后再点击其他节点时不聚焦的问题。")]),_("p",[v._v("7.修复退出禅模式后左下角的节点和字数统计未更新的问题。")]),_("p",[v._v("8.支持从右键菜单删除节点的超链接、备注。")]),_("p",[v._v("9.支持粘贴知犀思维导图的节点数据。")])]),_("h2",[v._v("0.6.13")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复只读模式下鼠标中键按住节点无法拖动画布的问题。")]),_("p",[v._v("2.修复快速拖动节点几次后会概率性报错的问题。")]),_("p",[v._v("3.修复在移动端激活节点、展开收起时等操作时会拉起输入法的问题。")]),_("p",[v._v("4.修复主题配置中背景图片为none时会发起一个异常请求的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.移动端手势缩放优化: 按线性关系进行缩放、双指位移可以调整画布位置。")]),_("p",[v._v("2.去掉异步渲染节点的逻辑,提升创建新节点的速度。")]),_("p",[v._v("3.导出图片由html2canvas库改为使用dom-to-image-more库,解决导出富文本节点文字样式丢失的问题。")]),_("p",[v._v("4.非富文本输入框进入编辑状态时取消默认全选。")]),_("p",[v._v("5.存在一个激活节点时,支持按下中文、数字、英文按键时自动进入文本编辑模式。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.保存视图数据时增加防抖操作,优化性能。")]),_("p",[v._v("2.一些耗时的操作添加loading效果。")]),_("p",[v._v("3.完善右键菜单和富文本工具条的暗黑模式。")])]),_("h2",[v._v("0.6.12")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复当思维导图全部移出可视区域后小地图中的指示器也会移出小地图区域的问题。")]),_("p",[v._v("2.修复移动端双指缩放过于灵敏的问题。")]),_("p",[v._v("3.修复只读模式下按住节点无法拖动画布的问题。")]),_("p",[v._v("4.修复当思维导图距浏览器窗口左上角不为0时,小地图渲染不正确的问题。")]),_("p",[v._v("5.修复移动节点时新位置的提示块过大的问题。")]),_("p",[v._v("6.修复搜索不能替换为空字符的问题。")]),_("p",[v._v("7.修复富文本模式下,搜索替换后换行会丢失的问题。")]),_("p",[v._v("8.修复大纲里点击文字编辑时输入框焦点丢失的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.节点移动结束事件(node_dragend)增加回调参数,可以获取到移动到节点的uid。")]),_("p",[v._v("2.支持通过配置指定内部一些元素添加到的位置。")]),_("p",[v._v("3.支持格式刷功能。")]),_("p",[v._v("4.曲线风格下,根节点的连接线样式支持和其他节点保持一致。")]),_("p",[v._v("5.搜索支持连续替换。")]),_("p",[v._v("6.节点图片新增删除按钮。")]),_("p",[v._v("7.支持按住鼠标中键拖动画布。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.提供应用接管模式,方便对接自己的存储服务;支持运行时设置静态资源路径。")]),_("p",[v._v("2.重构大纲:1.不再使用节点自带的文本样式;2.支持全屏编辑大纲;3.大纲支持拖拽移动节点;4.大纲支持删除节点。")]),_("p",[v._v("3.修复导入数据场景下界面暗黑模式没有更新的问题。")])]),_("h2",[v._v("0.6.11-fix.1")]),_("p",[v._v("修复:1.修复节点文字为白色时编辑的时候看不见的问题。")]),_("h2",[v._v("0.6.11")]),_("p",[v._v("新增:1.优化小地图,去除小地图内的节点内容,优化性能。")]),_("p",[v._v("Demo:1.新增主题、主题列表新增tab区分。 2.节点图片上传支持输入网络图片地址。 3.节点图片上传支持输入网络图片。")]),_("h2",[v._v("0.6.10")]),_("p",[v._v("修复:1.修复搜索定位到某个节点后删除该节点,再次搜索时搜索结果未更新的问题。 2.修复调整图片大小的按钮在节点操作后没有更新的问题。 3.修复内部数据深拷贝位置不正确的问题。 4.修复富文本节点换行不生效的问题。 5.修复切换主题等场景时节点换行会丢失的问题。")]),_("p",[v._v("新增:1.搜索支持搜索空白字符和替换为空白字符。")]),_("p",[v._v("Demo:1.支持通过图标按钮调出搜索。 2.支持通过图标按钮切换暗黑模式。 3.优化搜索:鼠标不在搜索区域内不聚焦,解决鼠标不在搜索区域内无法删除输入的文字的问题。 4.调整添加节点图标的界面UI,新增系列节点图标。 5.新增贴纸列表。 6.修复在搜索框回车后输入框焦点丢失的问题。 7.支持点击节点内的图标显示一个图标快捷替换和删除悬浮面板。")]),_("h2",[v._v("0.6.9-fix.1")]),_("p",[v._v("修复:1.修复搜索进行一次单个替换后再全部替换不正确的问题。")]),_("p",[v._v("新增:1.不会再直接修改传入的data对象,内部会深拷贝一份。")]),_("h2",[v._v("0.6.9")]),_("p",[v._v("修复:1.修复给概要节点设置样式概要节点会消失的问题。2.修复自定义节点内容时,二次创建根实例时节点内容不渲染的问题。3.修复节点处于编辑中时添加新节点时新节点的焦点丢失问题。 2.修复连续按tab键无法连续创建子节点的问题。")]),_("p",[v._v("新增:1.导出svg时替换svg中存在的"),_("code",[v._v(" ")]),v._v("字符,避免导出的svg报错。 2.支持搜索和替换。")]),_("p",[v._v("Demo:1.切换主题时支持选择是否覆盖设置过的基础样式。")]),_("h2",[v._v("0.6.8")]),_("p",[v._v("修复:1.修改插入概要的快捷键为Ctrl+G,避免和保存快捷键冲突。 2.修复节点正在编辑时切换富文本编辑配置输入框出现异常的问题。")]),_("p",[v._v("新增:1.修改复制、剪切、粘贴逻辑,支持粘贴剪切板中的数据。")]),_("p",[v._v("Demo:1.修复基础样式-设置节点外边距未保存的问题。 2.支持根据主题自动切换为暗黑模式。")]),_("h2",[v._v("0.6.7")]),_("p",[v._v("修复:1.修复节点收起再展开后展开收起按钮占位元素丢失的问题。 2.修复只读模式下可以缩放图片的问题。")]),_("p",[v._v("新增:1.支持根据节点实例或节点uid定位到某个节点。 2.修改节点uid的创建方式,导出数据添加节点的uid。")]),_("p",[v._v("移除:1.移除节点过渡效果。")]),_("p",[v._v("Demo:1.添加网站首页。 2.修复大纲里创建新节点时节点样式丢失的问题。 3.修复大纲里编辑节点后按回车或Tab键后编辑文本丢失的问题。 4.优化大纲的节点定位,被收起的节点会自动展开。 5.侧边栏按钮支持收起。 6.优化小屏适配。")]),_("h2",[v._v("0.6.6")]),_("p",[v._v("新增:1.支持导出为Xmind新版文件。2.导入Xmind新版文件支持导入节点中的图片。 3.新增竖向时间轴结构。")]),_("p",[v._v("修复:1.TouchEvent插件不再派发click事件,解决移动端点击超链接会打开两个窗口的问题。 2.修复拖拽移动一个节点成为另一个节点的子节点时该节点的父节点指向未更新的问题。 3.修复二级节点拖拽成三级节点时节点边框样式未更新的问题。 4.修复向右生长的结构外其他结构鼠标移入展开收起按钮位置时不会触发按钮显示的问题。")]),_("p",[v._v("优化:1.优化触控板缩放画布时幅度过大的问题。2.刚创建的节点默认全选方便删除默认文本。")]),_("h2",[v._v("0.6.5-fix.1")]),_("p",[v._v("修复:1.修复在缩放情况下调整图片大小不正确的问题。")]),_("h2",[v._v("0.6.5")]),_("p",[v._v("修复:1.修复xmind文件导入报错的问题。 2.修复极少数情况下当节点文本的宽度为小数时显示发生换行的问题。")]),_("p",[v._v("新增:1.打包后的库支持获取内置常量、主题等数据。 2.支持配置鼠标滚轮方向对应的缩放行为。 3.节点图片支持拖拽调整大小。")]),_("h2",[v._v("0.6.4-fix.1")]),_("p",[v._v("新增:1.鼠标滚轮缩放时默认以鼠标当前位置为中心进行缩放,可以通过配置关闭该特性。")]),_("p",[v._v("修复:1.修复改变了画布大小后缩放中心点默认值不随之更新的问题。")]),_("h2",[v._v("0.6.4")]),_("p",[v._v("新增:1.默认以画布中心点进行缩放。 2.优化移动端双指缩放,以双指中心位置为中心点进行缩放。")]),_("h2",[v._v("0.6.3")]),_("p",[v._v("修复:1.修复概要节点会响应插入节点快捷键的问题。")]),_("p",[v._v("新增:1.支持自定义节点内容。")]),_("h2",[v._v("0.6.2")]),_("p",[v._v("修复:1.修复富文本模式下,新建节点不随主题变化而变化的问题。")]),_("h2",[v._v("0.6.1")]),_("p",[v._v("修复:1.修复将鼠标滚动改为移动画布行为后,使用触控板操作时移动灵敏度过高的问题。")]),_("h2",[v._v("0.6.0-fix.1")]),_("p",[v._v("修复:1.修复没有设置过背景样式的情况下销毁思维导图报错的问题。")]),_("h2",[v._v("0.6.0")]),_("p",[v._v("破坏性更新:调整了simple-mind-map源码的目录结构,主要影响:1.插件的引入路径需要修改。2.constant文件路径需要修改。")]),_("p",[v._v("新增:1.支持一键缩放至适应画布功能。 2.按住Ctrl键多选功能可通过配置按需开启。 3.支持设置为左键多选节点,右键拖动画布。 4.支持控制节点是否允许编辑。 5.新增销毁思维导图的方法。 6.新增触摸事件支持插件。")]),_("p",[v._v("修复:1.修复按住ctrl键多选节点时不会触发节点的click事件的问题。 2.修复清空一个节点后再输入文字时节点样式丢失的问题。")]),_("h2",[v._v("0.5.11")]),_("p",[v._v("新增:支持关联性文本编辑。")]),_("p",[v._v("优化:优化主题配置更新,改变不涉及节点大小的配置不触发节点重新计算。")]),_("h2",[v._v("0.5.10")]),_("p",[v._v("新增:使用LRU缓存算法优化节点复用逻辑。")]),_("h2",[v._v("0.5.10-fix.1")]),_("p",[v._v("修复:修复导入出错的问题。")]),_("h2",[v._v("0.5.10-fix.2")]),_("p",[v._v("修复:修复富文本模式下,切换主题、导入数据后没有触发数据改变的问题。")]),_("p",[v._v("新增:新增三种主题。")]),_("h2",[v._v("0.5.9")]),_("p",[v._v("修改:统一导出方法的格式,使用"),_("code",[v._v("FileReader")]),v._v("代替"),_("code",[v._v("URL.createObjectURL")]),v._v("转换"),_("code",[v._v("blob")]),v._v("数据。")]),_("h2",[v._v("0.5.8")]),_("p",[v._v("优化:1.节点位置没有变化不触发位置设置。 2.展开收起状态没有变化不触发按钮更新。")]),_("p",[v._v("新增:1.默认改为鼠标移上节点才显示展开收起按钮。 2.支持扩展节点可插入的图标列表。")]),_("h2",[v._v("0.5.7")]),_("p",[v._v("破坏性更新:富文本模式下导出png改为使用html2canvas转换整个svg,大幅提高导出速度,不过html2canvas存在一个bug,foreignObject元素中的dom节点内联的文字颜色无法识别,所以导出节点的文字颜色是固定的,不过相对于之前的导出基本不可用状态,目前至少能快速顺利的导出。")]),_("p",[v._v("优化:优化富文本节点编辑体验。")]),_("p",[v._v("新增:富文本模式下,导入数据、初始化数据、切换主题场景节点样式支持跟随主题变化。")]),_("h2",[v._v("0.5.6")]),_("p",[v._v("修复:1.修复短时间快速多次渲染时节点位置错乱的问题。 2.修复节点正在编辑中时拖动画布导致编辑框和节点分离的问题。")]),_("p",[v._v("新增:1.添加最大历史记录数限制。")]),_("h2",[v._v("0.5.5")]),_("p",[v._v("新增:1.支持配置导出为png、svg、pdf时的内边距。 2.支持配置节点文本编辑框、节点备注浮层元素的z-index。 3.支持点击画布外的区域结束节点编辑状态。")]),_("h2",[v._v("0.5.5-fix.1")]),_("p",[v._v("修复:1.修复节点在画布外编辑时编辑框也在画布外的问题。 2.修改结构后复位变换,防止存在缩放时切换结构后第一次拖动时会发生位置突变的问题。")]),_("p",[v._v("优化:1.节点多选时只要节点和选区存在交叉即认为被选中。")]),_("h2",[v._v("0.5.5-fix.2")]),_("p",[v._v("修复:1.修复小地图报错。")]),_("h2",[v._v("0.5.4")]),_("p",[v._v("新增:1.添加新主题。 2.新增时间轴和鱼骨结构。")]),_("p",[v._v("修复:1.修复节点右键和画布右键的冲突问题。 2.修复组织结构图、目录组织图等节点拖拽时存在线段未隐藏的bug。")]),_("p",[v._v("优化:1.优化组织结构图布局。2.优化目录组织图布局。")]),_("h2",[v._v("0.5.4-fix.1")]),_("p",[v._v("优化:1.优化鱼骨图布局。")]),_("h2",[v._v("0.5.3")]),_("p",[v._v("修复:1.修复富文本模式下,如果选择了多个节点时设置文本样式,会将所有多选节点的文本改成最后一个多选节点的文本的问题。")]),_("p",[v._v("新增:1.支持设置初始中心节点的位置。")]),_("h3",[v._v("0.5.3-fix.1")]),_("p",[v._v("修复:1.修复设置初始中心节点的位置不生效的问题。")]),_("h3",[v._v("0.5.3-fix.2")]),_("p",[v._v("修复:1.修复导出为图片时,节点中的图片显示不出来的问题。")]),_("h2",[v._v("0.5.2")]),_("p",[v._v("修复:1.导出的"),_("code",[v._v("json")]),v._v("数据中去除"),_("code",[v._v("uid")]),v._v(";2.重新渲染时清空节点缓存池。")]),_("h2",[v._v("0.5.1")]),_("p",[v._v("优化:1.只有当鼠标在画布内才响应快捷键事件。")]),_("p",[v._v("修复:1.修复快速操作时节点位置不正确的问题。")]),_("h2",[v._v("0.5.0")]),_("p",[v._v("这个版本主要是代码层面的改动和优化,核心是为了提升渲染性能,减少卡顿问题。")]),_("p",[v._v("新增:1.支持自定义展开收起节点图标和颜色;")]),_("p",[v._v("优化:1.优化渲染逻辑,设置主题、前进回退等操作不再全量渲染;")]),_("pre",[_("code",[v._v(" 2.优化节点拖拽逻辑,修复无法拖动到两个节点之间的问题;\n\n 3.收起全部节点操作增加回到中心点的逻辑;\n\n 4.修复短时间多次触发渲染造成节点乱飞和错乱的问题;\n\n 5.优化节点编辑的体验;\n")])]),_("p",[v._v("修复:1.修复setData方法不触发历史记录的问题;")]),_("p",[v._v("修改:从0.5.0版本开始,考虑性能问题,节点激活状态只能修改形状相关的样式:")]),_("pre",{staticClass:"hljs"},[_("code",[v._v("[\n "),_("span",{staticClass:"hljs-string"},[v._v("'fillColor'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderColor'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderWidth'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderDasharray'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderRadius'")]),v._v("\n]\n")])]),_("h2",[v._v("0.4.7")]),_("p",[v._v("优化:1.富文本编辑时初始聚焦时不再默认全选;2.富文本编辑时使用节点填充色作为背景色,避免节点颜色为白色时看不见。 3.节点激活状态切换不再触发历史记录。 4.短时间多次触发历史记录,只会添加最后一次的数据。 5.优化历史记录添加,当有回退时,再次添加新记录时删除当前指针后面的历史数据。")]),_("p",[v._v("新增:1.支持导入和导出Markdown格式文件。 2.支持配置插入节点时的初始文字。 3.扩展插入节点和删除节点的命令,支持指定节点。")]),_("h2",[v._v("0.4.6")]),_("p",[v._v("新增:1.关联线支持调整控制点。")]),_("p",[v._v("优化:1.添加历史数据时过滤和上一次相比没有改变的数据。")]),_("p",[v._v("修复:1.修复节点编辑时方向键和方向键导航功能的冲突问题。 2.修复拖拽移动节点时节点id的丢失问题,这会导致关联线丢失。")]),_("h2",[v._v("0.4.5")]),_("p",[v._v("新增:1.支持关联线。 2.按住根节点也可以拖动画布。3.按住ctrl键可以调整多选节点。")]),_("h2",[v._v("0.4.4")]),_("p",[v._v("新增:支持响应鼠标的横向滚动。")]),_("h2",[v._v("0.4.3")]),_("p",[v._v("修复:前进回退后没有触发"),_("code",[v._v("data_change")]),v._v("事件的问题。")]),_("p",[v._v("新增:支持自定义鼠标滚轮事件;鼠标滚轮调整为支持缩放视图和上下移动视图。")]),_("h2",[v._v("0.4.2")]),_("p",[v._v("新增:"),_("code",[v._v("Node")]),v._v("类的"),_("code",[v._v("setText")]),v._v("方法增加第二个参数,以支持设置富文本内容。")]),_("h2",[v._v("0.4.1")]),_("p",[v._v("新增:1.新增抛出节点鼠标移入和移除事件;2.节点富文本支持设置背景颜色;3.节点富文本支持清除样式。")]),_("p",[v._v("修复:1.Mac系统触控板缩放相反的问题;2.设备window.devicePixelRatio不为1时,当存在富文本节点时导出的图片中富文本节点尺寸会变大的问题。")]),_("h2",[v._v("0.4.0")]),_("p",[v._v("新增:节点支持富文本编辑。")]),_("h2",[v._v("0.3.4")]),_("p",[v._v("新增:节点文本增加自动换行功能。")]),_("p",[v._v("修复:1.修复批量删除的节点中如果存在根节点会出现删除异常的问题。2.修复底边风格的情况下,节点高度过高会和其他节点重叠的问题。")]),_("h2",[v._v("0.3.3")]),_("p",[v._v("修复:根节点文字无法换行的问题。")]),_("h2",[v._v("0.3.2")]),_("p",[v._v("修复:1.修复二级节点拖拽到其他节点或其他节点拖拽到二级节点时节点样式没有更新的问题;2.修复当思维导图实际内容大于屏幕宽高时,导出的时候超出的部分没有绘制水印的问题。")]),_("h2",[v._v("0.3.1")]),_("p",[v._v("修复:1.删除背景图片不生效的问题;2.节点拖拽到根节点时连接线跑到根节点上方的问题。")]),_("p",[v._v("新增:背景图片展示增加位置和大小设置。导出的图片也同步支持该设置。")]),_("h2",[v._v("0.3.0")]),_("p",[v._v("升级为插件化架构,将一些非核心功能抽离出来作为插件,按需注册,减小整体体积。")]),_("h2",[v._v("0.2.24")]),_("p",[v._v("新增:节点自由拖拽改为可配置,默认为"),_("code",[v._v("false")]),v._v("不开启;支持添加水印。")]),_("h2",[v._v("0.2.23")]),_("p",[v._v("新增:支持注册新主题。")]),_("h2",[v._v("0.2.22")]),_("p",[v._v("优化:取消内置"),_("code",[v._v("simple-mind-map")]),v._v("包的主题和结构图片,改为由使用者自行维护,原有图片可在"),_("code",[v._v("web/assets/img/")]),v._v("目录找到。")]),_("h2",[v._v("0.2.21")]),_("p",[v._v("新增:支持节点横线风格。")]),_("h2",[v._v("0.2.20")]),_("p",[v._v("修复:画布距窗口左上角不为0时节点拖拽出现偏移的问题。")]),_("h2",[v._v("0.2.19")]),_("p",[v._v("修复:没有激活节点时随便按什么键都会触发自动聚焦的问题。")]),_("h2",[v._v("0.2.18")]),_("p",[v._v("优化:键盘导航寻找焦点的算法,支持简单算法、区域算法、阴影算法。")]),_("h2",[v._v("0.2.17")]),_("p",[v._v("新增:键盘导航,即通过方向键来切换激活的节点;支持在大纲直接编辑节点文本内容。")]),_("h2",[v._v("0.2.16")]),_("p",[v._v("优化:小地图、拖拽性能。")]),_("h2",[v._v("0.2.15")]),_("p",[v._v("优化:本地文件编辑。")]),_("p",[v._v("新增:支持双击节点内图片进行大图预览。")]),_("h2",[v._v("0.2.14")]),_("p",[v._v("优化:插入子节点时自动展开。")]),_("p",[v._v("修复:小地图关闭时报错的问题。")]),_("h2",[v._v("0.2.13")]),_("p",[v._v("修复:子节点收起状态复制时丢失的问题。")]),_("h2",[v._v("0.2.11")]),_("p",[v._v("修复:修复子节点收起状态复制时丢失的问题。")]),_("p",[v._v("新增:支持小地图。")]),_("h2",[v._v("0.2.10")]),_("p",[v._v("优化:手动创建节点时立即聚焦。")]),_("p",[v._v("修复:连线样式深度更新问题。")]),_("p",[v._v("新增:逻辑结构图、思维导图新增直线连接风格、直连风格。")]),_("h2",[v._v("0.2.9")]),_("p",[v._v("新增:支持新建、打开、保存到电脑本地文件。")]),_("h2",[v._v("0.2.8")]),_("p",[v._v("修复:xmind8版本文件导入失败的问题。")]),_("p",[v._v("新增:支持展开到指定层级。")]),_("h2",[v._v("0.2.7")]),_("p",[v._v("修复:根节点添加多个节点爆栈的问题。")]),_("p",[v._v("新增:支持导入.xmind文件。")]),_("h2",[v._v("0.2.6")]),_("p",[v._v("新增:导出svg增加title标签。")]),_("h2",[v._v("0.2.5")]),_("p",[v._v("修复:节点展开收起的bug。")]),_("p",[v._v("新增:节点支持自定义线条样式。")]),_("h2",[v._v("0.2.4")]),_("p",[v._v("新增:节点支持多种形状。")]),_("h2",[v._v("0.2.3")]),_("p",[v._v("修复:编辑节点文本时快捷键冲突的问题;右键菜单快捷键提示错误;右键菜单快捷键提示。")]),_("h2",[v._v("0.2.2")]),_("p",[v._v("修复:输入字符串'/'和快捷键'/'冲突问题。")]),_("h2",[v._v("0.2.1")]),_("p",[v._v("新增:支持导出为pdf。")]),_("h2",[v._v("0.2.0")]),_("p",[v._v("新增:经典4主题;支持添加概要;支持自由拖拽;上移节点、下移节点、复制节点、剪切节点、粘贴节点、一键整理布快捷键;库打包;Ctrl+左键多选。")]),_("h2",[v._v("0.1.18")]),_("p",[v._v("修复:节点图标不能删除的问题;工具按钮置灰仍然可以点击的问题。")]),_("h2",[v._v("0.1.17")]),_("p",[v._v("新增:增加只读模式。")]),_("h2",[v._v("0.1.16")]),_("p",[v._v("新增:节点备注支持markdown及富文本。")]),_("p",[v._v("修复:不能选中文字的问题;节点标注在节点激活后无法隐藏问题;超链接、备注、标签等文字编辑时返回键和回车键与思维导图快捷键冲突的问题。")]),_("h2",[v._v("0.1.15")]),_("p",[v._v("新增:状态数据支持保存激活状态、视图状态(拖动位置、缩放值);支持节点拖拽。")]),_("h2",[v._v("0.1.14")]),_("p",[v._v("修复:存在激活节点时设置主题存在的问题。")]),_("h2",[v._v("0.1.13")]),_("p",[v._v("新增:快捷键功能;新增导出为json。")]),_("p",[v._v("优化:一些细节。")]),_("h2",[v._v("0.1.12")]),_("p",[v._v("新增:本地存储;右键菜单功能等。")]),_("h2",[v._v("0.1.0")]),_("p",[v._v("完成基本功能。")])])}],h={},t=h,i=p("2877"),n=Object(i["a"])(t,o,e,!1,null,null,null);_["default"]=n.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0f026c"],{"9ac1":function(v,_,p){"use strict";p.r(_);var o=function(){var v=this;v._self._c;return v._m(0)},e=[function(){var v=this,_=v._self._c;return _("div",[_("h1",[v._v("Changelog")]),_("h2",[v._v("0.9.1-fix.1")]),_("p",[v._v("修复:")]),_("p",[v._v("1.修复自定义节点方法返回null时报错的问题。")]),_("p",[v._v("2.修复导出pdf文件体积很大的问题。")]),_("h2",[v._v("0.9.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复自定义节点内容时导出图片、svg、pdf报错的问题。")]),_("p",[v._v("2.优化节点激活事件的派发,激活节点未改变时不派发事件,短时间派发多次事件时跳过中间事件。")]),_("p",[v._v("3.修复节点处于编辑状态时,通过鼠标滚动移动画布后编辑框和节点脱离的问题。")]),_("p",[v._v("4.修复在节点编辑状态中通过鼠标滚轮缩放画布再退出节点编辑后快捷键失效的问题。")]),_("p",[v._v("5.修复点击节点也会触发node_dragend事件的问题。")]),_("p",[v._v("6.修复不在格式刷时点击画布和节点也会触发painter_end事件的问题。")]),_("p",[v._v("7.修复在节点文本编辑中和关联线文本编辑中时销毁思维导图文本编辑框未被销毁的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.按住Ctrl键时禁用节点双击事件。")]),_("p",[v._v("2.支持配置创建新节点时的行为:聚焦且进入编辑、不聚焦、只聚焦。")]),_("p",[v._v("3.只读模式下搜索时给当前匹配到的节点增加高亮效果。")]),_("p",[v._v("4.鼠标滚轮行为默认改为上下移动画布;默认改为向前滚动放大画布,向后缩小。")]),_("p",[v._v("5.在鼠标滚轮行为为上下移动画布时,支持按住Ctrl键进行放大缩小画布。")])]),_("p",[v._v("Demo:支持配置创建新节点时的行为。")]),_("h2",[v._v("0.9.0")]),_("p",[v._v("新增:")]),_("p",[v._v("1.支持对同一个节点的部分子节点添加概要。")]),_("p",[v._v("2.鼠标移入概要会高亮其所属节点。")]),_("p",[v._v("3.导入和导出xmind文件支持处理概要。")]),_("h2",[v._v("0.8.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复历史记录数据中概要节点的激活状态未被删除的问题,会导致点击概要节点时触发data_change事件。")]),_("p",[v._v("2.修复在safari浏览器中运行时,页面空白且控制台抛出异常的问题。")]),_("p",[v._v("3.修复缩放画布时图标浮层和备注浮层和节点脱离的问题。")]),_("p",[v._v("4.修复只读模式下可以全选节点的问题。")]),_("p",[v._v("5.修复富文本模式下节点内容存在 时导出为图片出错的问题。")]),_("p",[v._v("6.修复先给自身添加概要,再给下级添加概要会出现概要重叠的问题;修复同时给存在上下级关系的节点添加概要时概要重叠的问题。")]),_("p",[v._v("7.修复节点数量很多的情况下导出pdf报错的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增禁止拖动画布的配置选项。")]),_("p",[v._v("2.新增禁止双指缩放画布的配置选项。")]),_("p",[v._v("3.导出png的方法新增压缩参数;优化大数据量节点导出pdf时体积过大的问题。")]),_("p",[v._v("4.将节点实例的isParent方法改名为isAncestor,同时新增isParent方法。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复只读模式下仍旧可以搜索替换和编辑大纲的问题。")]),_("p",[v._v("2.修复节点内容为html标签时大纲无法显示和编辑的问题。")]),_("p",[v._v("3.修复同时选中多个节点添加图标时,所有节点图标都会统一为第一个节点的图标的问题。")]),_("p",[v._v("4.导出操作增加loading。")])]),_("h2",[v._v("0.8.0-fix.1")]),_("p",[v._v("修复:修复直接粘贴的方式创建新节点时如果粘贴的内容带有<>等html标签符号时新创建的节点内容为空的问题。")]),_("h2",[v._v("0.8.0")]),_("p",[v._v("破坏性更新:大幅优化部分代码,小幅提升性能,主要是"),_("code",[v._v("render")]),v._v("类,删除无用逻辑、调整不合理的实现、提取重复代码;修改函数名称、函数功能等。")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复导出图片和svg时关联线的箭头消失的问题。")]),_("p",[v._v("2.修复调整容器大小后回到根节点的操作异常的问题。")]),_("p",[v._v("3.修复插入概要、上移、下移、一键整理布局的快捷键操作没有触发data_change事件的问题。")]),_("p",[v._v("4.修复存在水印时导出图片、svg、pdf时每个节点都会显示边框的问题。")]),_("p",[v._v("5.修复容器尺寸改变后没有水印没有重新绘制的问题。")]),_("p",[v._v("6.修复存在水印时小地图渲染非常慢的问题。")]),_("p",[v._v("7.修复协同插件当创建新节点时新节点未显示创建人头像的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.优化画布DOM结构,将节点、连线、关联线分层渲染。")]),_("p",[v._v("2.优化水印插件。")]),_("p",[v._v("3.setTheme、setThemeConfig、setLayout函数增加不触发重新渲染的参数。")]),_("p",[v._v("4.新增插入父节点的命令。")]),_("p",[v._v("5.新增仅删除当前节点的命令。")]),_("p",[v._v("6.插入概要时自动展开子节点。")]),_("p",[v._v("7.鼠标右键单击画布时清除当前激活节点。")]),_("p",[v._v("8.被收起的激活节点同步从激活节点列表里删除。")]),_("p",[v._v("9.粘贴带换行的文本支持控制是否按换行分割节点。")]),_("p",[v._v("10.小地图插件支持返回图片类型的小地图。")]),_("p",[v._v("11.指定时间内只允许添加一次历史记录,避免添加没有必要的中间状态。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修改回到根节点的方法及文案。")]),_("p",[v._v("2.修复覆盖方式切换主题时第一次切换不生效的问题。")]),_("p",[v._v("3.右键菜单新增插入父节点和仅删除当前节点的功能。")]),_("p",[v._v("4.顶部工具栏支持根据窗口宽度自动收起到更多中。")]),_("p",[v._v("5.支持手动输入缩放倍数。")]),_("p",[v._v("6.完善界面英文翻译。")]),_("p",[v._v("7.小地图改为通过图片渲染。")])]),_("h2",[v._v("0.7.3-fix.2")]),_("p",[v._v("修复协同编辑的一些问题:")]),_("p",[v._v("1.插入同级节点时新节点位置不正确;")]),_("p",[v._v("2.在同级节点中移动位置没有触发更新;")]),_("p",[v._v("3.移动节点作为兄弟节点插入时位置不正确;")]),_("h2",[v._v("0.7.3-fix.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复一些情况下多选节点时的框选区域没有消失的问题。")]),_("p",[v._v("2.修复多选节点时在节点上松开鼠标时框选区域不会消失的问题。")]),_("p",[v._v("3.修复多次粘贴节点时由于节点uid重复造成的渲染异常问题。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.超链接输入框增加协议选择功能。")])]),_("h2",[v._v("0.7.3")]),_("p",[v._v("新增:1.新增协同编辑插件。")]),_("p",[v._v("Demo:1.修复公式侧边栏组件导致的侧边栏自动关闭问题。")]),_("h2",[v._v("0.7.2")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复多选节点时选区未包含节点边界时节点不会被选中的问题。")]),_("p",[v._v("2.修复节点文本不为字符串时报错的问题。")]),_("p",[v._v("3.修复非富文本模式下文本中存在<>&字符时再次编辑时部分文本会消失的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.支持插入数学公式。")]),_("p",[v._v("2.支持同时拖拽移动多个节点。")]),_("p",[v._v("3.支持同时复制、剪切多个节点。")]),_("p",[v._v("4.节点标签颜色改为根据标签内容生成,即同样的标签内容会生成相同的颜色。")]),_("p",[v._v("5.优化子节点的插入:1.同时对多个节点插入子节点时,不进入编辑状态;2.新插入的子节点自动进入激活状态。")]),_("p",[v._v("6.优化兄弟节点的插入:1.支持同时对多个节点插入兄弟节点;2.对根节点调用插入兄弟节点的命令时不再创建子节点。")]),_("p",[v._v("7.新增同时插入多个同级节点、多个子节点的命令。")]),_("p",[v._v("8.将节点唯一标识由id全部改为uid,主要影响关联线,之前版本的关联线可能无法正常显示。")]),_("p",[v._v("9.优化图标合并逻辑,支持扩展库内部分类下的图标。")]),_("p",[v._v("10.关联线:1.双击关联线进入关联线文本编辑模式;2.关联线文本为默认文本的话不保存;3.存在激活节点时点击关联线可直接激活关联线。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复复制知犀思维导图多个节点时无法粘贴的问题。")]),_("p",[v._v("2.新增公式编辑的侧边栏。")])]),_("h2",[v._v("0.7.1-fix.2")]),_("p",[v._v("修复:1.修复插件注册方法链式调用报错的问题。")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增思维导图初次加载时适应画布大小的配置选项。")]),_("p",[v._v("2.新增自动生成dts声明文件的命令。")])]),_("h2",[v._v("0.7.1-fix.1")]),_("p",[v._v("修复:修复拖拽节点时没有排除被拖拽节点的下级节点的问题。")]),_("h2",[v._v("0.7.1")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复关联线端点改变后未保存的问题。")]),_("p",[v._v("2.修复画布左上角距浏览器窗口不为0时多选节点鼠标移动到边缘时画布滚动异常的问题。")]),_("p",[v._v("3.修复导入存在为标题为空的节点的xmind文件报错的问题。")]),_("p",[v._v("4.修复导出的xmind文件在最新版xmind软件上打开时提示已损坏的问题。")]),_("p",[v._v("5.修复导出带有贴纸的数据为xmind格式时贴纸无法显示的问题。")]),_("p",[v._v("6.修复没有注册select插件时节点右键事件报错的问题。")]),_("p",[v._v("7.修复注册插件的方法没有去重的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.重构节点拖拽逻辑:优化一些情况下的拖拽难问题、适配各种结构、拖拽时鼠标移动到画布边缘时画布自动移动。")]),_("p",[v._v("2.重构滚动条插件,优化使用体验。")]),_("p",[v._v("3.不完美的解决逻辑结构图、思维导图、目录组织图、组织结构图概要和节点的冲突问题(概要后面应该会重写或删除)。")]),_("p",[v._v("4.删除节点后激活相邻节点。")]),_("p",[v._v("5.节点数据data中以_开头的字段被认为是自定义字段。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.页面增加显示当前核心库版本号。")])]),_("h2",[v._v("0.7.0")]),_("p",[v._v("破坏性更新:删除了主题文件中节点激活样式的部分,不再支持设置节点的激活样式,激活效果改为统一的节点外边框样式,同时支持鼠标hover效果。")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复节点边框尺寸比较大的情况下的的渲染异常问题。")]),_("p",[v._v("2.修复切换主题时存在关联线的节点样式不会更新的问题。")]),_("p",[v._v("3.修复全选没有触发node_active事件的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.收起节点时,显示折叠的节点数量。")]),_("p",[v._v("2.支持关联线端点的位置跟随鼠标拖拽变化。")]),_("p",[v._v("3.新增滚动条插件。")]),_("p",[v._v("4.支持在url中通过fileURL查询参数打开指定的在线文件。")]),_("p",[v._v("5.鱼骨图支持设置节点margin。")]),_("p",[v._v("6.默认关闭双击复位画布。")]),_("p",[v._v("7.修改导出图片方法的参数,导出pdf时如果思维导图尺寸小于a4纸那么不旋转方向。")]),_("p",[v._v("8.提升导出的图片和pdf在高清屏的清晰度。")]),_("p",[v._v("9.插件新增销毁前生命周期函数,解决销毁思维导图时插件的一些副作用没有清除的问题。")]),_("p",[v._v("10.优化基础样式的设置,修改不影响大小的主题属性时不触发全量渲染。")]),_("p",[v._v("11.右键多选节点结束时禁止触发节点右键菜单事件,避免触发右键菜单显示。")]),_("p",[v._v("12.优化Select插件,如果多选节点没有变化,那么不触发激活激活事件。")]),_("p",[v._v("13.node_active事件抛出的激活节点列表不再直接引用内部激活列表。")]),_("p",[v._v("14.优化鼠标按下节点事件逻辑,在右键拖拽画布模式下支持右键按住根节点拖拽画布。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.不直接引用内部激活节点列表,优化性能。")]),_("p",[v._v("2.支持配置是否显示滚动条。")]),_("p",[v._v("3.删除侧边栏节点样式配置部分的激活节点配置。")])]),_("h2",[v._v("0.6.17")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复导入百度脑图导出的xmind文件报错的问题。")]),_("p",[v._v("2.修复mindMap.export方法代码错误。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.新增index.d.ts。")]),_("p",[v._v("2.支持配置是否开启双击复位思维导图。")]),_("p",[v._v("3.拦截富文本编辑时的粘贴操作,去掉格式,只允许粘贴纯文本。")])]),_("h2",[v._v("0.6.16")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.优化富文本测量元素的逻辑,删除样式的重复设置和节点的重复添加。")]),_("p",[v._v("2.优化导出图片逻辑,遍历节点转换图片的url时,如果已经是data:URL形式不重复处理。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.去除导出svg方法的第二个参数,改为通过实例化配置。")]),_("p",[v._v("2.导出图片不再使用外部库。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复单独编辑大纲时能给根节点添加兄弟节点的bug。")])]),_("h2",[v._v("0.6.15-fix.2")]),_("p",[v._v("修复:修复在Firefox浏览器中富文本节点无法显示的问题。")]),_("h2",[v._v("0.6.15-fix.1")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.导出pdf支持根据图片大小分页导出。")]),_("p",[v._v("2.导出pdf支持根据长宽比自动调整方向。")]),_("p",[v._v("3.优化展开收起按钮的占位元素:1.没有子节点的节点不渲染该元素;2.根据是否存在子节点动态更新该元素。")]),_("p",[v._v("4.新增禁止鼠标滚轮缩放的配置。")]),_("p",[v._v("5.支持传递错误处理函数。")])]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复节点文本为空时显示异常问题。")]),_("p",[v._v("2.导出svg的图形的paddingX和paddingY改为单侧padding。")]),_("p",[v._v("3.修复画布距浏览器窗口左上角不为0时鼠标缩放时不以鼠标为中心的问题。")]),_("p",[v._v("4.修复节点边框会重合的问题。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.右下角支持跳转相关链接。")]),_("p",[v._v("2.调整小地图位置,解决被侧边按钮遮挡的问题。")]),_("p",[v._v("3.修复打开本地文件右上角的提示无法关闭的问题。")]),_("p",[v._v("4.单独编辑大纲不再和画布联动,优化大数据量下的编辑体验。")]),_("p",[v._v("5.侧边栏涉及图形的选项增加可视化效果。")])]),_("h2",[v._v("0.6.14")]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.去除创建隐藏输入框,通过navigator.clipboard实现复制粘贴;支持跨浏览器粘贴思维导图节点数据;支持自定义处理剪贴板中的文本数据。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.修复开启输入自动进入文本编辑模式和其他输入框冲突的问题。")]),_("p",[v._v("2.修复无法在节点图片弹窗里删除节点图片的问题。")]),_("p",[v._v("3.修复在节点样式侧边栏里无法去除节点的文本修饰线样式的问题。")]),_("p",[v._v("4.颜色选择器支持选择透明颜色。")]),_("p",[v._v("5.修复基础样式侧边栏打开状态下,导入思维导图数据后侧边栏数据未更新的问题。")]),_("p",[v._v("6.修复大纲修改一个节点的文本后再点击其他节点时不聚焦的问题。")]),_("p",[v._v("7.修复退出禅模式后左下角的节点和字数统计未更新的问题。")]),_("p",[v._v("8.支持从右键菜单删除节点的超链接、备注。")]),_("p",[v._v("9.支持粘贴知犀思维导图的节点数据。")])]),_("h2",[v._v("0.6.13")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复只读模式下鼠标中键按住节点无法拖动画布的问题。")]),_("p",[v._v("2.修复快速拖动节点几次后会概率性报错的问题。")]),_("p",[v._v("3.修复在移动端激活节点、展开收起时等操作时会拉起输入法的问题。")]),_("p",[v._v("4.修复主题配置中背景图片为none时会发起一个异常请求的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.移动端手势缩放优化: 按线性关系进行缩放、双指位移可以调整画布位置。")]),_("p",[v._v("2.去掉异步渲染节点的逻辑,提升创建新节点的速度。")]),_("p",[v._v("3.导出图片由html2canvas库改为使用dom-to-image-more库,解决导出富文本节点文字样式丢失的问题。")]),_("p",[v._v("4.非富文本输入框进入编辑状态时取消默认全选。")]),_("p",[v._v("5.存在一个激活节点时,支持按下中文、数字、英文按键时自动进入文本编辑模式。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.保存视图数据时增加防抖操作,优化性能。")]),_("p",[v._v("2.一些耗时的操作添加loading效果。")]),_("p",[v._v("3.完善右键菜单和富文本工具条的暗黑模式。")])]),_("h2",[v._v("0.6.12")]),_("p",[v._v("修复:")]),_("blockquote",[_("p",[v._v("1.修复当思维导图全部移出可视区域后小地图中的指示器也会移出小地图区域的问题。")]),_("p",[v._v("2.修复移动端双指缩放过于灵敏的问题。")]),_("p",[v._v("3.修复只读模式下按住节点无法拖动画布的问题。")]),_("p",[v._v("4.修复当思维导图距浏览器窗口左上角不为0时,小地图渲染不正确的问题。")]),_("p",[v._v("5.修复移动节点时新位置的提示块过大的问题。")]),_("p",[v._v("6.修复搜索不能替换为空字符的问题。")]),_("p",[v._v("7.修复富文本模式下,搜索替换后换行会丢失的问题。")]),_("p",[v._v("8.修复大纲里点击文字编辑时输入框焦点丢失的问题。")])]),_("p",[v._v("新增:")]),_("blockquote",[_("p",[v._v("1.节点移动结束事件(node_dragend)增加回调参数,可以获取到移动到节点的uid。")]),_("p",[v._v("2.支持通过配置指定内部一些元素添加到的位置。")]),_("p",[v._v("3.支持格式刷功能。")]),_("p",[v._v("4.曲线风格下,根节点的连接线样式支持和其他节点保持一致。")]),_("p",[v._v("5.搜索支持连续替换。")]),_("p",[v._v("6.节点图片新增删除按钮。")]),_("p",[v._v("7.支持按住鼠标中键拖动画布。")])]),_("p",[v._v("Demo:")]),_("blockquote",[_("p",[v._v("1.提供应用接管模式,方便对接自己的存储服务;支持运行时设置静态资源路径。")]),_("p",[v._v("2.重构大纲:1.不再使用节点自带的文本样式;2.支持全屏编辑大纲;3.大纲支持拖拽移动节点;4.大纲支持删除节点。")]),_("p",[v._v("3.修复导入数据场景下界面暗黑模式没有更新的问题。")])]),_("h2",[v._v("0.6.11-fix.1")]),_("p",[v._v("修复:1.修复节点文字为白色时编辑的时候看不见的问题。")]),_("h2",[v._v("0.6.11")]),_("p",[v._v("新增:1.优化小地图,去除小地图内的节点内容,优化性能。")]),_("p",[v._v("Demo:1.新增主题、主题列表新增tab区分。 2.节点图片上传支持输入网络图片地址。 3.节点图片上传支持输入网络图片。")]),_("h2",[v._v("0.6.10")]),_("p",[v._v("修复:1.修复搜索定位到某个节点后删除该节点,再次搜索时搜索结果未更新的问题。 2.修复调整图片大小的按钮在节点操作后没有更新的问题。 3.修复内部数据深拷贝位置不正确的问题。 4.修复富文本节点换行不生效的问题。 5.修复切换主题等场景时节点换行会丢失的问题。")]),_("p",[v._v("新增:1.搜索支持搜索空白字符和替换为空白字符。")]),_("p",[v._v("Demo:1.支持通过图标按钮调出搜索。 2.支持通过图标按钮切换暗黑模式。 3.优化搜索:鼠标不在搜索区域内不聚焦,解决鼠标不在搜索区域内无法删除输入的文字的问题。 4.调整添加节点图标的界面UI,新增系列节点图标。 5.新增贴纸列表。 6.修复在搜索框回车后输入框焦点丢失的问题。 7.支持点击节点内的图标显示一个图标快捷替换和删除悬浮面板。")]),_("h2",[v._v("0.6.9-fix.1")]),_("p",[v._v("修复:1.修复搜索进行一次单个替换后再全部替换不正确的问题。")]),_("p",[v._v("新增:1.不会再直接修改传入的data对象,内部会深拷贝一份。")]),_("h2",[v._v("0.6.9")]),_("p",[v._v("修复:1.修复给概要节点设置样式概要节点会消失的问题。2.修复自定义节点内容时,二次创建根实例时节点内容不渲染的问题。3.修复节点处于编辑中时添加新节点时新节点的焦点丢失问题。 2.修复连续按tab键无法连续创建子节点的问题。")]),_("p",[v._v("新增:1.导出svg时替换svg中存在的"),_("code",[v._v(" ")]),v._v("字符,避免导出的svg报错。 2.支持搜索和替换。")]),_("p",[v._v("Demo:1.切换主题时支持选择是否覆盖设置过的基础样式。")]),_("h2",[v._v("0.6.8")]),_("p",[v._v("修复:1.修改插入概要的快捷键为Ctrl+G,避免和保存快捷键冲突。 2.修复节点正在编辑时切换富文本编辑配置输入框出现异常的问题。")]),_("p",[v._v("新增:1.修改复制、剪切、粘贴逻辑,支持粘贴剪切板中的数据。")]),_("p",[v._v("Demo:1.修复基础样式-设置节点外边距未保存的问题。 2.支持根据主题自动切换为暗黑模式。")]),_("h2",[v._v("0.6.7")]),_("p",[v._v("修复:1.修复节点收起再展开后展开收起按钮占位元素丢失的问题。 2.修复只读模式下可以缩放图片的问题。")]),_("p",[v._v("新增:1.支持根据节点实例或节点uid定位到某个节点。 2.修改节点uid的创建方式,导出数据添加节点的uid。")]),_("p",[v._v("移除:1.移除节点过渡效果。")]),_("p",[v._v("Demo:1.添加网站首页。 2.修复大纲里创建新节点时节点样式丢失的问题。 3.修复大纲里编辑节点后按回车或Tab键后编辑文本丢失的问题。 4.优化大纲的节点定位,被收起的节点会自动展开。 5.侧边栏按钮支持收起。 6.优化小屏适配。")]),_("h2",[v._v("0.6.6")]),_("p",[v._v("新增:1.支持导出为Xmind新版文件。2.导入Xmind新版文件支持导入节点中的图片。 3.新增竖向时间轴结构。")]),_("p",[v._v("修复:1.TouchEvent插件不再派发click事件,解决移动端点击超链接会打开两个窗口的问题。 2.修复拖拽移动一个节点成为另一个节点的子节点时该节点的父节点指向未更新的问题。 3.修复二级节点拖拽成三级节点时节点边框样式未更新的问题。 4.修复向右生长的结构外其他结构鼠标移入展开收起按钮位置时不会触发按钮显示的问题。")]),_("p",[v._v("优化:1.优化触控板缩放画布时幅度过大的问题。2.刚创建的节点默认全选方便删除默认文本。")]),_("h2",[v._v("0.6.5-fix.1")]),_("p",[v._v("修复:1.修复在缩放情况下调整图片大小不正确的问题。")]),_("h2",[v._v("0.6.5")]),_("p",[v._v("修复:1.修复xmind文件导入报错的问题。 2.修复极少数情况下当节点文本的宽度为小数时显示发生换行的问题。")]),_("p",[v._v("新增:1.打包后的库支持获取内置常量、主题等数据。 2.支持配置鼠标滚轮方向对应的缩放行为。 3.节点图片支持拖拽调整大小。")]),_("h2",[v._v("0.6.4-fix.1")]),_("p",[v._v("新增:1.鼠标滚轮缩放时默认以鼠标当前位置为中心进行缩放,可以通过配置关闭该特性。")]),_("p",[v._v("修复:1.修复改变了画布大小后缩放中心点默认值不随之更新的问题。")]),_("h2",[v._v("0.6.4")]),_("p",[v._v("新增:1.默认以画布中心点进行缩放。 2.优化移动端双指缩放,以双指中心位置为中心点进行缩放。")]),_("h2",[v._v("0.6.3")]),_("p",[v._v("修复:1.修复概要节点会响应插入节点快捷键的问题。")]),_("p",[v._v("新增:1.支持自定义节点内容。")]),_("h2",[v._v("0.6.2")]),_("p",[v._v("修复:1.修复富文本模式下,新建节点不随主题变化而变化的问题。")]),_("h2",[v._v("0.6.1")]),_("p",[v._v("修复:1.修复将鼠标滚动改为移动画布行为后,使用触控板操作时移动灵敏度过高的问题。")]),_("h2",[v._v("0.6.0-fix.1")]),_("p",[v._v("修复:1.修复没有设置过背景样式的情况下销毁思维导图报错的问题。")]),_("h2",[v._v("0.6.0")]),_("p",[v._v("破坏性更新:调整了simple-mind-map源码的目录结构,主要影响:1.插件的引入路径需要修改。2.constant文件路径需要修改。")]),_("p",[v._v("新增:1.支持一键缩放至适应画布功能。 2.按住Ctrl键多选功能可通过配置按需开启。 3.支持设置为左键多选节点,右键拖动画布。 4.支持控制节点是否允许编辑。 5.新增销毁思维导图的方法。 6.新增触摸事件支持插件。")]),_("p",[v._v("修复:1.修复按住ctrl键多选节点时不会触发节点的click事件的问题。 2.修复清空一个节点后再输入文字时节点样式丢失的问题。")]),_("h2",[v._v("0.5.11")]),_("p",[v._v("新增:支持关联性文本编辑。")]),_("p",[v._v("优化:优化主题配置更新,改变不涉及节点大小的配置不触发节点重新计算。")]),_("h2",[v._v("0.5.10")]),_("p",[v._v("新增:使用LRU缓存算法优化节点复用逻辑。")]),_("h2",[v._v("0.5.10-fix.1")]),_("p",[v._v("修复:修复导入出错的问题。")]),_("h2",[v._v("0.5.10-fix.2")]),_("p",[v._v("修复:修复富文本模式下,切换主题、导入数据后没有触发数据改变的问题。")]),_("p",[v._v("新增:新增三种主题。")]),_("h2",[v._v("0.5.9")]),_("p",[v._v("修改:统一导出方法的格式,使用"),_("code",[v._v("FileReader")]),v._v("代替"),_("code",[v._v("URL.createObjectURL")]),v._v("转换"),_("code",[v._v("blob")]),v._v("数据。")]),_("h2",[v._v("0.5.8")]),_("p",[v._v("优化:1.节点位置没有变化不触发位置设置。 2.展开收起状态没有变化不触发按钮更新。")]),_("p",[v._v("新增:1.默认改为鼠标移上节点才显示展开收起按钮。 2.支持扩展节点可插入的图标列表。")]),_("h2",[v._v("0.5.7")]),_("p",[v._v("破坏性更新:富文本模式下导出png改为使用html2canvas转换整个svg,大幅提高导出速度,不过html2canvas存在一个bug,foreignObject元素中的dom节点内联的文字颜色无法识别,所以导出节点的文字颜色是固定的,不过相对于之前的导出基本不可用状态,目前至少能快速顺利的导出。")]),_("p",[v._v("优化:优化富文本节点编辑体验。")]),_("p",[v._v("新增:富文本模式下,导入数据、初始化数据、切换主题场景节点样式支持跟随主题变化。")]),_("h2",[v._v("0.5.6")]),_("p",[v._v("修复:1.修复短时间快速多次渲染时节点位置错乱的问题。 2.修复节点正在编辑中时拖动画布导致编辑框和节点分离的问题。")]),_("p",[v._v("新增:1.添加最大历史记录数限制。")]),_("h2",[v._v("0.5.5")]),_("p",[v._v("新增:1.支持配置导出为png、svg、pdf时的内边距。 2.支持配置节点文本编辑框、节点备注浮层元素的z-index。 3.支持点击画布外的区域结束节点编辑状态。")]),_("h2",[v._v("0.5.5-fix.1")]),_("p",[v._v("修复:1.修复节点在画布外编辑时编辑框也在画布外的问题。 2.修改结构后复位变换,防止存在缩放时切换结构后第一次拖动时会发生位置突变的问题。")]),_("p",[v._v("优化:1.节点多选时只要节点和选区存在交叉即认为被选中。")]),_("h2",[v._v("0.5.5-fix.2")]),_("p",[v._v("修复:1.修复小地图报错。")]),_("h2",[v._v("0.5.4")]),_("p",[v._v("新增:1.添加新主题。 2.新增时间轴和鱼骨结构。")]),_("p",[v._v("修复:1.修复节点右键和画布右键的冲突问题。 2.修复组织结构图、目录组织图等节点拖拽时存在线段未隐藏的bug。")]),_("p",[v._v("优化:1.优化组织结构图布局。2.优化目录组织图布局。")]),_("h2",[v._v("0.5.4-fix.1")]),_("p",[v._v("优化:1.优化鱼骨图布局。")]),_("h2",[v._v("0.5.3")]),_("p",[v._v("修复:1.修复富文本模式下,如果选择了多个节点时设置文本样式,会将所有多选节点的文本改成最后一个多选节点的文本的问题。")]),_("p",[v._v("新增:1.支持设置初始中心节点的位置。")]),_("h3",[v._v("0.5.3-fix.1")]),_("p",[v._v("修复:1.修复设置初始中心节点的位置不生效的问题。")]),_("h3",[v._v("0.5.3-fix.2")]),_("p",[v._v("修复:1.修复导出为图片时,节点中的图片显示不出来的问题。")]),_("h2",[v._v("0.5.2")]),_("p",[v._v("修复:1.导出的"),_("code",[v._v("json")]),v._v("数据中去除"),_("code",[v._v("uid")]),v._v(";2.重新渲染时清空节点缓存池。")]),_("h2",[v._v("0.5.1")]),_("p",[v._v("优化:1.只有当鼠标在画布内才响应快捷键事件。")]),_("p",[v._v("修复:1.修复快速操作时节点位置不正确的问题。")]),_("h2",[v._v("0.5.0")]),_("p",[v._v("这个版本主要是代码层面的改动和优化,核心是为了提升渲染性能,减少卡顿问题。")]),_("p",[v._v("新增:1.支持自定义展开收起节点图标和颜色;")]),_("p",[v._v("优化:1.优化渲染逻辑,设置主题、前进回退等操作不再全量渲染;")]),_("pre",[_("code",[v._v(" 2.优化节点拖拽逻辑,修复无法拖动到两个节点之间的问题;\n\n 3.收起全部节点操作增加回到中心点的逻辑;\n\n 4.修复短时间多次触发渲染造成节点乱飞和错乱的问题;\n\n 5.优化节点编辑的体验;\n")])]),_("p",[v._v("修复:1.修复setData方法不触发历史记录的问题;")]),_("p",[v._v("修改:从0.5.0版本开始,考虑性能问题,节点激活状态只能修改形状相关的样式:")]),_("pre",{staticClass:"hljs"},[_("code",[v._v("[\n "),_("span",{staticClass:"hljs-string"},[v._v("'fillColor'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderColor'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderWidth'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderDasharray'")]),v._v(",\n "),_("span",{staticClass:"hljs-string"},[v._v("'borderRadius'")]),v._v("\n]\n")])]),_("h2",[v._v("0.4.7")]),_("p",[v._v("优化:1.富文本编辑时初始聚焦时不再默认全选;2.富文本编辑时使用节点填充色作为背景色,避免节点颜色为白色时看不见。 3.节点激活状态切换不再触发历史记录。 4.短时间多次触发历史记录,只会添加最后一次的数据。 5.优化历史记录添加,当有回退时,再次添加新记录时删除当前指针后面的历史数据。")]),_("p",[v._v("新增:1.支持导入和导出Markdown格式文件。 2.支持配置插入节点时的初始文字。 3.扩展插入节点和删除节点的命令,支持指定节点。")]),_("h2",[v._v("0.4.6")]),_("p",[v._v("新增:1.关联线支持调整控制点。")]),_("p",[v._v("优化:1.添加历史数据时过滤和上一次相比没有改变的数据。")]),_("p",[v._v("修复:1.修复节点编辑时方向键和方向键导航功能的冲突问题。 2.修复拖拽移动节点时节点id的丢失问题,这会导致关联线丢失。")]),_("h2",[v._v("0.4.5")]),_("p",[v._v("新增:1.支持关联线。 2.按住根节点也可以拖动画布。3.按住ctrl键可以调整多选节点。")]),_("h2",[v._v("0.4.4")]),_("p",[v._v("新增:支持响应鼠标的横向滚动。")]),_("h2",[v._v("0.4.3")]),_("p",[v._v("修复:前进回退后没有触发"),_("code",[v._v("data_change")]),v._v("事件的问题。")]),_("p",[v._v("新增:支持自定义鼠标滚轮事件;鼠标滚轮调整为支持缩放视图和上下移动视图。")]),_("h2",[v._v("0.4.2")]),_("p",[v._v("新增:"),_("code",[v._v("Node")]),v._v("类的"),_("code",[v._v("setText")]),v._v("方法增加第二个参数,以支持设置富文本内容。")]),_("h2",[v._v("0.4.1")]),_("p",[v._v("新增:1.新增抛出节点鼠标移入和移除事件;2.节点富文本支持设置背景颜色;3.节点富文本支持清除样式。")]),_("p",[v._v("修复:1.Mac系统触控板缩放相反的问题;2.设备window.devicePixelRatio不为1时,当存在富文本节点时导出的图片中富文本节点尺寸会变大的问题。")]),_("h2",[v._v("0.4.0")]),_("p",[v._v("新增:节点支持富文本编辑。")]),_("h2",[v._v("0.3.4")]),_("p",[v._v("新增:节点文本增加自动换行功能。")]),_("p",[v._v("修复:1.修复批量删除的节点中如果存在根节点会出现删除异常的问题。2.修复底边风格的情况下,节点高度过高会和其他节点重叠的问题。")]),_("h2",[v._v("0.3.3")]),_("p",[v._v("修复:根节点文字无法换行的问题。")]),_("h2",[v._v("0.3.2")]),_("p",[v._v("修复:1.修复二级节点拖拽到其他节点或其他节点拖拽到二级节点时节点样式没有更新的问题;2.修复当思维导图实际内容大于屏幕宽高时,导出的时候超出的部分没有绘制水印的问题。")]),_("h2",[v._v("0.3.1")]),_("p",[v._v("修复:1.删除背景图片不生效的问题;2.节点拖拽到根节点时连接线跑到根节点上方的问题。")]),_("p",[v._v("新增:背景图片展示增加位置和大小设置。导出的图片也同步支持该设置。")]),_("h2",[v._v("0.3.0")]),_("p",[v._v("升级为插件化架构,将一些非核心功能抽离出来作为插件,按需注册,减小整体体积。")]),_("h2",[v._v("0.2.24")]),_("p",[v._v("新增:节点自由拖拽改为可配置,默认为"),_("code",[v._v("false")]),v._v("不开启;支持添加水印。")]),_("h2",[v._v("0.2.23")]),_("p",[v._v("新增:支持注册新主题。")]),_("h2",[v._v("0.2.22")]),_("p",[v._v("优化:取消内置"),_("code",[v._v("simple-mind-map")]),v._v("包的主题和结构图片,改为由使用者自行维护,原有图片可在"),_("code",[v._v("web/assets/img/")]),v._v("目录找到。")]),_("h2",[v._v("0.2.21")]),_("p",[v._v("新增:支持节点横线风格。")]),_("h2",[v._v("0.2.20")]),_("p",[v._v("修复:画布距窗口左上角不为0时节点拖拽出现偏移的问题。")]),_("h2",[v._v("0.2.19")]),_("p",[v._v("修复:没有激活节点时随便按什么键都会触发自动聚焦的问题。")]),_("h2",[v._v("0.2.18")]),_("p",[v._v("优化:键盘导航寻找焦点的算法,支持简单算法、区域算法、阴影算法。")]),_("h2",[v._v("0.2.17")]),_("p",[v._v("新增:键盘导航,即通过方向键来切换激活的节点;支持在大纲直接编辑节点文本内容。")]),_("h2",[v._v("0.2.16")]),_("p",[v._v("优化:小地图、拖拽性能。")]),_("h2",[v._v("0.2.15")]),_("p",[v._v("优化:本地文件编辑。")]),_("p",[v._v("新增:支持双击节点内图片进行大图预览。")]),_("h2",[v._v("0.2.14")]),_("p",[v._v("优化:插入子节点时自动展开。")]),_("p",[v._v("修复:小地图关闭时报错的问题。")]),_("h2",[v._v("0.2.13")]),_("p",[v._v("修复:子节点收起状态复制时丢失的问题。")]),_("h2",[v._v("0.2.11")]),_("p",[v._v("修复:修复子节点收起状态复制时丢失的问题。")]),_("p",[v._v("新增:支持小地图。")]),_("h2",[v._v("0.2.10")]),_("p",[v._v("优化:手动创建节点时立即聚焦。")]),_("p",[v._v("修复:连线样式深度更新问题。")]),_("p",[v._v("新增:逻辑结构图、思维导图新增直线连接风格、直连风格。")]),_("h2",[v._v("0.2.9")]),_("p",[v._v("新增:支持新建、打开、保存到电脑本地文件。")]),_("h2",[v._v("0.2.8")]),_("p",[v._v("修复:xmind8版本文件导入失败的问题。")]),_("p",[v._v("新增:支持展开到指定层级。")]),_("h2",[v._v("0.2.7")]),_("p",[v._v("修复:根节点添加多个节点爆栈的问题。")]),_("p",[v._v("新增:支持导入.xmind文件。")]),_("h2",[v._v("0.2.6")]),_("p",[v._v("新增:导出svg增加title标签。")]),_("h2",[v._v("0.2.5")]),_("p",[v._v("修复:节点展开收起的bug。")]),_("p",[v._v("新增:节点支持自定义线条样式。")]),_("h2",[v._v("0.2.4")]),_("p",[v._v("新增:节点支持多种形状。")]),_("h2",[v._v("0.2.3")]),_("p",[v._v("修复:编辑节点文本时快捷键冲突的问题;右键菜单快捷键提示错误;右键菜单快捷键提示。")]),_("h2",[v._v("0.2.2")]),_("p",[v._v("修复:输入字符串'/'和快捷键'/'冲突问题。")]),_("h2",[v._v("0.2.1")]),_("p",[v._v("新增:支持导出为pdf。")]),_("h2",[v._v("0.2.0")]),_("p",[v._v("新增:经典4主题;支持添加概要;支持自由拖拽;上移节点、下移节点、复制节点、剪切节点、粘贴节点、一键整理布快捷键;库打包;Ctrl+左键多选。")]),_("h2",[v._v("0.1.18")]),_("p",[v._v("修复:节点图标不能删除的问题;工具按钮置灰仍然可以点击的问题。")]),_("h2",[v._v("0.1.17")]),_("p",[v._v("新增:增加只读模式。")]),_("h2",[v._v("0.1.16")]),_("p",[v._v("新增:节点备注支持markdown及富文本。")]),_("p",[v._v("修复:不能选中文字的问题;节点标注在节点激活后无法隐藏问题;超链接、备注、标签等文字编辑时返回键和回车键与思维导图快捷键冲突的问题。")]),_("h2",[v._v("0.1.15")]),_("p",[v._v("新增:状态数据支持保存激活状态、视图状态(拖动位置、缩放值);支持节点拖拽。")]),_("h2",[v._v("0.1.14")]),_("p",[v._v("修复:存在激活节点时设置主题存在的问题。")]),_("h2",[v._v("0.1.13")]),_("p",[v._v("新增:快捷键功能;新增导出为json。")]),_("p",[v._v("优化:一些细节。")]),_("h2",[v._v("0.1.12")]),_("p",[v._v("新增:本地存储;右键菜单功能等。")]),_("h2",[v._v("0.1.0")]),_("p",[v._v("完成基本功能。")])])}],h={},t=h,i=p("2877"),n=Object(i["a"])(t,o,e,!1,null,null,null);_["default"]=n.exports}}]); \ No newline at end of file diff --git a/dist/js/chunk-2d208ffa.js b/dist/js/chunk-2d208ffa.js index f554b0e1..71056f93 100644 --- a/dist/js/chunk-2d208ffa.js +++ b/dist/js/chunk-2d208ffa.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d208ffa"],{a6d3:function(e,t,i){"use strict";i.r(t);var o=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Changelog")]),t("h2",[e._v("0.9.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of exporting images, SVGs, and PDFs with errors when customizing node content.")]),t("p",[e._v("2.Optimize the distribution of node activation events, do not distribute events when the activation node has not changed, and skip intermediate events when distributing multiple events in a short period of time.")]),t("p",[e._v("3.Fix the issue where the edit box and node detach when scrolling the canvas with the mouse while the node is in editing mode.")]),t("p",[e._v("4.Fix the issue of shortcut keys becoming invalid when zooming the canvas with the mouse wheel and then exiting node editing while in node editing mode.")]),t("p",[e._v("5.Fix the issue where clicking on a node can also trigger node_dragend event.")]),t("p",[e._v("6.Fix that clicking on the canvas and nodes while not in the format brush will also trigger the painter_end event.")]),t("p",[e._v("7.Fixed the issue where the mind map text editing box was not destroyed during node text editing and associated line text editing.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.When holding down the Ctrl key, disable the node double-click event.")]),t("p",[e._v("2.Support configuring the behavior when creating new nodes: focusing and entering editing, not focusing, only focusing.")]),t("p",[e._v("3.When searching in read-only mode, add a highlight effect to the currently matched node.")]),t("p",[e._v("4.The default behavior of the mouse scroll wheel is to move the canvas up and down; The default is to scroll forward to enlarge the canvas and zoom back.")]),t("p",[e._v("5.When the mouse scroll wheel behavior is to move the canvas up and down, it supports holding down the Ctrl key to zoom in and out of the canvas.")])]),t("p",[e._v("Demo:支持配置创建新节点时的行为。")]),t("h2",[e._v("0.9.0")]),t("p",[e._v("New:")]),t("p",[e._v("1.Support adding summaries to some child nodes of the same node.")]),t("p",[e._v("2.Moving the mouse into the summary will highlight its node.")]),t("p",[e._v("3.Importing and exporting xmind files supports processing profiles.")]),t("h2",[e._v("0.8.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue where the activation status of the summary node in the history data has not been deleted, which can cause data to be triggered when clicking on the summary node_ Change event.")]),t("p",[e._v("2.Fix the issue of blank pages and exceptions thrown by the console when running in Safari browser.")]),t("p",[e._v("3.Fixed the issue of icon floating layer and note floating layer detached from nodes when scaling the canvas.")]),t("p",[e._v("4.Fixed the issue of selecting all nodes in read-only mode.")]),t("p",[e._v("5.Fix the presence of node content has   in rich text mode; Error exporting as image.")]),t("p",[e._v("6.Fixed the issue of overlapping profiles when adding profiles to oneself first and then to subordinates; Fix the issue of overlapping profiles when adding profiles to nodes with hierarchical relationships at the same time.")]),t("p",[e._v("7.Fix the issue of exporting PDF errors when there are many nodes.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Add a configuration option that prohibits dragging the canvas.")]),t("p",[e._v("2.Add a configuration option to prohibit double finger scaling of the canvas.")]),t("p",[e._v("3.Add compression parameters to the method of exporting PNG; Optimize the problem of excessive volume when exporting PDF from nodes with large amounts of data.")]),t("p",[e._v("4.Rename the isParent method of the node instance to isAncestor and add the isParent method at the same time.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed the issue of being able to search for replacement and edit outlines in read-only mode.")]),t("p",[e._v("2.Fix the issue where the outline cannot be displayed and edited when the node content is an HTML tag.")]),t("p",[e._v("3.Fix the issue where when multiple nodes are selected and icons are added at the same time, all node icons will be unified as the icon of the first node.")]),t("p",[e._v("4.Adding loading to the export operation.")])]),t("h2",[e._v("0.8.0-fix.1")]),t("p",[e._v("Fix: Fixed the issue of creating a new node using direct paste if the pasted content contains HTML label symbols such as <> and the newly created node content is empty.")]),t("h2",[e._v("0.8.0")]),t("p",[e._v("Breaking change: Greatly optimize some of the code and slightly improve performance, mainly by using the 'render' class to remove useless logic, adjust unreasonable implementations, and extract duplicate code; Modify function names, functions, etc.")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of the arrow of the associated line disappearing when exporting images and SVGs.")]),t("p",[e._v("2.Fix the issue of abnormal operation returning to the root node after resizing the container.")]),t("p",[e._v("3.Fix that the shortcut key operations for inserting summary, moving up, down, and organizing layout with one click did not trigger data_ The issue with the change event.")]),t("p",[e._v("4.Fix the issue of each node displaying a border when exporting images, SVGs, and PDFs with watermarks.")]),t("p",[e._v("5.Fixed the issue of no watermarks and no redrawing after the container size was changed.")]),t("p",[e._v("6.Fix the issue of slow rendering of mini maps with watermarks.")]),t("p",[e._v("7.Fixed the issue where the collaboration plugin did not display the creator's avatar when creating a new node.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Optimize the canvas DOM structure and render nodes, lines, and associated lines in layers.")]),t("p",[e._v("2.Optimize the watermark plugin.")]),t("p",[e._v("3.The setTheme, setThemeConfig, and setLayout functions add parameters that do not trigger re rendering.")]),t("p",[e._v("4.Add a command to insert a parent node.")]),t("p",[e._v("5.Add a command to only delete the current node.")]),t("p",[e._v("6.Automatically expand child nodes when inserting a summary.")]),t("p",[e._v("7.Clear the current active node when right-clicking on the canvas.")]),t("p",[e._v("8.The folded active nodes are synchronously deleted from the list of active nodes.")]),t("p",[e._v("9.Pasting text with line breaks supports controlling whether nodes are split by line breaks.")]),t("p",[e._v("10.The mini map plugin supports returning mini maps of image types.")]),t("p",[e._v("11.Only one historical record can be added within a specified time period to avoid adding unnecessary intermediate states.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Modify the method and copy to return to the root node.")]),t("p",[e._v("2.Fix the issue of ineffective first switching when switching themes in overlay mode.")]),t("p",[e._v("3.The right-click menu adds the function of inserting parent nodes and deleting only the current node.")]),t("p",[e._v("4.The top toolbar supports automatic folding into more according to the window width.")]),t("p",[e._v("5.Support manual input of zoom factor.")]),t("p",[e._v("6.Improve the English translation of the interface.")]),t("p",[e._v("7.Change the mini map to render through images.")])]),t("h2",[e._v("0.7.3-fix.2")]),t("p",[e._v("Fix some issues with collaborative editing:")]),t("p",[e._v("1.The position of the new node is incorrect when inserting peer nodes;")]),t("p",[e._v("2.Moving a position within a peer node did not trigger an update;")]),t("p",[e._v("3.The position of the mobile node inserted as a sibling node is incorrect;")]),t("h2",[e._v("0.7.3-fix.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fixed some issues where the box selection area did not disappear when multiple nodes were selected.")]),t("p",[e._v("2.Fixed an issue where the box selection area does not disappear when releasing the mouse over multiple selected nodes.")]),t("p",[e._v("3.Fixed rendering anomalies caused by duplicate node uids when pasting nodes multiple times.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Add protocol selection function to the hyperlink input box.")])]),t("h2",[e._v("0.7.3")]),t("p",[e._v("New: 1.Add a Cooperate editing plugin.")]),t("p",[e._v("Demo: 1.Fix the automatic closing of the sidebar caused by the formula sidebar component.")]),t("h2",[e._v("0.7.2")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fixed the issue of nodes not being selected when the selection area does not include node boundaries when multiple nodes are selected.")]),t("p",[e._v("2.Fix the issue of errors when node text is not a string.")]),t("p",[e._v("3.Fix the issue of some text disappearing when edited again when there are<>&characters in the text in non rich text mode.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Supports inserting mathematical formulas.")]),t("p",[e._v("2.Supports dragging and moving multiple nodes simultaneously.")]),t("p",[e._v("3.Supports copying and cutting multiple nodes simultaneously.")]),t("p",[e._v("4.The node label color has been changed to be generated based on the label content, meaning that the same label content will generate the same color.")]),t("p",[e._v("5.Optimize the insertion of child nodes: 1. When inserting child nodes into multiple nodes simultaneously, do not enter the editing state; 2. The newly inserted child node automatically enters the active state.")]),t("p",[e._v("6.Optimize the insertion of sibling nodes: 1. Support the simultaneous insertion of sibling nodes into multiple nodes; 2. When calling the command to insert sibling nodes on the root node, no child nodes will be created.")]),t("p",[e._v("7.Add a command to simultaneously insert multiple peers and multiple child nodes.")]),t("p",[e._v("8.Changing the unique identifier of nodes from id to uid mainly affects the associated lines, which may not display properly in previous versions.")]),t("p",[e._v("9.Optimize the logic of icon merging and support the expansion of icons under the internal classification of the library.")]),t("p",[e._v("10.Associate line: 1. Double click the associate line to enter associate line text editing mode; If the associated line text is the default text, it will not be saved; 3. When there are active nodes, clicking on the associated line can directly activate the associated line.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed an issue where multiple nodes in the Zhixi mind map cannot be pasted when copying.")]),t("p",[e._v("2.Add a sidebar for formula editing.")])]),t("h2",[e._v("0.7.1-fix.2")]),t("p",[e._v("Fix: 1.Fix the issue of plugin registration method chain call reporting errors.")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Add a configuration option to adapt to the canvas size when the mind map is first loaded.")]),t("p",[e._v("2.Add a command to automatically generate dts declaration files.")])]),t("h2",[e._v("0.7.1-fix.1")]),t("p",[e._v("Fix: Fixed the issue of dragging nodes without excluding the child nodes of the dragged nodes.")]),t("h2",[e._v("0.7.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of unsaved associated line endpoints after changes.")]),t("p",[e._v("2.Fix the issue of abnormal canvas scrolling when moving the mouse to the edge of multiple selected nodes when the distance from the top left corner of the canvas to the browser window is not 0.")]),t("p",[e._v("3.Fix the issue of importing xmind file errors for nodes with empty titles.")]),t("p",[e._v("4.Fix the issue where the exported xmind file prompts for corruption when opened on the latest version of xmind software.")]),t("p",[e._v("5.Fix the issue where stickers cannot be displayed when exporting data with stickers in xmind format.")]),t("p",[e._v("6.Fix the issue of node right-click event reporting errors when the select plugin is not registered.")]),t("p",[e._v("7.There is no issue with removing duplicates in the method of registering plugins.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Reconstruct node drag and drop logic: optimize drag and drop difficulties in some situations, adapt to various structures, and automatically move the canvas when the mouse moves to the edge of the canvas during drag and drop.")]),t("p",[e._v("2.Reconstruct the scrollbar plugin to optimize the user experience.")]),t("p",[e._v("3.Imperfect resolution of conflicts between logical structure diagrams, mind maps, directory organization diagrams, organization chart summaries, and nodes (the summaries should be rewritten or deleted later).")]),t("p",[e._v("4.Activate adjacent nodes after deleting them.")]),t("p",[e._v("5.In node data_ The starting field is considered a custom field.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.The page will display the current core library version number.")])]),t("h2",[e._v("0.7.0")]),t("p",[e._v("Breaking change: Removed the section of node activation style in the theme file, Setting the activation style of nodes is no longer supported, and the activation effect has been changed to a unified node outer border style, while also supporting the mouse hover effect.")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix rendering anomalies when the node border size is relatively large.")]),t("p",[e._v("2.Fixed an issue where the node style of the associated line will not be updated when switching themes.")]),t("p",[e._v("3.Fix that selecting all did not trigger node_ The issue with active events.")])]),t("p",[e._v("新增:")]),t("blockquote",[t("p",[e._v("1.When folding nodes, displays the number of collapsed nodes.")]),t("p",[e._v("2.Support the position of the endpoint of the associated line to follow mouse drag changes.")]),t("p",[e._v("3.Add a scrollbar plugin.")]),t("p",[e._v("4.Support opening specified online files through fileURL query parameters in URLs.")]),t("p",[e._v("5.The fishbone diagram supports setting node margins.")]),t("p",[e._v("6.By default, double-click to reset the canvas.")]),t("p",[e._v("7.Modify the parameters of the export image method, and when exporting PDF, if the size of the mind map is smaller than A4 paper, do not rotate the direction.")]),t("p",[e._v("8.Improve the clarity of exported images and PDFs on high-definition screens.")]),t("p",[e._v("9.Add a pre destruction lifecycle function to the plugin to address the issue of some side effects that were not cleared during the destruction of the mind map.")]),t("p",[e._v("10.Optimize the settings of the basic style and do not trigger full rendering when modifying theme attributes that do not affect size.")]),t("p",[e._v("11.Prohibit triggering node right-click menu events when multiple node selections are completed, to avoid triggering the right-click menu display.")]),t("p",[e._v("12.Optimize the Select plugin so that if multiple selected nodes do not change, the activation event is not triggered.")]),t("p",[e._v("13.The activation node list thrown by event node_active no longer directly references the internal activation list.")]),t("p",[e._v("14.Optimize the logic of mouse button down node events, and support dragging the canvas by holding down the root node with the right mouse button in the right-click drag and drop canvas mode.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Do not directly reference the internal activation node list to optimize performance.")]),t("p",[e._v("2.Support configuring whether to display scrollbars.")]),t("p",[e._v("3.Delete the active node configuration in the sidebar node style configuration section.")])]),t("h2",[e._v("0.6.17")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of error reporting in the xmind file exported from Baidu Brain Map.")]),t("p",[e._v("2.Fix the mindMap. export method code error.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Create index.d.ts file。")]),t("p",[e._v("2.Support configuration to enable double click reset mind map.")]),t("p",[e._v("3.Intercept paste operations during rich text editing, remove formatting, and only allow pasting pure text.")])]),t("h2",[e._v("0.6.16")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Optimize the logic of rich text measurement elements, remove duplicate settings for styles, and add duplicate nodes")]),t("p",[e._v("2.Optimize the export image logic, and when traversing the node to convert the URL of the image, if it is already in the form of data: URL, do not handle it repeatedly.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Remove the second parameter of the exported SVG method and configure it through instantiation instead.")]),t("p",[e._v("2.Export images without using external libraries.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed a bug where siblings can be added to the root node when editing the outline separately.")])]),t("h2",[e._v("0.6.15-fix.2")]),t("p",[e._v("Fix: Fixed an issue where rich text nodes cannot be displayed in Firefox browser.")]),t("h2",[e._v("0.6.15-fix.1")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Export PDF supports pagination export based on image size.")]),t("p",[e._v("2.Exporting PDF supports automatic direction adjustment based on aspect ratio.")]),t("p",[e._v("3.Optimize the placeholder elements of the expand and collapse buttons: 1. Nodes without child nodes do not render this element; 2. Dynamically update the element based on the existence of child nodes.")]),t("p",[e._v("4.Add a configuration that prohibits mouse wheel scaling.")]),t("p",[e._v("5.Supports passing error handling functions.")])]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of displaying exceptions when node text is empty.")]),t("p",[e._v("2.Change the paddingX and paddingY of exported SVG graphics to single sided padding.")]),t("p",[e._v("3.Fixed an issue where the mouse is not centered when zooming when the canvas is not 0 from the top left corner of the browser window.")]),t("p",[e._v("4.Fix the issue of overlapping node borders.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.The bottom right corner supports jumping to related links.")]),t("p",[e._v("2.Adjust the position of the mini map to solve the problem of being blocked by side buttons.")]),t("p",[e._v("3.Fix the issue where the prompt in the upper right corner of the open local file cannot be closed.")]),t("p",[e._v("4.Editing the outline separately is no longer linked to the canvas, optimizing the editing experience under large data volume.")]),t("p",[e._v("5.The sidebar involves graphical options to increase visualization effects.")])]),t("h2",[e._v("0.6.14")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Remove and create hidden input boxes, and copy and paste them through navigator. clipboard; Support cross browser pasting of mind map node data; Support custom processing of text data in the clipboard.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of enabling input to automatically enter text editing mode and conflicting with other input boxes.")]),t("p",[e._v("2.Fix the issue of not being able to delete node images in the node image pop-up window.")]),t("p",[e._v("3.Fixed an issue where the text decoration line style of nodes cannot be removed in the node style sidebar.")]),t("p",[e._v("4.The color selector supports selecting transparent colors.")]),t("p",[e._v("5.Fix the issue of importing mind map data without updating the sidebar data when the basic style sidebar is open.")]),t("p",[e._v("6.Fixed the issue of not focusing when modifying the text of one node in the outline and then clicking on other nodes.")]),t("p",[e._v("7.Fixed an issue where the node and word count statistics in the bottom left corner were not updated after exiting Zen mode.")]),t("p",[e._v("8.Support deleting hyperlinks and notes of nodes from the right-click menu.")]),t("p",[e._v("9.Support pasting node data of Zhixi Mind Map.")])]),t("h2",[e._v("0.6.13")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of the inability to drag the canvas while holding down the middle mouse button on a node in read-only mode.")]),t("p",[e._v("2.Fixed the issue of probabilistic error reporting after quickly dragging nodes several times.")]),t("p",[e._v("3.Fix the issue of pulling up the input method during operations such as activating nodes on the mobile end, expanding and collapsing.")]),t("p",[e._v("4.Fix the issue where an exception request is initiated when the background image in the theme configuration is none.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Mobile gesture scaling optimization: Scale according to a linear relationship, and adjust the canvas position with double finger displacement.")]),t("p",[e._v("2.Remove the logic of asynchronous rendering nodes and improve the speed of creating new nodes.")]),t("p",[e._v("3.The export of images has been changed from the html2canvas library to the dom to image more library to address the issue of missing text styles in exporting rich text nodes.")]),t("p",[e._v("4.When a non rich text input box enters the editing state, it is deselected by default.")]),t("p",[e._v("5.When there is an activation node, it supports automatically entering text editing mode when pressing the Chinese, numeric, or English buttons.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Add anti shake operations when saving view data to optimize performance.")]),t("p",[e._v("2.Some time-consuming operations add loading effects.")]),t("p",[e._v("3.Improve the dark mode of right-click menus and rich text toolbars.")])]),t("h2",[e._v("0.6.12")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue where the indicator in the mini map will also move out of the mini map area when the mind map is completely moved out of the visible area.")]),t("p",[e._v("2.Fix the issue of overly sensitive dual finger scaling on the mobile end.")]),t("p",[e._v("3.Fix the issue of holding down nodes while dragging the canvas in read-only mode.")]),t("p",[e._v("4.Fix the issue of incorrect rendering of the mini map when the distance between the mind map and the top left corner of the browser window is not 0.")]),t("p",[e._v("5.Fix the issue of the prompt block being too large for the new location when moving nodes.")]),t("p",[e._v("6.Fix the issue where search cannot be replaced with empty characters.")]),t("p",[e._v("7.Fixed the issue of missing line breaks after searching and replacing in rich text mode.")]),t("p",[e._v("8.Fixed the issue of missing focus in the input box when clicking on text editing in the outline.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Adding a callback parameter to the node move end event (node_drag) can obtain the uid of the move to the node.")]),t("p",[e._v("2.Support specifying the location to which internal elements are added through configuration.")]),t("p",[e._v("3.Support the format brush function.")]),t("p",[e._v("4.Under the curve style, the connection line style of the root node supports consistency with other nodes.")]),t("p",[e._v("5.Search supports continuous replacement.")]),t("p",[e._v("6.Add and delete button for node image.")]),t("p",[e._v("7.Support dragging the canvas while holding down the middle mouse button.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Provide an application takeover mode to facilitate docking with one's own storage services; Supports setting static resource paths at runtime.")]),t("p",[e._v("2.Refactoring outline: 1. No longer use the text style that comes with the node; 2. Support full screen editing of the outline; 3. The outline supports dragging and moving nodes; 4. The outline supports deleting nodes.")]),t("p",[e._v("3.Fix the issue of interface dark mode not updating in the scenario of importing data.")])]),t("h2",[e._v("0.6.11-fix.1")]),t("p",[e._v("Fix: 1.Fixed the issue of invisible editing when node text is white.")]),t("h2",[e._v("0.6.11")]),t("p",[e._v("New: 1.Optimize the mini map, remove node content within the mini map, and optimize performance.")]),t("p",[e._v("Demo: 1.Add a new topic and add tab differentiation to the topic list. 2.Node image upload supports inputting network image addresses. 3.Node image upload supports inputting network images.")]),t("h2",[e._v("0.6.10")]),t("p",[e._v("Fix: 1.Fix the issue of deleting a node after searching for it and not updating the search results when searching again. 2.Fixed an issue where the button for adjusting image size did not update after node operation. 3.Fix the issue of incorrect internal data deep copy location. 4.Fix the issue of ineffective line wrapping in rich text nodes. 5. Fix the issue of node swapping and loss when switching themes and other scenarios.")]),t("p",[e._v("New: 1.Search supports searching for white space characters and replacing them with white space characters.")]),t("p",[e._v("Demo: 1.Support calling up search through icon buttons. 2.Support for switching to dark mode through icon buttons. 3.Optimize search: The mouse is not in the search area and not focused, solving the problem of not being able to delete input text when the mouse is not in the search area. 4.Adjust the interface UI for adding node icons and add a series of node icons. 5.Add a sticker list. 6.Fixed the issue of missing focus in the input box after entering the search box. 7.Support clicking on the icon within the node to display an icon for quick replacement and deletion of the floating panel.")]),t("h2",[e._v("0.6.9-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue of incorrect replacement after a single search.")]),t("p",[e._v("New: 1.We will no longer directly modify the incoming data object, but will make a deep copy internally.")]),t("h2",[e._v("0.6.9")]),t("p",[e._v("Fix: 1.Fixed an issue where setting styles to summary nodes would cause summary nodes to disappear. 2.Fixed the issue of node content not rendering when creating a root instance again when customizing node content. 3.Fix the issue of losing focus when adding a new node while the node is in editing. 2.Fix the issue of continuously pressing the tab key not being able to continuously create child nodes.")]),t("p",[e._v("New: 1.Replace existing "),t("code",[e._v(" ")]),e._v(" in SVG when exporting Characters to avoid exporting SVG errors. 2.Support for search and replace.")]),t("p",[e._v("Demo: 1.When switching themes, it is supported to choose whether to overwrite the set basic style.")]),t("h2",[e._v("0.6.8")]),t("p",[e._v("Fix: 1.Change the shortcut key for inserting a summary to Ctrl+G to avoid conflicts with the save shortcut key. 2.Fix the issue of abnormal switching between rich text editing configuration input boxes while nodes are being edited.")]),t("p",[e._v("New: 1.Modify the copy, cut, and paste logic, and support pasting data from the clipboard.")]),t("p",[e._v("Demo: 1.Fix the issue of not saving the outer margin of the basic style setting node. 2.Supports automatic switching to dark mode based on the theme.")]),t("h2",[e._v("0.6.7")]),t("p",[e._v("Fix: 1.Fixed the issue of missing placeholder elements for the expand and collapse button after node collapse and expansion. 2.Fixed the issue of being able to scale images in read-only mode.")]),t("p",[e._v("New: 1.Support locating to a node based on node instance or node uid. 2.Modify the creation method of node uids and export data to add node uids.")]),t("p",[e._v("Remove: 1.Remove the node transition effect.")]),t("p",[e._v("Demo: 1.Add website homepage. 2.Fixed the issue of missing node styles when creating new nodes in the outline. 3.Fixed the issue of missing edited text after pressing Enter or Tab after editing nodes in the outline. 4.Optimize the node positioning of the outline, and the collapsed nodes will automatically expand. 5.The sidebar button supports folding. 6.Optimize small screen adaptation.")]),t("h2",[e._v("0.6.6")]),t("p",[e._v("New: 1.Support exporting to Xmind new version files. 2.Importing the new version of Xmind file supports importing images from nodes. 3.Add a vertical timeline structure.")]),t("p",[e._v("Fix: 1.The TouchEvent plugin no longer sends click events, solving the problem of two windows opening when clicking on a hyperlink on the mobile end. 2.Fix the issue of dragging and moving a node to become a child node of another node, where the parent node of that node points to not being updated. 3.Fixed an issue where the node border style was not updated when dragging a second level node into a third level node. 4.Fix the issue where the mouse will not trigger the button display when moving into the unfolded or retracted button position, except for the structure growing to the right.")]),t("p",[e._v("optimization: 1.The issue of excessive amplitude when optimizing the touchpad to scale the canvas. 2.The newly created node defaults to selecting all for easy deletion of default text.")]),t("h2",[e._v("0.6.5-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue of adjusting the image size incorrectly while zooming.")]),t("h2",[e._v("0.6.5")]),t("p",[e._v("Fix: 1.Fix the issue of xmind file import errors. 2.Fixed a rare issue where line breaks occur when the width of the node text is decimal.")]),t("p",[e._v("New: 1.The packaged library supports obtaining built-in constants, themes, and other data. 2.Supports configuring the zoom behavior corresponding to the direction of the mouse wheel. 3.Node images support dragging and resizing.")]),t("h2",[e._v("0.6.4-fix.1")]),t("p",[e._v("New: 1.When zooming with the mouse wheel, the default zoom is centered around the current position of the mouse, which can be turned off by configuring.")]),t("p",[e._v("Fix: 1.Fixed an issue where the default value of the zoom center point was not updated after changing the canvas size.")]),t("h2",[e._v("0.6.4")]),t("p",[e._v("New: 1.The default is to scale at the center point of the canvas. 2.Optimize the scaling of both fingers on the mobile end, with the center position of the two fingers as the center point for scaling.")]),t("h2",[e._v("0.6.3")]),t("p",[e._v("Fix: 1.Fix the issue where the summary node will respond to inserting node shortcuts.")]),t("p",[e._v("New: 1.Support custom node content.")]),t("h2",[e._v("0.6.2")]),t("p",[e._v("Fix: 1.Fixed the problem that the new node does not change with the theme in rich Text mode.")]),t("h2",[e._v("0.6.1")]),t("p",[e._v("Fix: 1.Fixed the issue of high movement sensitivity when using the touchpad when changing mouse scrolling to moving the canvas behavior.")]),t("h2",[e._v("0.6.0-fix.1")]),t("p",[e._v("Fix: 1.Fixed the issue of destroying mind maps without setting a background style and reporting errors.")]),t("h2",[e._v("0.6.0")]),t("p",[e._v("Breaking change: Adjusted the directory structure of the simple-mind-map source code, Main impact: 1. The introduction path of the plugin needs to be modified. The constant file path needs to be modified.")]),t("p",[e._v("New: 1.Supports one click zoom to fit the canvas function. 2.Press and hold the Ctrl key to activate the multi selection function on demand through configuration. 3.Support setting to left click to select multiple nodes and right click to drag the canvas. 4. Support controlling whether nodes are allowed to be edited. 5.Add a method for destroying mind maps. 6.Added touch event support plugin.")]),t("p",[e._v("Fix: 1.Fix the issue where holding down the Ctrl key to select multiple nodes does not trigger the click event for the node. 2.Fixed the issue of node style loss when clearing a node and then entering text.")]),t("h2",[e._v("0.5.11")]),t("p",[e._v("New: Supports associative text editing.")]),t("p",[e._v("optimization: Optimizing theme configuration updates, changing configurations that do not involve node size does not trigger node recalculation.")]),t("h2",[e._v("0.5.10")]),t("p",[e._v("New: Optimize node reuse logic using LRU caching algorithm.")]),t("h2",[e._v("0.5.10-fix.1")]),t("p",[e._v("Fix: Fix the issue of import errors.")]),t("h2",[e._v("0.5.10-fix.2")]),t("p",[e._v("Fix: Fixed the issue of switching themes and importing data without triggering data changes in rich text mode.")]),t("p",[e._v("New: Add three new themes.")]),t("h2",[e._v("0.5.9")]),t("p",[e._v("Change: Unified export method format, using "),t("code",[e._v("FileReader")]),e._v(" instead of "),t("code",[e._v("URL.createObjectURL")]),e._v(" to convert "),t("code",[e._v("blob")]),e._v(" data.")]),t("h2",[e._v("0.5.8")]),t("p",[e._v("optimization: 1.The position setting is not triggered when the node position does not change. 2.The unfolding and folding status does not change and does not trigger button updates.")]),t("p",[e._v("New: 1.The default setting is to move the mouse over the node to display the expand and collapse buttons. 2.Support the list of icons that can be inserted into extended nodes.")]),t("h2",[e._v("0.5.7")]),t("p",[e._v("Breaking change:In rich text mode, exporting png has been changed to using html2canvas to convert the entire svg, greatly improving the export speed. However, html2canvas has a bug where the text color inline with the dom node in the foreignObject element cannot be recognized. Therefore, the text color of the exported node is fixed. However, compared to the previously unavailable state of the export, it can at least be exported quickly and smoothly.")]),t("p",[e._v("optimization: Optimize the rich text node editing experience.")]),t("p",[e._v("New: In rich text mode, importing data, initializing data, and switching theme scene node styles support following theme changes.")]),t("h2",[e._v("0.5.6")]),t("p",[e._v("Fix: 1.Fix the issue of node position disorder during fast and multiple renderings in a short period of time. 2.Fix the issue of dragging the canvas while the node is being edited, causing the edit box and node to separate.")]),t("p",[e._v("New: 1.Add a maximum history limit.")]),t("h2",[e._v("0.5.5-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue where the edit box is also outside the canvas when editing nodes outside the canvas. 2.After modifying the structure, reset the transformation to prevent the problem of sudden position changes during the first drag after switching the structure during scaling.")]),t("p",[e._v("optimization: 1.When multiple nodes are selected, as long as there is a cross between the node and the selection area, it is considered selected.")]),t("h2",[e._v("0.5.5-fix.2")]),t("p",[e._v("Fix: 1.Fix mini map error.")]),t("h2",[e._v("0.5.5")]),t("p",[e._v("New: 1.Supports configuring the padding when exporting to PNG, SVG, or PDF. 2.Support the configuration of z-index for node text editing boxes and node comment floating layer elements. 3.Support clicking on areas outside the canvas to end node editing status.")]),t("h2",[e._v("0.5.4")]),t("p",[e._v("New: 1.Add new themes. 2.Added timeline and fishbone structure.")]),t("p",[e._v("Fix: 1.Fix the conflict issue between node right-click and canvas right-click. 2.Fix the bug that the line segment is not hidden when dragging nodes such as organizational chart and directory organization chart.")]),t("p",[e._v("optimization: 1.Optimize the layout of organizational chart. 2.Optimize the layout of the directory organization chart.")]),t("h2",[e._v("0.5.4-fix.1")]),t("p",[e._v("optimization: 1.Optimize fishbone layout.")]),t("h2",[e._v("0.5.3")]),t("p",[e._v("Fix: 1.Fixed the issue of setting the text style when multiple nodes were selected in rich text mode, which would change the text of all selected nodes to the text of the last selected node.")]),t("p",[e._v("New: 1.Support setting the position of the initial central node.")]),t("h3",[e._v("0.5.3-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue where setting the position of the initial central node does not take effect.")]),t("h3",[e._v("0.5.3-fix.2")]),t("p",[e._v("Fix: 1.Fix the issue of not displaying images in nodes when exporting as images.")]),t("h2",[e._v("0.5.2")]),t("p",[e._v("Fix: 1.Remove "),t("code",[e._v("uid")]),e._v(" from exported "),t("code",[e._v("JSON")]),e._v(" data; 2.Clear the node cache pool when re rendering.")]),t("h2",[e._v("0.5.1")]),t("p",[e._v("optimization: 1.Only respond to shortcut key events when the mouse is inside the canvas")]),t("p",[e._v("Fix: 1.Fix the issue of incorrect node position during fast operation")]),t("h2",[e._v("0.5.0")]),t("p",[e._v("This version is mainly about code level changes and optimization, with the core goal of improving rendering performance and reducing stuck issues.")]),t("p",[e._v("New: 1.Support custom expansion and collapse node icons and colors;")]),t("p",[e._v("optimization: 1.Optimize rendering logic, set the theme, move forward and backward, and other operations no longer require full rendering;")]),t("pre",[t("code",[e._v(" 2.Optimize node drag logic, and fix the problem of being unable to drag between two nodes;\n\n 3.Collapse all nodes adds logic to return to the center point;\n\n 4.Fix the problem of nodes flying and scrambling caused by triggering rendering multiple times in a short time;\n\n 5.Optimize the experience of node editing;\n")])]),t("p",[e._v("Fix: 1.Fix the issue where the setData method does not trigger history;")]),t("p",[e._v("modify: Starting from version 0.5.0, considering performance issues, the node activation state can only modify shape related styles:")]),t("pre",{staticClass:"hljs"},[t("code",[e._v("[\n "),t("span",{staticClass:"hljs-string"},[e._v("'fillColor'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderColor'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderWidth'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderDasharray'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderRadius'")]),e._v("\n]\n")])]),t("h2",[e._v("0.4.7")]),t("p",[e._v("optimization: 1.During rich text editing, when initially focusing, all are no longer selected by default; 2.When editing rich text, use the node fill color as the background color to avoid being invisible when the node color is white. 3.Node activation state switching no longer triggers history. 4.Triggering history multiple times in a short time will only add the last data. 5.Optimize the addition of historical records. When there is a rollback, delete the historical data after the current pointer when adding a new record again.")]),t("p",[e._v("New: 1.Support for importing and exporting Markdown format files. 2.Support for configuring initial text when inserting nodes. 3.Expand the commands for inserting and deleting nodes to support specifying nodes.")]),t("h2",[e._v("0.4.6")]),t("p",[e._v("New: 1.Associated lines support adjusting control points.")]),t("p",[e._v("optimization: 1.When adding historical data, filter data that has not changed compared to the previous time.")]),t("p",[e._v("Fix: 1.Fixed a conflict between the direction keys and the navigation function of the direction keys during node editing. 2.Fixed the issue of node id loss when dragging a mobile node, which can cause associated lines to be lost.")]),t("h2",[e._v("0.4.5")]),t("p",[e._v("New: 1.Supports associative lines. 2.You can also drag the canvas by holding down the root node. 3. Hold down the ctrl key to adjust multiple selected nodes.")]),t("h2",[e._v("0.4.4")]),t("p",[e._v("New: Support horizontal scrolling in response to the mouse.")]),t("h2",[e._v("0.4.3")]),t("p",[e._v("Fix: No trigger after forward and backward "),t("code",[e._v("data_ Change")]),e._v(" event.")]),t("p",[e._v("New: Support user-defined mouse wheel events; The mouse wheel is adjusted to support zooming and moving the view up and down.")]),t("h2",[e._v("0.4.2")]),t("p",[e._v("New: The "),t("code",[e._v("setText")]),e._v(" method of the Node class adds a second parameter to support setting rich text content.")]),t("h2",[e._v("0.4.1")]),t("p",[e._v("New: 1.Add and throw node mouseenter and mouseleave events; 2.Node rich text supports setting background color; 3.Node rich text supports clear style.")]),t("p",[e._v("Fix: 1.Mac system touchpad scaling is the opposite problem; 2.When the device window.devicePixelRatio is not 1, the size of the rich text node in the exported image will become larger when there are rich text nodes.")]),t("h2",[e._v("0.4.0")]),t("p",[e._v("New: The node supports rich text editing.")]),t("h2",[e._v("0.3.4")]),t("p",[e._v("New: Automatic line wrapping function is added to node text.")]),t("p",[e._v("Fix: 1.Fix the problem of deletion exceptions if there are root nodes in the batch deleted nodes. 2.Fix the problem that high node height will overlap with other nodes in the case of bottom edge style.")]),t("h2",[e._v("0.3.3")]),t("p",[e._v("Fix: The root node text cannot wrap.")]),t("h2",[e._v("0.3.2")]),t("p",[e._v("Fix: 1.Fix the problem that the node style is not updated when the secondary node is dragged to other nodes or other nodes are dragged to the secondary node; 2.Fix the problem that when the actual content of the mind map is larger than the screen width and height, the excess part is not watermarked when exporting.")]),t("h2",[e._v("0.3.1")]),t("p",[e._v("Fix: 1.The problem that deleting the background image does not take effect; 2.The problem that the connector runs above the root node when the node is dragged to the root node.")]),t("p",[e._v("New: Add position and size settings for background image display. This setting is also supported for exported pictures.")]),t("h2",[e._v("0.3.0")]),t("p",[e._v("Upgrade to plugin architecture, pull out some non-core functions as plugins, register as needed, and reduce the overall volume.")]),t("h2",[e._v("0.2.24")]),t("p",[e._v("New: Node free drag is changed to configurable, the default is "),t("code",[e._v("false")]),e._v(", not open; Support add watermark.")]),t("h2",[e._v("0.2.23")]),t("p",[e._v("New: Support register new theme.")]),t("h2",[e._v("0.2.22")]),t("p",[e._v("optimization:The theme and structure pictures of the built-in "),t("code",[e._v("simple-mind-map")]),e._v(" package are removed and replaced by user self-maintenance. The original pictures can be found in the "),t("code",[e._v("web/assets/img/")]),e._v(" directory.")]),t("h2",[e._v("0.2.21")]),t("p",[e._v("New: Support node horizontal line style.")]),t("h2",[e._v("0.2.20")]),t("p",[e._v("fix:When the distance from the canvas to the upper left corner of the window is not 0, the node dragging will have an offset problem.")]),t("h2",[e._v("0.2.19")]),t("p",[e._v("fix:When the node is not activated, pressing any key will trigger the problem of automatic focus.")]),t("h2",[e._v("0.2.18")]),t("p",[e._v("optimization:Keyboard navigation algorithm for finding focus, supporting simple algorithm, region algorithm and shadow algorithm.")]),t("h2",[e._v("0.2.17")]),t("p",[e._v("New:Keyboard navigation, that is, switch the active nodes through the direction keys; The node text content can be edited directly in the outline.")]),t("h2",[e._v("0.2.16")]),t("p",[e._v("optimization:Mini map; drag performance.")]),t("h2",[e._v("0.2.15")]),t("p",[e._v("optimization:Local file editing.")]),t("p",[e._v("New:Double-click the image in the node to preview the large image.")]),t("h2",[e._v("0.2.14")]),t("p",[e._v("optimization:Automatically expand when inserting child nodes.")]),t("p",[e._v("fix:The error occurred when the mini map was closed.")]),t("h2",[e._v("0.2.13")]),t("p",[e._v("fix:The child node is missing when collapsing state replication.")]),t("h2",[e._v("0.2.11")]),t("p",[e._v("fix:Fix the problem that is lost when the child node collapses state replication.")]),t("p",[e._v("New:Support mini map.")]),t("h2",[e._v("0.2.10")]),t("p",[e._v("optimization:Focus immediately when you manually create a node.")]),t("p",[e._v("fix:Connection style depth update problem.")]),t("p",[e._v("New:Logical structure diagram and mind map add linear connection style and direct connection style.")]),t("h2",[e._v("0.2.9")]),t("p",[e._v("New:Support the creation, opening and saving of local files on the computer.")]),t("h2",[e._v("0.2.8")]),t("p",[e._v("fix:Xmind8 version file import failed.")]),t("p",[e._v("New:Expanding to the specified level is supported.")]),t("h2",[e._v("0.2.7")]),t("p",[e._v("fix:The root node adds multiple nodes to burst the stack.")]),t("p",[e._v("New:Support import .xmind file.")]),t("h2",[e._v("0.2.6")]),t("p",[e._v("New:The title tag is added when exporting svg.")]),t("h2",[e._v("0.2.5")]),t("p",[e._v("fix:Bugs caused by node expansion and collapse.")]),t("p",[e._v("New:Node supports custom line styles.")]),t("h2",[e._v("0.2.4")]),t("p",[e._v("New:Nodes support multiple shapes.")]),t("h2",[e._v("0.2.3")]),t("p",[e._v("fix:Shortcut key conflicts when editing node text; Right-click menu shortcut prompt error; Right-click menu shortcut prompt.")]),t("h2",[e._v("0.2.2")]),t("p",[e._v("fix:The input string '/' conflicts with the shortcut key '/'.")]),t("h2",[e._v("0.2.1")]),t("p",[e._v("New:Support export as pdf.")]),t("h2",[e._v("0.2.0")]),t("p",[e._v("New:Classic4 theme;Support adding summary; Support free drag; Move Node Up, Move Node Down, Copy Node, Cut Node, Paste Node, One-click Organize Cloth Shortcut; Library packaging; Ctrl+left click to select multiple.")]),t("h2",[e._v("0.1.18")]),t("p",[e._v("fix:The problem that the node icon cannot be deleted; The tool button is grayed out and can still be clicked.")]),t("h2",[e._v("0.1.17")]),t("p",[e._v("New:Add read-only mode.")]),t("h2",[e._v("0.1.16")]),t("p",[e._v("New:Node notes support markdown and rich text.")]),t("p",[e._v("fix:Can't select text; Node annotations cannot hide problems after node activation; When editing text such as hyperlinks, notes, labels, etc., the return key and return key conflict with the shortcut key of mind map.")]),t("h2",[e._v("0.1.15")]),t("p",[e._v("New:The status data supports saving the active status and view status (drag position, zoom value);Support node drag.")]),t("h2",[e._v("0.1.14")]),t("p",[e._v("fix:There are problems with setting topics when activating nodes.")]),t("h2",[e._v("0.1.13")]),t("p",[e._v("New:Shortcut key function; Support export as json。")]),t("p",[e._v("optimization:Some details.")]),t("h2",[e._v("0.1.12")]),t("p",[e._v("New:Local storage;Right-click menu function, etc.")]),t("h2",[e._v("0.1.0")]),t("p",[e._v("Complete basic functions.")])])}],s={},a=s,r=i("2877"),d=Object(r["a"])(a,o,n,!1,null,null,null);t["default"]=d.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d208ffa"],{a6d3:function(e,t,i){"use strict";i.r(t);var o=function(){var e=this;e._self._c;return e._m(0)},n=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Changelog")]),t("h2",[e._v("0.9.1-fix.1")]),t("p",[e._v("修复:")]),t("p",[e._v("1.修复自定义节点方法返回null时报错的问题。")]),t("p",[e._v("2.修复导出pdf文件体积很大的问题。")]),t("h2",[e._v("0.9.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of exporting images, SVGs, and PDFs with errors when customizing node content.")]),t("p",[e._v("2.Optimize the distribution of node activation events, do not distribute events when the activation node has not changed, and skip intermediate events when distributing multiple events in a short period of time.")]),t("p",[e._v("3.Fix the issue where the edit box and node detach when scrolling the canvas with the mouse while the node is in editing mode.")]),t("p",[e._v("4.Fix the issue of shortcut keys becoming invalid when zooming the canvas with the mouse wheel and then exiting node editing while in node editing mode.")]),t("p",[e._v("5.Fix the issue where clicking on a node can also trigger node_dragend event.")]),t("p",[e._v("6.Fix that clicking on the canvas and nodes while not in the format brush will also trigger the painter_end event.")]),t("p",[e._v("7.Fixed the issue where the mind map text editing box was not destroyed during node text editing and associated line text editing.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.When holding down the Ctrl key, disable the node double-click event.")]),t("p",[e._v("2.Support configuring the behavior when creating new nodes: focusing and entering editing, not focusing, only focusing.")]),t("p",[e._v("3.When searching in read-only mode, add a highlight effect to the currently matched node.")]),t("p",[e._v("4.The default behavior of the mouse scroll wheel is to move the canvas up and down; The default is to scroll forward to enlarge the canvas and zoom back.")]),t("p",[e._v("5.When the mouse scroll wheel behavior is to move the canvas up and down, it supports holding down the Ctrl key to zoom in and out of the canvas.")])]),t("p",[e._v("Demo:支持配置创建新节点时的行为。")]),t("h2",[e._v("0.9.0")]),t("p",[e._v("New:")]),t("p",[e._v("1.Support adding summaries to some child nodes of the same node.")]),t("p",[e._v("2.Moving the mouse into the summary will highlight its node.")]),t("p",[e._v("3.Importing and exporting xmind files supports processing profiles.")]),t("h2",[e._v("0.8.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue where the activation status of the summary node in the history data has not been deleted, which can cause data to be triggered when clicking on the summary node_ Change event.")]),t("p",[e._v("2.Fix the issue of blank pages and exceptions thrown by the console when running in Safari browser.")]),t("p",[e._v("3.Fixed the issue of icon floating layer and note floating layer detached from nodes when scaling the canvas.")]),t("p",[e._v("4.Fixed the issue of selecting all nodes in read-only mode.")]),t("p",[e._v("5.Fix the presence of node content has   in rich text mode; Error exporting as image.")]),t("p",[e._v("6.Fixed the issue of overlapping profiles when adding profiles to oneself first and then to subordinates; Fix the issue of overlapping profiles when adding profiles to nodes with hierarchical relationships at the same time.")]),t("p",[e._v("7.Fix the issue of exporting PDF errors when there are many nodes.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Add a configuration option that prohibits dragging the canvas.")]),t("p",[e._v("2.Add a configuration option to prohibit double finger scaling of the canvas.")]),t("p",[e._v("3.Add compression parameters to the method of exporting PNG; Optimize the problem of excessive volume when exporting PDF from nodes with large amounts of data.")]),t("p",[e._v("4.Rename the isParent method of the node instance to isAncestor and add the isParent method at the same time.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed the issue of being able to search for replacement and edit outlines in read-only mode.")]),t("p",[e._v("2.Fix the issue where the outline cannot be displayed and edited when the node content is an HTML tag.")]),t("p",[e._v("3.Fix the issue where when multiple nodes are selected and icons are added at the same time, all node icons will be unified as the icon of the first node.")]),t("p",[e._v("4.Adding loading to the export operation.")])]),t("h2",[e._v("0.8.0-fix.1")]),t("p",[e._v("Fix: Fixed the issue of creating a new node using direct paste if the pasted content contains HTML label symbols such as <> and the newly created node content is empty.")]),t("h2",[e._v("0.8.0")]),t("p",[e._v("Breaking change: Greatly optimize some of the code and slightly improve performance, mainly by using the 'render' class to remove useless logic, adjust unreasonable implementations, and extract duplicate code; Modify function names, functions, etc.")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of the arrow of the associated line disappearing when exporting images and SVGs.")]),t("p",[e._v("2.Fix the issue of abnormal operation returning to the root node after resizing the container.")]),t("p",[e._v("3.Fix that the shortcut key operations for inserting summary, moving up, down, and organizing layout with one click did not trigger data_ The issue with the change event.")]),t("p",[e._v("4.Fix the issue of each node displaying a border when exporting images, SVGs, and PDFs with watermarks.")]),t("p",[e._v("5.Fixed the issue of no watermarks and no redrawing after the container size was changed.")]),t("p",[e._v("6.Fix the issue of slow rendering of mini maps with watermarks.")]),t("p",[e._v("7.Fixed the issue where the collaboration plugin did not display the creator's avatar when creating a new node.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Optimize the canvas DOM structure and render nodes, lines, and associated lines in layers.")]),t("p",[e._v("2.Optimize the watermark plugin.")]),t("p",[e._v("3.The setTheme, setThemeConfig, and setLayout functions add parameters that do not trigger re rendering.")]),t("p",[e._v("4.Add a command to insert a parent node.")]),t("p",[e._v("5.Add a command to only delete the current node.")]),t("p",[e._v("6.Automatically expand child nodes when inserting a summary.")]),t("p",[e._v("7.Clear the current active node when right-clicking on the canvas.")]),t("p",[e._v("8.The folded active nodes are synchronously deleted from the list of active nodes.")]),t("p",[e._v("9.Pasting text with line breaks supports controlling whether nodes are split by line breaks.")]),t("p",[e._v("10.The mini map plugin supports returning mini maps of image types.")]),t("p",[e._v("11.Only one historical record can be added within a specified time period to avoid adding unnecessary intermediate states.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Modify the method and copy to return to the root node.")]),t("p",[e._v("2.Fix the issue of ineffective first switching when switching themes in overlay mode.")]),t("p",[e._v("3.The right-click menu adds the function of inserting parent nodes and deleting only the current node.")]),t("p",[e._v("4.The top toolbar supports automatic folding into more according to the window width.")]),t("p",[e._v("5.Support manual input of zoom factor.")]),t("p",[e._v("6.Improve the English translation of the interface.")]),t("p",[e._v("7.Change the mini map to render through images.")])]),t("h2",[e._v("0.7.3-fix.2")]),t("p",[e._v("Fix some issues with collaborative editing:")]),t("p",[e._v("1.The position of the new node is incorrect when inserting peer nodes;")]),t("p",[e._v("2.Moving a position within a peer node did not trigger an update;")]),t("p",[e._v("3.The position of the mobile node inserted as a sibling node is incorrect;")]),t("h2",[e._v("0.7.3-fix.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fixed some issues where the box selection area did not disappear when multiple nodes were selected.")]),t("p",[e._v("2.Fixed an issue where the box selection area does not disappear when releasing the mouse over multiple selected nodes.")]),t("p",[e._v("3.Fixed rendering anomalies caused by duplicate node uids when pasting nodes multiple times.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Add protocol selection function to the hyperlink input box.")])]),t("h2",[e._v("0.7.3")]),t("p",[e._v("New: 1.Add a Cooperate editing plugin.")]),t("p",[e._v("Demo: 1.Fix the automatic closing of the sidebar caused by the formula sidebar component.")]),t("h2",[e._v("0.7.2")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fixed the issue of nodes not being selected when the selection area does not include node boundaries when multiple nodes are selected.")]),t("p",[e._v("2.Fix the issue of errors when node text is not a string.")]),t("p",[e._v("3.Fix the issue of some text disappearing when edited again when there are<>&characters in the text in non rich text mode.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Supports inserting mathematical formulas.")]),t("p",[e._v("2.Supports dragging and moving multiple nodes simultaneously.")]),t("p",[e._v("3.Supports copying and cutting multiple nodes simultaneously.")]),t("p",[e._v("4.The node label color has been changed to be generated based on the label content, meaning that the same label content will generate the same color.")]),t("p",[e._v("5.Optimize the insertion of child nodes: 1. When inserting child nodes into multiple nodes simultaneously, do not enter the editing state; 2. The newly inserted child node automatically enters the active state.")]),t("p",[e._v("6.Optimize the insertion of sibling nodes: 1. Support the simultaneous insertion of sibling nodes into multiple nodes; 2. When calling the command to insert sibling nodes on the root node, no child nodes will be created.")]),t("p",[e._v("7.Add a command to simultaneously insert multiple peers and multiple child nodes.")]),t("p",[e._v("8.Changing the unique identifier of nodes from id to uid mainly affects the associated lines, which may not display properly in previous versions.")]),t("p",[e._v("9.Optimize the logic of icon merging and support the expansion of icons under the internal classification of the library.")]),t("p",[e._v("10.Associate line: 1. Double click the associate line to enter associate line text editing mode; If the associated line text is the default text, it will not be saved; 3. When there are active nodes, clicking on the associated line can directly activate the associated line.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed an issue where multiple nodes in the Zhixi mind map cannot be pasted when copying.")]),t("p",[e._v("2.Add a sidebar for formula editing.")])]),t("h2",[e._v("0.7.1-fix.2")]),t("p",[e._v("Fix: 1.Fix the issue of plugin registration method chain call reporting errors.")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Add a configuration option to adapt to the canvas size when the mind map is first loaded.")]),t("p",[e._v("2.Add a command to automatically generate dts declaration files.")])]),t("h2",[e._v("0.7.1-fix.1")]),t("p",[e._v("Fix: Fixed the issue of dragging nodes without excluding the child nodes of the dragged nodes.")]),t("h2",[e._v("0.7.1")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of unsaved associated line endpoints after changes.")]),t("p",[e._v("2.Fix the issue of abnormal canvas scrolling when moving the mouse to the edge of multiple selected nodes when the distance from the top left corner of the canvas to the browser window is not 0.")]),t("p",[e._v("3.Fix the issue of importing xmind file errors for nodes with empty titles.")]),t("p",[e._v("4.Fix the issue where the exported xmind file prompts for corruption when opened on the latest version of xmind software.")]),t("p",[e._v("5.Fix the issue where stickers cannot be displayed when exporting data with stickers in xmind format.")]),t("p",[e._v("6.Fix the issue of node right-click event reporting errors when the select plugin is not registered.")]),t("p",[e._v("7.There is no issue with removing duplicates in the method of registering plugins.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Reconstruct node drag and drop logic: optimize drag and drop difficulties in some situations, adapt to various structures, and automatically move the canvas when the mouse moves to the edge of the canvas during drag and drop.")]),t("p",[e._v("2.Reconstruct the scrollbar plugin to optimize the user experience.")]),t("p",[e._v("3.Imperfect resolution of conflicts between logical structure diagrams, mind maps, directory organization diagrams, organization chart summaries, and nodes (the summaries should be rewritten or deleted later).")]),t("p",[e._v("4.Activate adjacent nodes after deleting them.")]),t("p",[e._v("5.In node data_ The starting field is considered a custom field.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.The page will display the current core library version number.")])]),t("h2",[e._v("0.7.0")]),t("p",[e._v("Breaking change: Removed the section of node activation style in the theme file, Setting the activation style of nodes is no longer supported, and the activation effect has been changed to a unified node outer border style, while also supporting the mouse hover effect.")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix rendering anomalies when the node border size is relatively large.")]),t("p",[e._v("2.Fixed an issue where the node style of the associated line will not be updated when switching themes.")]),t("p",[e._v("3.Fix that selecting all did not trigger node_ The issue with active events.")])]),t("p",[e._v("新增:")]),t("blockquote",[t("p",[e._v("1.When folding nodes, displays the number of collapsed nodes.")]),t("p",[e._v("2.Support the position of the endpoint of the associated line to follow mouse drag changes.")]),t("p",[e._v("3.Add a scrollbar plugin.")]),t("p",[e._v("4.Support opening specified online files through fileURL query parameters in URLs.")]),t("p",[e._v("5.The fishbone diagram supports setting node margins.")]),t("p",[e._v("6.By default, double-click to reset the canvas.")]),t("p",[e._v("7.Modify the parameters of the export image method, and when exporting PDF, if the size of the mind map is smaller than A4 paper, do not rotate the direction.")]),t("p",[e._v("8.Improve the clarity of exported images and PDFs on high-definition screens.")]),t("p",[e._v("9.Add a pre destruction lifecycle function to the plugin to address the issue of some side effects that were not cleared during the destruction of the mind map.")]),t("p",[e._v("10.Optimize the settings of the basic style and do not trigger full rendering when modifying theme attributes that do not affect size.")]),t("p",[e._v("11.Prohibit triggering node right-click menu events when multiple node selections are completed, to avoid triggering the right-click menu display.")]),t("p",[e._v("12.Optimize the Select plugin so that if multiple selected nodes do not change, the activation event is not triggered.")]),t("p",[e._v("13.The activation node list thrown by event node_active no longer directly references the internal activation list.")]),t("p",[e._v("14.Optimize the logic of mouse button down node events, and support dragging the canvas by holding down the root node with the right mouse button in the right-click drag and drop canvas mode.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Do not directly reference the internal activation node list to optimize performance.")]),t("p",[e._v("2.Support configuring whether to display scrollbars.")]),t("p",[e._v("3.Delete the active node configuration in the sidebar node style configuration section.")])]),t("h2",[e._v("0.6.17")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of error reporting in the xmind file exported from Baidu Brain Map.")]),t("p",[e._v("2.Fix the mindMap. export method code error.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Create index.d.ts file。")]),t("p",[e._v("2.Support configuration to enable double click reset mind map.")]),t("p",[e._v("3.Intercept paste operations during rich text editing, remove formatting, and only allow pasting pure text.")])]),t("h2",[e._v("0.6.16")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Optimize the logic of rich text measurement elements, remove duplicate settings for styles, and add duplicate nodes")]),t("p",[e._v("2.Optimize the export image logic, and when traversing the node to convert the URL of the image, if it is already in the form of data: URL, do not handle it repeatedly.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Remove the second parameter of the exported SVG method and configure it through instantiation instead.")]),t("p",[e._v("2.Export images without using external libraries.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fixed a bug where siblings can be added to the root node when editing the outline separately.")])]),t("h2",[e._v("0.6.15-fix.2")]),t("p",[e._v("Fix: Fixed an issue where rich text nodes cannot be displayed in Firefox browser.")]),t("h2",[e._v("0.6.15-fix.1")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Export PDF supports pagination export based on image size.")]),t("p",[e._v("2.Exporting PDF supports automatic direction adjustment based on aspect ratio.")]),t("p",[e._v("3.Optimize the placeholder elements of the expand and collapse buttons: 1. Nodes without child nodes do not render this element; 2. Dynamically update the element based on the existence of child nodes.")]),t("p",[e._v("4.Add a configuration that prohibits mouse wheel scaling.")]),t("p",[e._v("5.Supports passing error handling functions.")])]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of displaying exceptions when node text is empty.")]),t("p",[e._v("2.Change the paddingX and paddingY of exported SVG graphics to single sided padding.")]),t("p",[e._v("3.Fixed an issue where the mouse is not centered when zooming when the canvas is not 0 from the top left corner of the browser window.")]),t("p",[e._v("4.Fix the issue of overlapping node borders.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.The bottom right corner supports jumping to related links.")]),t("p",[e._v("2.Adjust the position of the mini map to solve the problem of being blocked by side buttons.")]),t("p",[e._v("3.Fix the issue where the prompt in the upper right corner of the open local file cannot be closed.")]),t("p",[e._v("4.Editing the outline separately is no longer linked to the canvas, optimizing the editing experience under large data volume.")]),t("p",[e._v("5.The sidebar involves graphical options to increase visualization effects.")])]),t("h2",[e._v("0.6.14")]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Remove and create hidden input boxes, and copy and paste them through navigator. clipboard; Support cross browser pasting of mind map node data; Support custom processing of text data in the clipboard.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of enabling input to automatically enter text editing mode and conflicting with other input boxes.")]),t("p",[e._v("2.Fix the issue of not being able to delete node images in the node image pop-up window.")]),t("p",[e._v("3.Fixed an issue where the text decoration line style of nodes cannot be removed in the node style sidebar.")]),t("p",[e._v("4.The color selector supports selecting transparent colors.")]),t("p",[e._v("5.Fix the issue of importing mind map data without updating the sidebar data when the basic style sidebar is open.")]),t("p",[e._v("6.Fixed the issue of not focusing when modifying the text of one node in the outline and then clicking on other nodes.")]),t("p",[e._v("7.Fixed an issue where the node and word count statistics in the bottom left corner were not updated after exiting Zen mode.")]),t("p",[e._v("8.Support deleting hyperlinks and notes of nodes from the right-click menu.")]),t("p",[e._v("9.Support pasting node data of Zhixi Mind Map.")])]),t("h2",[e._v("0.6.13")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue of the inability to drag the canvas while holding down the middle mouse button on a node in read-only mode.")]),t("p",[e._v("2.Fixed the issue of probabilistic error reporting after quickly dragging nodes several times.")]),t("p",[e._v("3.Fix the issue of pulling up the input method during operations such as activating nodes on the mobile end, expanding and collapsing.")]),t("p",[e._v("4.Fix the issue where an exception request is initiated when the background image in the theme configuration is none.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Mobile gesture scaling optimization: Scale according to a linear relationship, and adjust the canvas position with double finger displacement.")]),t("p",[e._v("2.Remove the logic of asynchronous rendering nodes and improve the speed of creating new nodes.")]),t("p",[e._v("3.The export of images has been changed from the html2canvas library to the dom to image more library to address the issue of missing text styles in exporting rich text nodes.")]),t("p",[e._v("4.When a non rich text input box enters the editing state, it is deselected by default.")]),t("p",[e._v("5.When there is an activation node, it supports automatically entering text editing mode when pressing the Chinese, numeric, or English buttons.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Add anti shake operations when saving view data to optimize performance.")]),t("p",[e._v("2.Some time-consuming operations add loading effects.")]),t("p",[e._v("3.Improve the dark mode of right-click menus and rich text toolbars.")])]),t("h2",[e._v("0.6.12")]),t("p",[e._v("Fix:")]),t("blockquote",[t("p",[e._v("1.Fix the issue where the indicator in the mini map will also move out of the mini map area when the mind map is completely moved out of the visible area.")]),t("p",[e._v("2.Fix the issue of overly sensitive dual finger scaling on the mobile end.")]),t("p",[e._v("3.Fix the issue of holding down nodes while dragging the canvas in read-only mode.")]),t("p",[e._v("4.Fix the issue of incorrect rendering of the mini map when the distance between the mind map and the top left corner of the browser window is not 0.")]),t("p",[e._v("5.Fix the issue of the prompt block being too large for the new location when moving nodes.")]),t("p",[e._v("6.Fix the issue where search cannot be replaced with empty characters.")]),t("p",[e._v("7.Fixed the issue of missing line breaks after searching and replacing in rich text mode.")]),t("p",[e._v("8.Fixed the issue of missing focus in the input box when clicking on text editing in the outline.")])]),t("p",[e._v("New:")]),t("blockquote",[t("p",[e._v("1.Adding a callback parameter to the node move end event (node_drag) can obtain the uid of the move to the node.")]),t("p",[e._v("2.Support specifying the location to which internal elements are added through configuration.")]),t("p",[e._v("3.Support the format brush function.")]),t("p",[e._v("4.Under the curve style, the connection line style of the root node supports consistency with other nodes.")]),t("p",[e._v("5.Search supports continuous replacement.")]),t("p",[e._v("6.Add and delete button for node image.")]),t("p",[e._v("7.Support dragging the canvas while holding down the middle mouse button.")])]),t("p",[e._v("Demo:")]),t("blockquote",[t("p",[e._v("1.Provide an application takeover mode to facilitate docking with one's own storage services; Supports setting static resource paths at runtime.")]),t("p",[e._v("2.Refactoring outline: 1. No longer use the text style that comes with the node; 2. Support full screen editing of the outline; 3. The outline supports dragging and moving nodes; 4. The outline supports deleting nodes.")]),t("p",[e._v("3.Fix the issue of interface dark mode not updating in the scenario of importing data.")])]),t("h2",[e._v("0.6.11-fix.1")]),t("p",[e._v("Fix: 1.Fixed the issue of invisible editing when node text is white.")]),t("h2",[e._v("0.6.11")]),t("p",[e._v("New: 1.Optimize the mini map, remove node content within the mini map, and optimize performance.")]),t("p",[e._v("Demo: 1.Add a new topic and add tab differentiation to the topic list. 2.Node image upload supports inputting network image addresses. 3.Node image upload supports inputting network images.")]),t("h2",[e._v("0.6.10")]),t("p",[e._v("Fix: 1.Fix the issue of deleting a node after searching for it and not updating the search results when searching again. 2.Fixed an issue where the button for adjusting image size did not update after node operation. 3.Fix the issue of incorrect internal data deep copy location. 4.Fix the issue of ineffective line wrapping in rich text nodes. 5. Fix the issue of node swapping and loss when switching themes and other scenarios.")]),t("p",[e._v("New: 1.Search supports searching for white space characters and replacing them with white space characters.")]),t("p",[e._v("Demo: 1.Support calling up search through icon buttons. 2.Support for switching to dark mode through icon buttons. 3.Optimize search: The mouse is not in the search area and not focused, solving the problem of not being able to delete input text when the mouse is not in the search area. 4.Adjust the interface UI for adding node icons and add a series of node icons. 5.Add a sticker list. 6.Fixed the issue of missing focus in the input box after entering the search box. 7.Support clicking on the icon within the node to display an icon for quick replacement and deletion of the floating panel.")]),t("h2",[e._v("0.6.9-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue of incorrect replacement after a single search.")]),t("p",[e._v("New: 1.We will no longer directly modify the incoming data object, but will make a deep copy internally.")]),t("h2",[e._v("0.6.9")]),t("p",[e._v("Fix: 1.Fixed an issue where setting styles to summary nodes would cause summary nodes to disappear. 2.Fixed the issue of node content not rendering when creating a root instance again when customizing node content. 3.Fix the issue of losing focus when adding a new node while the node is in editing. 2.Fix the issue of continuously pressing the tab key not being able to continuously create child nodes.")]),t("p",[e._v("New: 1.Replace existing "),t("code",[e._v(" ")]),e._v(" in SVG when exporting Characters to avoid exporting SVG errors. 2.Support for search and replace.")]),t("p",[e._v("Demo: 1.When switching themes, it is supported to choose whether to overwrite the set basic style.")]),t("h2",[e._v("0.6.8")]),t("p",[e._v("Fix: 1.Change the shortcut key for inserting a summary to Ctrl+G to avoid conflicts with the save shortcut key. 2.Fix the issue of abnormal switching between rich text editing configuration input boxes while nodes are being edited.")]),t("p",[e._v("New: 1.Modify the copy, cut, and paste logic, and support pasting data from the clipboard.")]),t("p",[e._v("Demo: 1.Fix the issue of not saving the outer margin of the basic style setting node. 2.Supports automatic switching to dark mode based on the theme.")]),t("h2",[e._v("0.6.7")]),t("p",[e._v("Fix: 1.Fixed the issue of missing placeholder elements for the expand and collapse button after node collapse and expansion. 2.Fixed the issue of being able to scale images in read-only mode.")]),t("p",[e._v("New: 1.Support locating to a node based on node instance or node uid. 2.Modify the creation method of node uids and export data to add node uids.")]),t("p",[e._v("Remove: 1.Remove the node transition effect.")]),t("p",[e._v("Demo: 1.Add website homepage. 2.Fixed the issue of missing node styles when creating new nodes in the outline. 3.Fixed the issue of missing edited text after pressing Enter or Tab after editing nodes in the outline. 4.Optimize the node positioning of the outline, and the collapsed nodes will automatically expand. 5.The sidebar button supports folding. 6.Optimize small screen adaptation.")]),t("h2",[e._v("0.6.6")]),t("p",[e._v("New: 1.Support exporting to Xmind new version files. 2.Importing the new version of Xmind file supports importing images from nodes. 3.Add a vertical timeline structure.")]),t("p",[e._v("Fix: 1.The TouchEvent plugin no longer sends click events, solving the problem of two windows opening when clicking on a hyperlink on the mobile end. 2.Fix the issue of dragging and moving a node to become a child node of another node, where the parent node of that node points to not being updated. 3.Fixed an issue where the node border style was not updated when dragging a second level node into a third level node. 4.Fix the issue where the mouse will not trigger the button display when moving into the unfolded or retracted button position, except for the structure growing to the right.")]),t("p",[e._v("optimization: 1.The issue of excessive amplitude when optimizing the touchpad to scale the canvas. 2.The newly created node defaults to selecting all for easy deletion of default text.")]),t("h2",[e._v("0.6.5-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue of adjusting the image size incorrectly while zooming.")]),t("h2",[e._v("0.6.5")]),t("p",[e._v("Fix: 1.Fix the issue of xmind file import errors. 2.Fixed a rare issue where line breaks occur when the width of the node text is decimal.")]),t("p",[e._v("New: 1.The packaged library supports obtaining built-in constants, themes, and other data. 2.Supports configuring the zoom behavior corresponding to the direction of the mouse wheel. 3.Node images support dragging and resizing.")]),t("h2",[e._v("0.6.4-fix.1")]),t("p",[e._v("New: 1.When zooming with the mouse wheel, the default zoom is centered around the current position of the mouse, which can be turned off by configuring.")]),t("p",[e._v("Fix: 1.Fixed an issue where the default value of the zoom center point was not updated after changing the canvas size.")]),t("h2",[e._v("0.6.4")]),t("p",[e._v("New: 1.The default is to scale at the center point of the canvas. 2.Optimize the scaling of both fingers on the mobile end, with the center position of the two fingers as the center point for scaling.")]),t("h2",[e._v("0.6.3")]),t("p",[e._v("Fix: 1.Fix the issue where the summary node will respond to inserting node shortcuts.")]),t("p",[e._v("New: 1.Support custom node content.")]),t("h2",[e._v("0.6.2")]),t("p",[e._v("Fix: 1.Fixed the problem that the new node does not change with the theme in rich Text mode.")]),t("h2",[e._v("0.6.1")]),t("p",[e._v("Fix: 1.Fixed the issue of high movement sensitivity when using the touchpad when changing mouse scrolling to moving the canvas behavior.")]),t("h2",[e._v("0.6.0-fix.1")]),t("p",[e._v("Fix: 1.Fixed the issue of destroying mind maps without setting a background style and reporting errors.")]),t("h2",[e._v("0.6.0")]),t("p",[e._v("Breaking change: Adjusted the directory structure of the simple-mind-map source code, Main impact: 1. The introduction path of the plugin needs to be modified. The constant file path needs to be modified.")]),t("p",[e._v("New: 1.Supports one click zoom to fit the canvas function. 2.Press and hold the Ctrl key to activate the multi selection function on demand through configuration. 3.Support setting to left click to select multiple nodes and right click to drag the canvas. 4. Support controlling whether nodes are allowed to be edited. 5.Add a method for destroying mind maps. 6.Added touch event support plugin.")]),t("p",[e._v("Fix: 1.Fix the issue where holding down the Ctrl key to select multiple nodes does not trigger the click event for the node. 2.Fixed the issue of node style loss when clearing a node and then entering text.")]),t("h2",[e._v("0.5.11")]),t("p",[e._v("New: Supports associative text editing.")]),t("p",[e._v("optimization: Optimizing theme configuration updates, changing configurations that do not involve node size does not trigger node recalculation.")]),t("h2",[e._v("0.5.10")]),t("p",[e._v("New: Optimize node reuse logic using LRU caching algorithm.")]),t("h2",[e._v("0.5.10-fix.1")]),t("p",[e._v("Fix: Fix the issue of import errors.")]),t("h2",[e._v("0.5.10-fix.2")]),t("p",[e._v("Fix: Fixed the issue of switching themes and importing data without triggering data changes in rich text mode.")]),t("p",[e._v("New: Add three new themes.")]),t("h2",[e._v("0.5.9")]),t("p",[e._v("Change: Unified export method format, using "),t("code",[e._v("FileReader")]),e._v(" instead of "),t("code",[e._v("URL.createObjectURL")]),e._v(" to convert "),t("code",[e._v("blob")]),e._v(" data.")]),t("h2",[e._v("0.5.8")]),t("p",[e._v("optimization: 1.The position setting is not triggered when the node position does not change. 2.The unfolding and folding status does not change and does not trigger button updates.")]),t("p",[e._v("New: 1.The default setting is to move the mouse over the node to display the expand and collapse buttons. 2.Support the list of icons that can be inserted into extended nodes.")]),t("h2",[e._v("0.5.7")]),t("p",[e._v("Breaking change:In rich text mode, exporting png has been changed to using html2canvas to convert the entire svg, greatly improving the export speed. However, html2canvas has a bug where the text color inline with the dom node in the foreignObject element cannot be recognized. Therefore, the text color of the exported node is fixed. However, compared to the previously unavailable state of the export, it can at least be exported quickly and smoothly.")]),t("p",[e._v("optimization: Optimize the rich text node editing experience.")]),t("p",[e._v("New: In rich text mode, importing data, initializing data, and switching theme scene node styles support following theme changes.")]),t("h2",[e._v("0.5.6")]),t("p",[e._v("Fix: 1.Fix the issue of node position disorder during fast and multiple renderings in a short period of time. 2.Fix the issue of dragging the canvas while the node is being edited, causing the edit box and node to separate.")]),t("p",[e._v("New: 1.Add a maximum history limit.")]),t("h2",[e._v("0.5.5-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue where the edit box is also outside the canvas when editing nodes outside the canvas. 2.After modifying the structure, reset the transformation to prevent the problem of sudden position changes during the first drag after switching the structure during scaling.")]),t("p",[e._v("optimization: 1.When multiple nodes are selected, as long as there is a cross between the node and the selection area, it is considered selected.")]),t("h2",[e._v("0.5.5-fix.2")]),t("p",[e._v("Fix: 1.Fix mini map error.")]),t("h2",[e._v("0.5.5")]),t("p",[e._v("New: 1.Supports configuring the padding when exporting to PNG, SVG, or PDF. 2.Support the configuration of z-index for node text editing boxes and node comment floating layer elements. 3.Support clicking on areas outside the canvas to end node editing status.")]),t("h2",[e._v("0.5.4")]),t("p",[e._v("New: 1.Add new themes. 2.Added timeline and fishbone structure.")]),t("p",[e._v("Fix: 1.Fix the conflict issue between node right-click and canvas right-click. 2.Fix the bug that the line segment is not hidden when dragging nodes such as organizational chart and directory organization chart.")]),t("p",[e._v("optimization: 1.Optimize the layout of organizational chart. 2.Optimize the layout of the directory organization chart.")]),t("h2",[e._v("0.5.4-fix.1")]),t("p",[e._v("optimization: 1.Optimize fishbone layout.")]),t("h2",[e._v("0.5.3")]),t("p",[e._v("Fix: 1.Fixed the issue of setting the text style when multiple nodes were selected in rich text mode, which would change the text of all selected nodes to the text of the last selected node.")]),t("p",[e._v("New: 1.Support setting the position of the initial central node.")]),t("h3",[e._v("0.5.3-fix.1")]),t("p",[e._v("Fix: 1.Fix the issue where setting the position of the initial central node does not take effect.")]),t("h3",[e._v("0.5.3-fix.2")]),t("p",[e._v("Fix: 1.Fix the issue of not displaying images in nodes when exporting as images.")]),t("h2",[e._v("0.5.2")]),t("p",[e._v("Fix: 1.Remove "),t("code",[e._v("uid")]),e._v(" from exported "),t("code",[e._v("JSON")]),e._v(" data; 2.Clear the node cache pool when re rendering.")]),t("h2",[e._v("0.5.1")]),t("p",[e._v("optimization: 1.Only respond to shortcut key events when the mouse is inside the canvas")]),t("p",[e._v("Fix: 1.Fix the issue of incorrect node position during fast operation")]),t("h2",[e._v("0.5.0")]),t("p",[e._v("This version is mainly about code level changes and optimization, with the core goal of improving rendering performance and reducing stuck issues.")]),t("p",[e._v("New: 1.Support custom expansion and collapse node icons and colors;")]),t("p",[e._v("optimization: 1.Optimize rendering logic, set the theme, move forward and backward, and other operations no longer require full rendering;")]),t("pre",[t("code",[e._v(" 2.Optimize node drag logic, and fix the problem of being unable to drag between two nodes;\n\n 3.Collapse all nodes adds logic to return to the center point;\n\n 4.Fix the problem of nodes flying and scrambling caused by triggering rendering multiple times in a short time;\n\n 5.Optimize the experience of node editing;\n")])]),t("p",[e._v("Fix: 1.Fix the issue where the setData method does not trigger history;")]),t("p",[e._v("modify: Starting from version 0.5.0, considering performance issues, the node activation state can only modify shape related styles:")]),t("pre",{staticClass:"hljs"},[t("code",[e._v("[\n "),t("span",{staticClass:"hljs-string"},[e._v("'fillColor'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderColor'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderWidth'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderDasharray'")]),e._v(",\n "),t("span",{staticClass:"hljs-string"},[e._v("'borderRadius'")]),e._v("\n]\n")])]),t("h2",[e._v("0.4.7")]),t("p",[e._v("optimization: 1.During rich text editing, when initially focusing, all are no longer selected by default; 2.When editing rich text, use the node fill color as the background color to avoid being invisible when the node color is white. 3.Node activation state switching no longer triggers history. 4.Triggering history multiple times in a short time will only add the last data. 5.Optimize the addition of historical records. When there is a rollback, delete the historical data after the current pointer when adding a new record again.")]),t("p",[e._v("New: 1.Support for importing and exporting Markdown format files. 2.Support for configuring initial text when inserting nodes. 3.Expand the commands for inserting and deleting nodes to support specifying nodes.")]),t("h2",[e._v("0.4.6")]),t("p",[e._v("New: 1.Associated lines support adjusting control points.")]),t("p",[e._v("optimization: 1.When adding historical data, filter data that has not changed compared to the previous time.")]),t("p",[e._v("Fix: 1.Fixed a conflict between the direction keys and the navigation function of the direction keys during node editing. 2.Fixed the issue of node id loss when dragging a mobile node, which can cause associated lines to be lost.")]),t("h2",[e._v("0.4.5")]),t("p",[e._v("New: 1.Supports associative lines. 2.You can also drag the canvas by holding down the root node. 3. Hold down the ctrl key to adjust multiple selected nodes.")]),t("h2",[e._v("0.4.4")]),t("p",[e._v("New: Support horizontal scrolling in response to the mouse.")]),t("h2",[e._v("0.4.3")]),t("p",[e._v("Fix: No trigger after forward and backward "),t("code",[e._v("data_ Change")]),e._v(" event.")]),t("p",[e._v("New: Support user-defined mouse wheel events; The mouse wheel is adjusted to support zooming and moving the view up and down.")]),t("h2",[e._v("0.4.2")]),t("p",[e._v("New: The "),t("code",[e._v("setText")]),e._v(" method of the Node class adds a second parameter to support setting rich text content.")]),t("h2",[e._v("0.4.1")]),t("p",[e._v("New: 1.Add and throw node mouseenter and mouseleave events; 2.Node rich text supports setting background color; 3.Node rich text supports clear style.")]),t("p",[e._v("Fix: 1.Mac system touchpad scaling is the opposite problem; 2.When the device window.devicePixelRatio is not 1, the size of the rich text node in the exported image will become larger when there are rich text nodes.")]),t("h2",[e._v("0.4.0")]),t("p",[e._v("New: The node supports rich text editing.")]),t("h2",[e._v("0.3.4")]),t("p",[e._v("New: Automatic line wrapping function is added to node text.")]),t("p",[e._v("Fix: 1.Fix the problem of deletion exceptions if there are root nodes in the batch deleted nodes. 2.Fix the problem that high node height will overlap with other nodes in the case of bottom edge style.")]),t("h2",[e._v("0.3.3")]),t("p",[e._v("Fix: The root node text cannot wrap.")]),t("h2",[e._v("0.3.2")]),t("p",[e._v("Fix: 1.Fix the problem that the node style is not updated when the secondary node is dragged to other nodes or other nodes are dragged to the secondary node; 2.Fix the problem that when the actual content of the mind map is larger than the screen width and height, the excess part is not watermarked when exporting.")]),t("h2",[e._v("0.3.1")]),t("p",[e._v("Fix: 1.The problem that deleting the background image does not take effect; 2.The problem that the connector runs above the root node when the node is dragged to the root node.")]),t("p",[e._v("New: Add position and size settings for background image display. This setting is also supported for exported pictures.")]),t("h2",[e._v("0.3.0")]),t("p",[e._v("Upgrade to plugin architecture, pull out some non-core functions as plugins, register as needed, and reduce the overall volume.")]),t("h2",[e._v("0.2.24")]),t("p",[e._v("New: Node free drag is changed to configurable, the default is "),t("code",[e._v("false")]),e._v(", not open; Support add watermark.")]),t("h2",[e._v("0.2.23")]),t("p",[e._v("New: Support register new theme.")]),t("h2",[e._v("0.2.22")]),t("p",[e._v("optimization:The theme and structure pictures of the built-in "),t("code",[e._v("simple-mind-map")]),e._v(" package are removed and replaced by user self-maintenance. The original pictures can be found in the "),t("code",[e._v("web/assets/img/")]),e._v(" directory.")]),t("h2",[e._v("0.2.21")]),t("p",[e._v("New: Support node horizontal line style.")]),t("h2",[e._v("0.2.20")]),t("p",[e._v("fix:When the distance from the canvas to the upper left corner of the window is not 0, the node dragging will have an offset problem.")]),t("h2",[e._v("0.2.19")]),t("p",[e._v("fix:When the node is not activated, pressing any key will trigger the problem of automatic focus.")]),t("h2",[e._v("0.2.18")]),t("p",[e._v("optimization:Keyboard navigation algorithm for finding focus, supporting simple algorithm, region algorithm and shadow algorithm.")]),t("h2",[e._v("0.2.17")]),t("p",[e._v("New:Keyboard navigation, that is, switch the active nodes through the direction keys; The node text content can be edited directly in the outline.")]),t("h2",[e._v("0.2.16")]),t("p",[e._v("optimization:Mini map; drag performance.")]),t("h2",[e._v("0.2.15")]),t("p",[e._v("optimization:Local file editing.")]),t("p",[e._v("New:Double-click the image in the node to preview the large image.")]),t("h2",[e._v("0.2.14")]),t("p",[e._v("optimization:Automatically expand when inserting child nodes.")]),t("p",[e._v("fix:The error occurred when the mini map was closed.")]),t("h2",[e._v("0.2.13")]),t("p",[e._v("fix:The child node is missing when collapsing state replication.")]),t("h2",[e._v("0.2.11")]),t("p",[e._v("fix:Fix the problem that is lost when the child node collapses state replication.")]),t("p",[e._v("New:Support mini map.")]),t("h2",[e._v("0.2.10")]),t("p",[e._v("optimization:Focus immediately when you manually create a node.")]),t("p",[e._v("fix:Connection style depth update problem.")]),t("p",[e._v("New:Logical structure diagram and mind map add linear connection style and direct connection style.")]),t("h2",[e._v("0.2.9")]),t("p",[e._v("New:Support the creation, opening and saving of local files on the computer.")]),t("h2",[e._v("0.2.8")]),t("p",[e._v("fix:Xmind8 version file import failed.")]),t("p",[e._v("New:Expanding to the specified level is supported.")]),t("h2",[e._v("0.2.7")]),t("p",[e._v("fix:The root node adds multiple nodes to burst the stack.")]),t("p",[e._v("New:Support import .xmind file.")]),t("h2",[e._v("0.2.6")]),t("p",[e._v("New:The title tag is added when exporting svg.")]),t("h2",[e._v("0.2.5")]),t("p",[e._v("fix:Bugs caused by node expansion and collapse.")]),t("p",[e._v("New:Node supports custom line styles.")]),t("h2",[e._v("0.2.4")]),t("p",[e._v("New:Nodes support multiple shapes.")]),t("h2",[e._v("0.2.3")]),t("p",[e._v("fix:Shortcut key conflicts when editing node text; Right-click menu shortcut prompt error; Right-click menu shortcut prompt.")]),t("h2",[e._v("0.2.2")]),t("p",[e._v("fix:The input string '/' conflicts with the shortcut key '/'.")]),t("h2",[e._v("0.2.1")]),t("p",[e._v("New:Support export as pdf.")]),t("h2",[e._v("0.2.0")]),t("p",[e._v("New:Classic4 theme;Support adding summary; Support free drag; Move Node Up, Move Node Down, Copy Node, Cut Node, Paste Node, One-click Organize Cloth Shortcut; Library packaging; Ctrl+left click to select multiple.")]),t("h2",[e._v("0.1.18")]),t("p",[e._v("fix:The problem that the node icon cannot be deleted; The tool button is grayed out and can still be clicked.")]),t("h2",[e._v("0.1.17")]),t("p",[e._v("New:Add read-only mode.")]),t("h2",[e._v("0.1.16")]),t("p",[e._v("New:Node notes support markdown and rich text.")]),t("p",[e._v("fix:Can't select text; Node annotations cannot hide problems after node activation; When editing text such as hyperlinks, notes, labels, etc., the return key and return key conflict with the shortcut key of mind map.")]),t("h2",[e._v("0.1.15")]),t("p",[e._v("New:The status data supports saving the active status and view status (drag position, zoom value);Support node drag.")]),t("h2",[e._v("0.1.14")]),t("p",[e._v("fix:There are problems with setting topics when activating nodes.")]),t("h2",[e._v("0.1.13")]),t("p",[e._v("New:Shortcut key function; Support export as json。")]),t("p",[e._v("optimization:Some details.")]),t("h2",[e._v("0.1.12")]),t("p",[e._v("New:Local storage;Right-click menu function, etc.")]),t("h2",[e._v("0.1.0")]),t("p",[e._v("Complete basic functions.")])])}],s={},a=s,r=i("2877"),d=Object(r["a"])(a,o,n,!1,null,null,null);t["default"]=d.exports}}]); \ No newline at end of file diff --git a/dist/js/chunk-2d216004.js b/dist/js/chunk-2d216004.js index c08a8543..20faf739 100644 --- a/dist/js/chunk-2d216004.js +++ b/dist/js/chunk-2d216004.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216004"],{c133:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this;e._self._c;return e._m(0)},a=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Node instance")]),t("p",[e._v("Each node will instantiate a "),t("code",[e._v("node")]),e._v(" instance")]),t("h2",[e._v("Property")]),t("h3",[e._v("nodeData")]),t("p",[e._v("The real data corresponding to this node")]),t("h3",[e._v("uid")]),t("p",[e._v("The unique identifier of this node")]),t("h3",[e._v("isRoot")]),t("p",[e._v("Whether it is the root node")]),t("h3",[e._v("layerIndex")]),t("p",[e._v("Node level")]),t("h3",[e._v("width")]),t("p",[e._v("Width of the node")]),t("h3",[e._v("height")]),t("p",[e._v("Height of the node")]),t("h3",[e._v("left")]),t("p",[t("code",[e._v("left")]),e._v(" position of the node")]),t("h3",[e._v("top")]),t("p",[t("code",[e._v("top")]),e._v(" position of the node")]),t("h3",[e._v("parent")]),t("p",[e._v("Parent node of the node")]),t("h3",[e._v("children")]),t("p",[e._v("List of child nodes of the node")]),t("h3",[e._v("group")]),t("p",[e._v("Node is the content container, "),t("code",[e._v("svg")]),e._v(" object")]),t("h3",[e._v("isDrag")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Whether the node is currently being dragged")]),t("h2",[e._v("Methods")]),t("h3",[e._v("setGeneralizationOpacity(val)")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("ul",[t("li",[t("code",[e._v("val")]),e._v(":Number, 0-1,Opacity")])]),t("p",[e._v("Set the transparency of summary nodes and curves.")]),t("h3",[e._v("formatGetGeneralization()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Obtain node summary data.")]),t("h3",[e._v("getIndexInBrothers()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Gets the index of the node in the sibling node list.")]),t("h3",[e._v("getRectInSvg()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Obtain the size and position information of the node. The width and height are the actual width and height after applying the scaling effect, and the position information is relative to the canvas.")]),t("h3",[e._v("getRect()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Obtain the size and position information of the node. The width and height are the actual width and height after applying the scaling effect, and the position is relative to the upper left corner of the browser window.")]),t("h3",[e._v("ancestorHasGeneralization()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Check if there are ancestor nodes with a summary.")]),t("h3",[e._v("getNoteContentPosition()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Obtain the display position of node comments. When a node has comments and is displaying a state, dragging or zooming will cause the comment floating layer to detach from the node. This method can be used to obtain a new position and update the comment floating layer.")]),t("h3",[e._v("updateNodeByActive(active)")]),t("blockquote",[t("p",[e._v("v0.8.0+")])]),t("ul",[t("li",[t("code",[e._v("active")]),e._v(":Boolean, active status.")])]),t("p",[e._v("Update nodes based on whether they are activated or not. The main task is to update the display and hiding of the expand and collapse buttons for nodes.")]),t("h3",[e._v("setOpacity(val)")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("ul",[t("li",[t("code",[e._v("val")]),e._v(": Opacity value,0-1")])]),t("p",[e._v("Set node transparency, including connecting lines and child nodes.")]),t("h3",[e._v("hideChildren()")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("p",[e._v("Hide subordinate nodes.")]),t("h3",[e._v("showChildren()")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("p",[e._v("Display subordinate nodes.")]),t("h3",[e._v("hasCustomStyle()")]),t("blockquote",[t("p",[e._v("v0.6.2+")])]),t("p",[e._v("Gets whether a custom style has been set.")]),t("h3",[e._v("getSize()")]),t("p",[e._v("Update the width and height of the node by recreating the node content, and return a Boolean value indicating whether the width and height have changed")]),t("h3",[e._v("render()")]),t("p",[e._v("Recursively render this node and all its child nodes")]),t("h3",[e._v("updateNodeShape()")]),t("blockquote",[t("p",[e._v("v0.5.0+")])]),t("p",[e._v("Update node shape nodes. For example, when the node status changes, call this method to display or deactivate the style.")]),t("h3",[e._v("remove()")]),t("p",[e._v("Recursive deletion, which is only deleted from the canvas. The node container is still present, and can be reinserted back into the canvas in the future")]),t("h3",[e._v("destroy()")]),t("blockquote",[t("p",[e._v("v0.5.0+")])]),t("p",[e._v("Destroying a node will not only delete it from the canvas, but also directly empty the original node, which cannot be inserted back into the canvas in the future")]),t("h3",[e._v("renderLine()")]),t("p",[e._v("Re-render the line from this node to its child nodes")]),t("h3",[e._v("removeLine()")]),t("p",[e._v("Remove the line from this node to its child nodes")]),t("h3",[e._v("renderExpandBtn()")]),t("p",[e._v("Render the content of the expand/collapse button")]),t("h3",[e._v("removeExpandBtn()")]),t("p",[e._v("Remove the expand/collapse button")]),t("h3",[e._v("getStyle(prop, root, isActive)")]),t("p",[e._v("Get the final style value applied to this node")]),t("p",[t("code",[e._v("prop")]),e._v(": the style property to get")]),t("p",[t("code",[e._v("root")]),e._v(": whether it is the root node, default "),t("code",[e._v("false")])]),t("p",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned, whether the value being fetched is the active state style value, default "),t("code",[e._v("false")])]),t("h3",[e._v("setStyle(prop, value, isActive)")]),t("ul",[t("li",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned")])]),t("p",[e._v("Modify a style of the node, a shortcut method for the "),t("code",[e._v("SET_NODE_STYLE")]),e._v(" command")]),t("h3",[e._v("setStyles(style, isActive)")]),t("blockquote",[t("p",[e._v("v0.6.12+")])]),t("ul",[t("li",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned")])]),t("p",[e._v("Modify multiple styles of nodes, a shortcut method for the "),t("code",[e._v("SET_NODE_STYLES")]),e._v(" command")]),t("h3",[e._v("getData(key)")]),t("p",[e._v("Get the specified value in the "),t("code",[e._v("data")]),e._v(" object of the node's real data "),t("code",[e._v("nodeData")]),e._v(", if "),t("code",[e._v("key")]),e._v(" is not passed, return the "),t("code",[e._v("data")]),e._v(" object")]),t("h3",[e._v("setData(data)")]),t("p",[e._v("Set the value of the specified key in the data object of the node's real data nodeData, "),t("code",[e._v("SET_NODE_DATA")]),e._v(" command's shortcut method")]),t("h3",[e._v("setText(text, richText)")]),t("ul",[t("li",[t("p",[t("code",[e._v("richText")]),e._v(": v0.4.2+,"),t("code",[e._v("Boolean")]),e._v(", If you want to set rich text content, that is, "),t("code",[e._v("html")]),e._v(" character, "),t("code",[e._v("richText")]),e._v(" needs to be passed "),t("code",[e._v("true")])])]),t("li",[t("p",[t("code",[e._v("resetRichText")]),e._v(": v0.6.10+, "),t("code",[e._v("Boolean")]),e._v(", whether to reset rich text, The default is 'false'. If 'true' is passed, the style of the rich text node will be reset")])])]),t("p",[e._v("Setting the node text, a shortcut for the "),t("code",[e._v("SET_NODE_TEXT")]),e._v(" command")]),t("h3",[e._v("setImage(imgData)")]),t("p",[e._v("Setting the node image, a shortcut for the "),t("code",[e._v("SET_NODE_IMAGE")]),e._v(" command")]),t("h3",[e._v("setIcon(icons)")]),t("p",[e._v("Setting the node icon, a shortcut for the "),t("code",[e._v("SET_NODE_ICON")]),e._v(" command")]),t("h3",[e._v("setHyperlink(link, title)")]),t("p",[e._v("Setting the node hyperlink, a shortcut for the "),t("code",[e._v("SET_NODE_HYPERLINK")]),e._v(" command")]),t("h3",[e._v("setNote(note)")]),t("p",[e._v("Setting the node note, a shortcut for the "),t("code",[e._v("SET_NODE_NOTE")]),e._v(" command")]),t("h3",[e._v("setTag(tag)")]),t("p",[e._v("Setting the node tag, a shortcut for the "),t("code",[e._v("SET_NODE_TAG")]),e._v(' command"')]),t("h3",[e._v("hide()")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Hide node and its sub-nodes")]),t("h3",[e._v("show()")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Show node and its sub-nodes")]),t("h3",[e._v("isParent(node)")]),t("blockquote",[t("p",[e._v("v0.1.5+:Detect whether the current node is an ancestor node of a certain node")])]),t("blockquote",[t("p",[e._v("v0.8.1+:Detect whether the current node is the parent node of a certain node")])]),t("h3",[e._v("isAncestor(node)")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Detect whether the current node is an ancestor node of a certain node")]),t("h3",[e._v("isBrother(node)")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Check if the current node is a sibling of a certain node")]),t("h3",[e._v("checkHasGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if there is a summary")]),t("h3",[e._v("checkHasSelfGeneralization()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Check if there is a summary of oneself, not a sub node interval summary")]),t("h3",[e._v("hideGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Hide summary node")]),t("h3",[e._v("showGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Show summary node")]),t("h3",[e._v("updateGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Update summary node")]),t("h3",[e._v("hasCustomPosition()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if the node has custom data")]),t("h3",[e._v("ancestorHasCustomPosition()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if there is an ancestor node with custom position")]),t("h3",[e._v("getShape()")]),t("blockquote",[t("p",[e._v("v0.2.4+")])]),t("p",[e._v("Get node shape")]),t("h3",[e._v("setShape(shape)")]),t("blockquote",[t("p",[e._v("v0.2.4+")])]),t("p",[e._v("Set node shape, a shortcut method for the "),t("code",[e._v("SET_NODE_SHAPE")]),e._v(" command")]),t("h3",[e._v("getSelfStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the node's own custom style")]),t("h3",[e._v("getParentSelfStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the custom style of the nearest ancestor node with its own custom style")]),t("h3",[e._v("getSelfInhertStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the node's own inheritable custom style")])])}],v={},h=v,i=o("2877"),d=Object(i["a"])(h,n,a,!1,null,null,null);t["default"]=d.exports}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d216004"],{c133:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this;e._self._c;return e._m(0)},a=[function(){var e=this,t=e._self._c;return t("div",[t("h1",[e._v("Node instance")]),t("p",[e._v("Each node will instantiate a "),t("code",[e._v("node")]),e._v(" instance")]),t("h2",[e._v("Property")]),t("h3",[e._v("nodeData")]),t("p",[e._v("The real data corresponding to this node")]),t("h3",[e._v("uid")]),t("p",[e._v("The unique identifier of this node")]),t("h3",[e._v("isRoot")]),t("p",[e._v("Whether it is the root node")]),t("h3",[e._v("layerIndex")]),t("p",[e._v("Node level")]),t("h3",[e._v("width")]),t("p",[e._v("Width of the node")]),t("h3",[e._v("height")]),t("p",[e._v("Height of the node")]),t("h3",[e._v("left")]),t("p",[t("code",[e._v("left")]),e._v(" position of the node")]),t("h3",[e._v("top")]),t("p",[t("code",[e._v("top")]),e._v(" position of the node")]),t("h3",[e._v("parent")]),t("p",[e._v("Parent node of the node")]),t("h3",[e._v("children")]),t("p",[e._v("List of child nodes of the node")]),t("h3",[e._v("group")]),t("p",[e._v("Node is the content container, "),t("code",[e._v("svg")]),e._v(" object")]),t("h3",[e._v("isDrag")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Whether the node is currently being dragged")]),t("h2",[e._v("Methods")]),t("h3",[e._v("getPureData(removeActiveState = true, removeId = false)")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("ul",[t("li",[t("p",[t("code",[e._v("removeActiveState")]),e._v(":Is remove the activation status of the node")])]),t("li",[t("p",[t("code",[e._v("removeId")]),e._v(":Is remove the uid of the node")])])]),t("p",[e._v("Serialize a node to obtain its pure data, excluding references to node instances.")]),t("h3",[e._v("setGeneralizationOpacity(val)")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("ul",[t("li",[t("code",[e._v("val")]),e._v(":Number, 0-1,Opacity")])]),t("p",[e._v("Set the transparency of summary nodes and curves.")]),t("h3",[e._v("formatGetGeneralization()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Obtain node summary data.")]),t("h3",[e._v("getIndexInBrothers()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Gets the index of the node in the sibling node list.")]),t("h3",[e._v("getRectInSvg()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Obtain the size and position information of the node. The width and height are the actual width and height after applying the scaling effect, and the position information is relative to the canvas.")]),t("h3",[e._v("getRect()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Obtain the size and position information of the node. The width and height are the actual width and height after applying the scaling effect, and the position is relative to the upper left corner of the browser window.")]),t("h3",[e._v("ancestorHasGeneralization()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Check if there are ancestor nodes with a summary.")]),t("h3",[e._v("getNoteContentPosition()")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Obtain the display position of node comments. When a node has comments and is displaying a state, dragging or zooming will cause the comment floating layer to detach from the node. This method can be used to obtain a new position and update the comment floating layer.")]),t("h3",[e._v("updateNodeByActive(active)")]),t("blockquote",[t("p",[e._v("v0.8.0+")])]),t("ul",[t("li",[t("code",[e._v("active")]),e._v(":Boolean, active status.")])]),t("p",[e._v("Update nodes based on whether they are activated or not. The main task is to update the display and hiding of the expand and collapse buttons for nodes.")]),t("h3",[e._v("setOpacity(val)")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("ul",[t("li",[t("code",[e._v("val")]),e._v(": Opacity value,0-1")])]),t("p",[e._v("Set node transparency, including connecting lines and child nodes.")]),t("h3",[e._v("hideChildren()")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("p",[e._v("Hide subordinate nodes.")]),t("h3",[e._v("showChildren()")]),t("blockquote",[t("p",[e._v("v0.7.2+")])]),t("p",[e._v("Display subordinate nodes.")]),t("h3",[e._v("hasCustomStyle()")]),t("blockquote",[t("p",[e._v("v0.6.2+")])]),t("p",[e._v("Gets whether a custom style has been set.")]),t("h3",[e._v("getSize()")]),t("p",[e._v("Update the width and height of the node by recreating the node content, and return a Boolean value indicating whether the width and height have changed")]),t("h3",[e._v("render()")]),t("p",[e._v("Recursively render this node and all its child nodes")]),t("h3",[e._v("updateNodeShape()")]),t("blockquote",[t("p",[e._v("v0.5.0+")])]),t("p",[e._v("Update node shape nodes. For example, when the node status changes, call this method to display or deactivate the style.")]),t("h3",[e._v("remove()")]),t("p",[e._v("Recursive deletion, which is only deleted from the canvas. The node container is still present, and can be reinserted back into the canvas in the future")]),t("h3",[e._v("destroy()")]),t("blockquote",[t("p",[e._v("v0.5.0+")])]),t("p",[e._v("Destroying a node will not only delete it from the canvas, but also directly empty the original node, which cannot be inserted back into the canvas in the future")]),t("h3",[e._v("renderLine()")]),t("p",[e._v("Re-render the line from this node to its child nodes")]),t("h3",[e._v("removeLine()")]),t("p",[e._v("Remove the line from this node to its child nodes")]),t("h3",[e._v("renderExpandBtn()")]),t("p",[e._v("Render the content of the expand/collapse button")]),t("h3",[e._v("removeExpandBtn()")]),t("p",[e._v("Remove the expand/collapse button")]),t("h3",[e._v("getStyle(prop, root, isActive)")]),t("p",[e._v("Get the final style value applied to this node")]),t("p",[t("code",[e._v("prop")]),e._v(": the style property to get")]),t("p",[t("code",[e._v("root")]),e._v(": whether it is the root node, default "),t("code",[e._v("false")])]),t("p",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned, whether the value being fetched is the active state style value, default "),t("code",[e._v("false")])]),t("h3",[e._v("setStyle(prop, value, isActive)")]),t("ul",[t("li",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned")])]),t("p",[e._v("Modify a style of the node, a shortcut method for the "),t("code",[e._v("SET_NODE_STYLE")]),e._v(" command")]),t("h3",[e._v("setStyles(style, isActive)")]),t("blockquote",[t("p",[e._v("v0.6.12+")])]),t("ul",[t("li",[t("code",[e._v("isActive")]),e._v(": v0.7.0+has been abandoned")])]),t("p",[e._v("Modify multiple styles of nodes, a shortcut method for the "),t("code",[e._v("SET_NODE_STYLES")]),e._v(" command")]),t("h3",[e._v("getData(key)")]),t("p",[e._v("Get the specified value in the "),t("code",[e._v("data")]),e._v(" object of the node's real data "),t("code",[e._v("nodeData")]),e._v(", if "),t("code",[e._v("key")]),e._v(" is not passed, return the "),t("code",[e._v("data")]),e._v(" object")]),t("h3",[e._v("setData(data)")]),t("p",[e._v("Set the value of the specified key in the data object of the node's real data nodeData, "),t("code",[e._v("SET_NODE_DATA")]),e._v(" command's shortcut method")]),t("h3",[e._v("setText(text, richText)")]),t("ul",[t("li",[t("p",[t("code",[e._v("richText")]),e._v(": v0.4.2+,"),t("code",[e._v("Boolean")]),e._v(", If you want to set rich text content, that is, "),t("code",[e._v("html")]),e._v(" character, "),t("code",[e._v("richText")]),e._v(" needs to be passed "),t("code",[e._v("true")])])]),t("li",[t("p",[t("code",[e._v("resetRichText")]),e._v(": v0.6.10+, "),t("code",[e._v("Boolean")]),e._v(", whether to reset rich text, The default is 'false'. If 'true' is passed, the style of the rich text node will be reset")])])]),t("p",[e._v("Setting the node text, a shortcut for the "),t("code",[e._v("SET_NODE_TEXT")]),e._v(" command")]),t("h3",[e._v("setImage(imgData)")]),t("p",[e._v("Setting the node image, a shortcut for the "),t("code",[e._v("SET_NODE_IMAGE")]),e._v(" command")]),t("h3",[e._v("setIcon(icons)")]),t("p",[e._v("Setting the node icon, a shortcut for the "),t("code",[e._v("SET_NODE_ICON")]),e._v(" command")]),t("h3",[e._v("setHyperlink(link, title)")]),t("p",[e._v("Setting the node hyperlink, a shortcut for the "),t("code",[e._v("SET_NODE_HYPERLINK")]),e._v(" command")]),t("h3",[e._v("setNote(note)")]),t("p",[e._v("Setting the node note, a shortcut for the "),t("code",[e._v("SET_NODE_NOTE")]),e._v(" command")]),t("h3",[e._v("setTag(tag)")]),t("p",[e._v("Setting the node tag, a shortcut for the "),t("code",[e._v("SET_NODE_TAG")]),e._v(' command"')]),t("h3",[e._v("hide()")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Hide node and its sub-nodes")]),t("h3",[e._v("show()")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Show node and its sub-nodes")]),t("h3",[e._v("isParent(node)")]),t("blockquote",[t("p",[e._v("v0.1.5+:Detect whether the current node is an ancestor node of a certain node")])]),t("blockquote",[t("p",[e._v("v0.8.1+:Detect whether the current node is the parent node of a certain node")])]),t("h3",[e._v("isAncestor(node)")]),t("blockquote",[t("p",[e._v("v0.8.1+")])]),t("p",[e._v("Detect whether the current node is an ancestor node of a certain node")]),t("h3",[e._v("isBrother(node)")]),t("blockquote",[t("p",[e._v("v0.1.5+")])]),t("p",[e._v("Check if the current node is a sibling of a certain node")]),t("h3",[e._v("checkHasGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if there is a summary")]),t("h3",[e._v("checkHasSelfGeneralization()")]),t("blockquote",[t("p",[e._v("v0.9.0+")])]),t("p",[e._v("Check if there is a summary of oneself, not a sub node interval summary")]),t("h3",[e._v("hideGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Hide summary node")]),t("h3",[e._v("showGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Show summary node")]),t("h3",[e._v("updateGeneralization()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Update summary node")]),t("h3",[e._v("hasCustomPosition()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if the node has custom data")]),t("h3",[e._v("ancestorHasCustomPosition()")]),t("blockquote",[t("p",[e._v("v0.2.0+")])]),t("p",[e._v("Check if there is an ancestor node with custom position")]),t("h3",[e._v("getShape()")]),t("blockquote",[t("p",[e._v("v0.2.4+")])]),t("p",[e._v("Get node shape")]),t("h3",[e._v("setShape(shape)")]),t("blockquote",[t("p",[e._v("v0.2.4+")])]),t("p",[e._v("Set node shape, a shortcut method for the "),t("code",[e._v("SET_NODE_SHAPE")]),e._v(" command")]),t("h3",[e._v("getSelfStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the node's own custom style")]),t("h3",[e._v("getParentSelfStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the custom style of the nearest ancestor node with its own custom style")]),t("h3",[e._v("getSelfInhertStyle(prop)")]),t("blockquote",[t("p",[e._v("v0.2.5+")])]),t("p",[e._v("Get the node's own inheritable custom style")])])}],v={},h=v,i=o("2877"),d=Object(i["a"])(h,n,a,!1,null,null,null);t["default"]=d.exports}}]); \ No newline at end of file diff --git a/dist/js/chunk-38caf5df.js b/dist/js/chunk-38caf5df.js index 6492a1e1..4cd105f5 100644 --- a/dist/js/chunk-38caf5df.js +++ b/dist/js/chunk-38caf5df.js @@ -34,9 +34,9 @@ PERFORMANCE OF THIS SOFTWARE. * @license MIT * * BUILT: Wed Jan 26 2022 23:19:07 GMT+0100 (Mitteleuropäische Normalzeit) -*/const yo={},wo=[];function xo(e,t){if(Array.isArray(e))for(const n of e)xo(n,t);else if("object"!==typeof e)Co(Object.getOwnPropertyNames(t)),yo[e]=Object.assign(yo[e]||{},t);else for(const n in e)xo(n,e[n])}function ko(e){return yo[e]||{}}function Ao(){return[...new Set(wo)]}function Co(e){wo.push(...e)}function Eo(e,t){let n;const r=e.length,i=[];for(n=0;n=0;t--)Jo(e.children[t]);return e.id?(e.id=Xo(e.nodeName),e):e}function Qo(e,t){let n,r;for(e=Array.isArray(e)?e:[e],r=e.length-1;r>=0;r--)for(n in t)e[r].prototype[n]=t[n]}function $o(e){return function(...t){const n=t[t.length-1];return!n||n.constructor!==Object||n instanceof Array?e.apply(this,t):e.apply(this,t.slice(0,-1)).attr(n)}}function ea(){return this.parent().children()}function ta(){return this.parent().index(this)}function na(){return this.siblings()[this.position()+1]}function ra(){return this.siblings()[this.position()-1]}function ia(){const e=this.position(),t=this.parent();return t.add(this.remove(),e+1),this}function oa(){const e=this.position(),t=this.parent();return t.add(this.remove(),e?e-1:0),this}function aa(){const e=this.parent();return e.add(this.remove()),this}function sa(){const e=this.parent();return e.add(this.remove(),0),this}function la(e){e=qo(e),e.remove();const t=this.position();return this.parent().add(e,t),this}function ca(e){e=qo(e),e.remove();const t=this.position();return this.parent().add(e,t+1),this}function ua(e){return e=qo(e),e.before(this),this}function ha(e){return e=qo(e),e.after(this),this}xo("Dom",{siblings:ea,position:ta,next:na,prev:ra,forward:ia,backward:oa,front:aa,back:sa,before:la,after:ca,insertBefore:ua,insertAfter:ha});const da=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,fa=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,pa=/rgb\((\d+),(\d+),(\d+)\)/,ma=/(#[a-z_][a-z0-9\-_]*)/i,ga=/\)\s*,?\s*/,va=/\s/g,ba=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ya=/^rgb\(/,wa=/^(\s+)?$/,xa=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ka=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Aa=/[\s,]+/,Ca=/[MLHVCSQTAZ]/i;function Ea(){const e=this.attr("class");return null==e?[]:e.trim().split(Aa)}function Sa(e){return-1!==this.classes().indexOf(e)}function Ta(e){if(!this.hasClass(e)){const t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this}function Na(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!==e})).join(" ")),this}function Ma(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)}function La(e,t){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(e){return!!e.length})).forEach((function(e){const t=e.split(/\s*:\s*/);n[t[0]]=t[1]})),n;if(arguments.length<2){if(Array.isArray(e)){for(const t of e){const e=No(t);n[t]=this.node.style[e]}return n}if("string"===typeof e)return this.node.style[No(e)];if("object"===typeof e)for(const t in e)this.node.style[No(t)]=null==e[t]||wa.test(e[t])?"":e[t]}return 2===arguments.length&&(this.node.style[No(e)]=null==t||wa.test(t)?"":t),this}function Oa(){return this.css("display","")}function Da(){return this.css("display","none")}function Pa(){return"none"!==this.css("display")}function Ia(e,t,n){if(null==e)return this.data(Eo(So(this.node.attributes,e=>0===e.nodeName.indexOf("data-")),e=>e.nodeName.slice(5)));if(e instanceof Array){const t={};for(const n of e)t[n]=this.data(n);return t}if("object"===typeof e)for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(r){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"===typeof t||"number"===typeof t?t:JSON.stringify(t));return this}function Ra(e,t){if("object"===typeof arguments[0])for(const n in e)this.remember(n,e[n]);else{if(1===arguments.length)return this.memory()[e];this.memory()[e]=t}return this}function Fa(){if(0===arguments.length)this._memory={};else for(let e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this}function za(){return this._memory=this._memory||{}}function Ba(e){return 4===e.length?["#",e.substring(1,2),e.substring(1,2),e.substring(2,3),e.substring(2,3),e.substring(3,4),e.substring(3,4)].join(""):e}function _a(e){const t=Math.round(e),n=Math.max(0,Math.min(255,t)),r=n.toString(16);return 1===r.length?"0"+r:r}function ja(e,t){for(let n=t.length;n--;)if(null==e[t[n]])return!1;return!0}function Ha(e,t){const n=ja(e,"rgb")?{_a:e.r,_b:e.g,_c:e.b,_d:0,space:"rgb"}:ja(e,"xyz")?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:"xyz"}:ja(e,"hsl")?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:"hsl"}:ja(e,"lab")?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:"lab"}:ja(e,"lch")?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:"lch"}:ja(e,"cmyk")?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=t||n.space,n}function Ua(e){return"lab"===e||"xyz"===e||"lch"===e}function qa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}xo("Dom",{classes:Ea,hasClass:Sa,addClass:Ta,removeClass:Na,toggleClass:Ma}),xo("Dom",{css:La,show:Oa,hide:Da,visible:Pa}),xo("Dom",{data:Ia}),xo("Dom",{remember:Ra,forget:Fa,memory:za});class Ga{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ga||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&"number"===typeof e.r&&"number"===typeof e.g&&"number"===typeof e.b}static random(e="vibrant",t,n){const{random:r,round:i,sin:o,PI:a}=Math;if("vibrant"===e){const e=24*r()+57,t=38*r()+45,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("sine"===e){t=null==t?r():t;const e=i(80*o(2*a*t/.5+.01)+150),n=i(50*o(2*a*t/.5+4.6)+200),s=i(100*o(2*a*t/.5+2.3)+150),l=new Ga(e,n,s);return l}if("pastel"===e){const e=8*r()+86,t=17*r()+9,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("dark"===e){const e=10+10*r(),t=50*r()+86,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("rgb"===e){const e=255*r(),t=255*r(),n=255*r(),i=new Ga(e,t,n);return i}if("lab"===e){const e=100*r(),t=256*r()-128,n=256*r()-128,i=new Ga(e,t,n,"lab");return i}if("grey"===e){const e=255*r(),t=new Ga(e,e,e);return t}throw new Error("Unsupported random color mode")}static test(e){return"string"===typeof e&&(ba.test(e)||ya.test(e))}cmyk(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=Math.min(1-r,1-i,1-o);if(1===a)return new Ga(0,0,0,1,"cmyk");const s=(1-r-a)/(1-a),l=(1-i-a)/(1-a),c=(1-o-a)/(1-a),u=new Ga(s,l,c,a,"cmyk");return u}hsl(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=Math.max(r,i,o),s=Math.min(r,i,o),l=(a+s)/2,c=a===s,u=a-s,h=c?0:l>.5?u/(2-a-s):u/(a+s),d=c?0:a===r?((i-o)/u+(iparseInt(e));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!ba.test(e))throw Error("Unsupported string format, can't construct Color");{const t=e=>parseInt(e,16),[,n,r,i]=fa.exec(Ba(e)).map(t);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:o,_b:a,_c:s,_d:l}=this,c="rgb"===this.space?{r:o,g:a,b:s}:"xyz"===this.space?{x:o,y:a,z:s}:"hsl"===this.space?{h:o,s:a,l:s}:"lab"===this.space?{l:o,a:a,b:s}:"lch"===this.space?{l:o,c:a,h:s}:"cmyk"===this.space?{c:o,m:a,y:s,k:l}:{};Object.assign(this,c)}lab(){const{x:e,y:t,z:n}=this.xyz(),r=116*t-16,i=500*(e-t),o=200*(t-n),a=new Ga(r,i,o,"lab");return a}lch(){const{l:e,a:t,b:n}=this.lab(),r=Math.sqrt(t**2+n**2);let i=180*Math.atan2(n,t)/Math.PI;i<0&&(i*=-1,i=360-i);const o=new Ga(e,r,i,"lch");return o}rgb(){if("rgb"===this.space)return this;if(Ua(this.space)){let{x:e,y:t,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:o}=this;if("lch"===this.space){const{c:e,h:t}=this,n=Math.PI/180;i=e*Math.cos(n*t),o=e*Math.sin(n*t)}const a=(r+16)/116,s=i/500+a,l=a-o/200,c=16/116,u=.008856,h=7.787;e=.95047*(s**3>u?s**3:(s-c)/h),t=1*(a**3>u?a**3:(a-c)/h),n=1.08883*(l**3>u?l**3:(l-c)/h)}const r=3.2406*e+-1.5372*t+-.4986*n,i=-.9689*e+1.8758*t+.0415*n,o=.0557*e+-.204*t+1.057*n,a=Math.pow,s=.0031308,l=r>s?1.055*a(r,1/2.4)-.055:12.92*r,c=i>s?1.055*a(i,1/2.4)-.055:12.92*i,u=o>s?1.055*a(o,1/2.4)-.055:12.92*o,h=new Ga(255*l,255*c,255*u);return h}if("hsl"===this.space){let{h:e,s:t,l:n}=this;if(e/=360,t/=100,n/=100,0===t){n*=255;const e=new Ga(n,n,n);return e}const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=255*qa(i,r,e+1/3),a=255*qa(i,r,e),s=255*qa(i,r,e-1/3),l=new Ga(o,a,s);return l}if("cmyk"===this.space){const{c:e,m:t,y:n,k:r}=this,i=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,t*(1-r)+r)),a=255*(1-Math.min(1,n*(1-r)+r)),s=new Ga(i,o,a);return s}return this}toArray(){const{_a:e,_b:t,_c:n,_d:r,space:i}=this;return[e,t,n,r,i]}toHex(){const[e,t,n]=this._clamped().map(_a);return`#${e}${t}${n}`}toRgb(){const[e,t,n]=this._clamped(),r=`rgb(${e},${t},${n})`;return r}toString(){return this.toHex()}xyz(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=u>.008856?Math.pow(u,1/3):7.787*u+16/116,p=h>.008856?Math.pow(h,1/3):7.787*h+16/116,m=new Ga(d,f,p,"xyz");return m}_clamped(){const{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:i,round:o}=Math,a=e=>r(0,i(o(e),255));return[e,t,n].map(a)}}class Wa{constructor(...e){this.init(...e)}clone(){return new Wa(this)}init(e,t){const n={x:0,y:0},r=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===typeof e?{x:e.x,y:e.y}:{x:e,y:t};return this.x=null==r.x?n.x:r.x,this.y=null==r.y?n.y:r.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){Za.isMatrixLike(e)||(e=new Za(e));const{x:t,y:n}=this;return this.x=e.a*t+e.c*n+e.e,this.y=e.b*t+e.d*n+e.f,this}}function Va(e,t){return new Wa(e,t).transform(this.screenCTM().inverse())}function Ya(e,t,n){return Math.abs(t-e)<(n||1e-6)}class Za{constructor(...e){this.init(...e)}static formatTransforms(e){const t="both"===e.flip||!0===e.flip,n=e.flip&&(t||"x"===e.flip)?-1:1,r=e.flip&&(t||"y"===e.flip)?-1:1,i=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,o=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,s=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,l=e.shear||0,c=e.rotate||e.theta||0,u=new Wa(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=u.x,d=u.y,f=new Wa(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),p=f.x,m=f.y,g=new Wa(e.translate||e.tx||e.translateX,e.ty||e.translateY),v=g.x,b=g.y,y=new Wa(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),w=y.x,x=y.y;return{scaleX:a,scaleY:s,skewX:i,skewY:o,shear:l,theta:c,rx:w,ry:x,tx:v,ty:b,ox:h,oy:d,px:p,py:m}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return null!=e.a||null!=e.b||null!=e.c||null!=e.d||null!=e.e||null!=e.f}static matrixMultiply(e,t,n){const r=e.a*t.a+e.c*t.b,i=e.b*t.a+e.d*t.b,o=e.a*t.c+e.c*t.d,a=e.b*t.c+e.d*t.d,s=e.e+e.a*t.e+e.c*t.f,l=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=i,n.c=o,n.d=a,n.e=s,n.f=l,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){const r=e||0,i=t||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new Za(this)}decompose(e=0,t=0){const n=this.a,r=this.b,i=this.c,o=this.d,a=this.e,s=this.f,l=n*o-r*i,c=l>0?1:-1,u=c*Math.sqrt(n*n+r*r),h=Math.atan2(c*r,c*n),d=180/Math.PI*h,f=Math.cos(h),p=Math.sin(h),m=(n*i+r*o)/l,g=i*u/(m*n-r)||o*u/(m*r+n),v=a-e+e*f*u+t*(m*f*u-p*g),b=s-t+e*p*u+t*(m*p*u+f*g);return{scaleX:u,scaleY:g,shear:m,rotate:d,translateX:v,translateY:b,originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const t=new Za(e);return Ya(this.a,t.a)&&Ya(this.b,t.b)&&Ya(this.c,t.c)&&Ya(this.d,t.d)&&Ya(this.e,t.e)&&Ya(this.f,t.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return"x"===e?this.scaleO(-1,1,t,0):"y"===e?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(e){const t=Za.fromArray([1,0,0,1,0,0]);return e=e instanceof Ns?e.matrixify():"string"===typeof e?Za.fromArray(e.split(Aa).map(parseFloat)):Array.isArray(e)?Za.fromArray(e):"object"===typeof e&&Za.isMatrixLike(e)?e:"object"===typeof e?(new Za).transform(e):6===arguments.length?Za.fromArray([].slice.call(arguments)):t,this.a=null!=e.a?e.a:t.a,this.b=null!=e.b?e.b:t.b,this.c=null!=e.c?e.c:t.c,this.d=null!=e.d?e.d:t.d,this.e=null!=e.e?e.e:t.e,this.f=null!=e.f?e.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,o=this.f,a=e*r-t*n;if(!a)throw new Error("Cannot invert "+this);const s=r/a,l=-t/a,c=-n/a,u=e/a,h=-(s*i+c*o),d=-(l*i+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=d,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const t=this,n=e instanceof Za?e:new Za(e);return Za.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof Za?e:new Za(e);return Za.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=To(e);const r=Math.cos(e),i=Math.sin(e),{a:o,b:a,c:s,d:l,e:c,f:u}=this;return this.a=o*r-a*i,this.b=a*r+o*i,this.c=s*r-l*i,this.d=l*r+s*i,this.e=c*r-u*i+n*i-t*r+t,this.f=u*r+c*i-t*i-n*r+n,this}scale(e,t,n,r){return this.clone().scaleO(...arguments)}scaleO(e,t=e,n=0,r=0){3===arguments.length&&(r=n,n=t,t=e);const{a:i,b:o,c:a,d:s,e:l,f:c}=this;return this.a=i*e,this.b=o*t,this.c=a*e,this.d=s*t,this.e=l*e-n*e+n,this.f=c*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){const{a:r,b:i,c:o,d:a,e:s,f:l}=this;return this.a=r+i*e,this.c=o+a*e,this.e=s+l*e-n*e,this}skew(e,t,n,r){return this.clone().skewO(...arguments)}skewO(e,t=e,n=0,r=0){3===arguments.length&&(r=n,n=t,t=e),e=To(e),t=To(t);const i=Math.tan(e),o=Math.tan(t),{a:a,b:s,c:l,d:c,e:u,f:h}=this;return this.a=a+s*i,this.b=s+a*o,this.c=l+c*i,this.d=c+l*o,this.e=u+h*i-r*i,this.f=h+u*o-n*o,this}skewX(e,t,n){return this.skew(e,0,t,n)}skewY(e,t,n){return this.skew(0,e,t,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Za.isMatrixLike(e)){const t=new Za(e);return t.multiplyO(this)}const t=Za.formatTransforms(e),n=this,{x:r,y:i}=new Wa(t.ox,t.oy).transform(n),o=(new Za).translateO(t.rx,t.ry).lmultiplyO(n).translateO(-r,-i).scaleO(t.scaleX,t.scaleY).skewO(t.skewX,t.skewY).shearO(t.shear).rotateO(t.theta).translateO(r,i);if(isFinite(t.px)||isFinite(t.py)){const e=new Wa(r,i).transform(o),n=isFinite(t.px)?t.px-e.x:0,a=isFinite(t.py)?t.py-e.y:0;o.translateO(n,a)}return o.translateO(t.tx,t.ty),o}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Ka(){return new Za(this.node.getCTM())}function Xa(){if("function"===typeof this.isRoot&&!this.isRoot()){const e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new Za(t)}return new Za(this.node.getScreenCTM())}function Ja(){if(!Ja.nodes){const e=qo().size(2,0);e.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),e.attr("focusable","false"),e.attr("aria-hidden","true");const t=e.path().node;Ja.nodes={svg:e,path:t}}if(!Ja.nodes.svg.node.parentNode){const e=Bo.document.body||Bo.document.documentElement;Ja.nodes.svg.addTo(e)}return Ja.nodes}function Qa(e){return!e.width&&!e.height&&!e.x&&!e.y}function $a(e){return e===Bo.document||(Bo.document.documentElement.contains||function(e){while(e.parentNode)e=e.parentNode;return e===Bo.document}).call(Bo.document.documentElement,e)}Yo(Za,"Matrix");class es{constructor(...e){this.init(...e)}addOffset(){return this.x+=Bo.window.pageXOffset,this.y+=Bo.window.pageYOffset,new es(this)}init(e){const t=[0,0,0,0];return e="string"===typeof e?e.split(Aa).map(parseFloat):Array.isArray(e)?e:"object"===typeof e?[null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height]:4===arguments.length?[].slice.call(arguments):t,this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Qa(this)}merge(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width)-t,i=Math.max(this.y+this.height,e.y+e.height)-n;return new es(t,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof Za||(e=new Za(e));let t=1/0,n=-1/0,r=1/0,i=-1/0;const o=[new Wa(this.x,this.y),new Wa(this.x2,this.y),new Wa(this.x,this.y2),new Wa(this.x2,this.y2)];return o.forEach((function(o){o=o.transform(e),t=Math.min(t,o.x),n=Math.max(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)})),new es(t,r,n-t,i-r)}}function ts(e,t,n){let r;try{if(r=t(e.node),Qa(r)&&!$a(e.node))throw new Error("Element not in the dom")}catch(i){r=n(e)}return r}function ns(){const e=e=>e.getBBox(),t=e=>{try{const t=e.clone().addTo(Ja().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${t.toString()}`)}},n=ts(this,e,t),r=new es(n);return r}function rs(e){const t=e=>e.getBoundingClientRect(),n=e=>{throw new Error(`Getting rbox of element "${e.node.nodeName}" is not possible`)},r=ts(this,t,n),i=new es(r);return e?i.transform(e.screenCTM().inverseO()):i.addOffset()}function is(e,t){const n=this.bbox();return e>n.x&&t>n.y&&ee.call(t,t,n,r)):this.map(n=>n[e](...t))},toArray(){return Array.prototype.concat.apply([],this)}});const as=["toArray","constructor","each"];function ss(e,t){return new os(Eo((t||Bo.document).querySelectorAll(e),(function(e){return Wo(e)})))}function ls(e){return ss(e,this.node)}function cs(e){return Wo(this.node.querySelector(e))}os.extend=function(e){e=e.reduce((e,t)=>(as.includes(t)||"_"===t[0]||(e[t]=function(...e){return this.each(t,...e)}),e),{}),Qo([os],e)};let us=0;const hs={};function ds(e){let t=e.getEventHolder();return t===Bo.window&&(t=hs),t.events||(t.events={}),t.events}function fs(e){return e.getEventTarget()}function ps(e){let t=e.getEventHolder();t===Bo.window&&(t=hs),t.events&&(t.events={})}function ms(e,t,n,r,i){const o=n.bind(r||e),a=qo(e),s=ds(a),l=fs(a);t=Array.isArray(t)?t:t.split(Aa),n._svgjsListenerId||(n._svgjsListenerId=++us),t.forEach((function(e){const t=e.split(".")[0],r=e.split(".")[1]||"*";s[t]=s[t]||{},s[t][r]=s[t][r]||{},s[t][r][n._svgjsListenerId]=o,l.addEventListener(t,o,i||!1)}))}function gs(e,t,n,r){const i=qo(e),o=ds(i),a=fs(i);("function"!==typeof n||(n=n._svgjsListenerId,n))&&(t=Array.isArray(t)?t:(t||"").split(Aa),t.forEach((function(e){const t=e&&e.split(".")[0],s=e&&e.split(".")[1];let l,c;if(n)o[t]&&o[t][s||"*"]&&(a.removeEventListener(t,o[t][s||"*"][n],r||!1),delete o[t][s||"*"][n]);else if(t&&s){if(o[t]&&o[t][s]){for(c in o[t][s])gs(a,[t,s].join("."),c);delete o[t][s]}}else if(s)for(e in o)for(l in o[e])s===l&&gs(a,[e,s].join("."));else if(t){if(o[t]){for(l in o[t])gs(a,[t,l].join("."));delete o[t]}}else{for(e in o)gs(a,e);ps(i)}})))}function vs(e,t,n,r){const i=fs(e);return t instanceof Bo.window.Event||(t=new Bo.window.CustomEvent(t,{detail:n,cancelable:!0,...r})),i.dispatchEvent(t),t}class bs extends _o{addEventListener(){}dispatch(e,t,n){return vs(this,e,t,n)}dispatchEvent(e){const t=this.getEventHolder().events;if(!t)return!0;const n=t[e.type];for(const r in n)for(const t in n[r])n[r][t](e);return!e.defaultPrevented}fire(e,t,n){return this.dispatch(e,t,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,n){return gs(this,e,t,n),this}on(e,t,n,r){return ms(this,e,t,n,r),this}removeEventListener(){}}function ys(){}Yo(bs,"EventTarget");const ws={duration:400,ease:">",delay:0},xs={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ks extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return"number"===typeof e||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Aa).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class As{constructor(...e){this.init(...e)}convert(e){return new As(this.value,e)}divide(e){return e=new As(e),new As(this/e,this.unit||e.unit)}init(e,t){return t=Array.isArray(e)?e[1]:t,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=t||"","number"===typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"===typeof e?(t=e.match(da),t&&(this.value=parseFloat(t[1]),"%"===t[5]?this.value/=100:"s"===t[5]&&(this.value*=1e3),this.unit=t[5])):e instanceof As&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new As(e),new As(this-e,this.unit||e.unit)}plus(e){return e=new As(e),new As(this+e,this.unit||e.unit)}times(e){return e=new As(e),new As(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Cs=[];function Es(e){Cs.push(e)}function Ss(e,t,n){if(null==e){e={},t=this.node.attributes;for(const n of t)e[n.nodeName]=xa.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return e}if(e instanceof Array)return e.reduce((e,t)=>(e[t]=this.attr(t),e),{});if("object"===typeof e&&e.constructor===Object)for(t in e)this.attr(t,e[t]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return t=this.node.getAttribute(e),null==t?xs[e]:xa.test(t)?parseFloat(t):t;t=Cs.reduce((t,n)=>n(e,t,this),t),"number"===typeof t?t=new As(t):Ga.isColor(t)?t=new Ga(t):t.constructor===Array&&(t=new ks(t)),"leading"===e?this.leading&&this.leading(t):"string"===typeof n?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!==e&&"x"!==e||this.rebuild()}return this}class Ts extends bs{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=qo(e),e.removeNamespace&&this.node instanceof Bo.window.SVGElement&&e.removeNamespace(),null==t?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return qo(e).put(this,t)}children(){return new os(Eo(this.node.children,(function(e){return Wo(e)})))}clear(){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return this}clone(e=!0){return this.writeDataToDom(),new this.constructor(Jo(this.node.cloneNode(e)))}each(e,t){const n=this.children();let r,i;for(r=0,i=n.length;r=0}html(e,t){return this.xml(e,t,Io)}id(e){return"undefined"!==typeof e||this.node.id||(this.node.id=Xo(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Wo(this.node.lastChild)}matches(e){const t=this.node,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return n&&n.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=Wo(t.node.parentNode),!e)return t;do{if("string"===typeof e?t.matches(e):t instanceof e)return t}while(t=Wo(t.node.parentNode));return t}put(e,t){return e=qo(e),this.add(e,t),e}putIn(e,t){return qo(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=qo(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){const n=10**e,r=this.attr(t);for(const i in r)"number"===typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,Po)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const t=this.parent();if(!t)return this.addTo(e);const n=t.index(this);return t.put(e,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(e,t,n){if("boolean"===typeof e&&(n=t,t=e,e=null),null==e||"function"===typeof e){t=null==t||t,this.writeDataToDom();let n=this;if(null!=e){if(n=Wo(n.node.cloneNode(!0)),t){const t=e(n);if(n=t||n,!1===t)return""}n.each((function(){const t=e(this),n=t||this;!1===t?this.remove():t&&this!==n&&this.replace(n)}),!0)}return t?n.node.outerHTML:n.node.innerHTML}t=null!=t&&t;const r=Uo("wrapper",n),i=Bo.document.createDocumentFragment();r.innerHTML=e;for(let a=r.children.length;a--;)i.appendChild(r.firstElementChild);const o=this.parent();return t?this.replace(i)&&o:this.add(i)}}Qo(Ts,{attr:Ss,find:ls,findOne:cs}),Yo(Ts,"Dom");class Ns extends Ts{constructor(e,t){super(e,t),this.dom={},this.node.instance=this,e.hasAttribute("svgjs:data")&&this.setData(JSON.parse(e.getAttribute("svgjs:data"))||{})}center(e,t){return this.cx(e).cy(t)}cx(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)}cy(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)}defs(){const e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new As(e).plus(this.x()))}dy(e=0){return this.y(new As(e).plus(this.y()))}getEventHolder(){return this}height(e){return this.attr("height",e)}move(e,t){return this.x(e).y(t)}parents(e=this.root()){const t="string"===typeof e;t||(e=qo(e));const n=new os;let r=this;while((r=r.parent())&&r.node!==Bo.document&&"#document-fragment"!==r.nodeName){if(n.push(r),!t&&r.node===e.node)break;if(t&&r.matches(e))break;if(r.node===this.root().node)return null}return n}reference(e){if(e=this.attr(e),!e)return null;const t=(e+"").match(ma);return t?qo(t[1]):null}root(){const e=this.parent(Zo(Ho));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Oo(this,e,t);return this.width(new As(n.width)).height(new As(n.height))}width(e){return this.attr("width",e)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(e){return this.attr("x",e)}y(e){return this.attr("y",e)}}Qo(Ns,{bbox:ns,rbox:rs,inside:is,point:Va,ctm:Ka,screenCTM:Xa}),Yo(Ns,"Element");const Ms={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(e,t){return"color"===t?e:e+"-"+t}};["fill","stroke"].forEach((function(e){const t={};let n;t[e]=function(t){if("undefined"===typeof t)return this.attr(e);if("string"===typeof t||t instanceof Ga||Ga.isRgb(t)||t instanceof Ns)this.attr(e,t);else for(n=Ms[e].length-1;n>=0;n--)null!=t[Ms[e][n]]&&this.attr(Ms.prefix(e,Ms[e][n]),t[Ms[e][n]]);return this},xo(["Element","Runner"],t)})),xo(["Element","Runner"],{matrix:function(e,t,n,r,i,o){return null==e?new Za(this):this.attr("transform",new Za(e,t,n,r,i,o))},rotate:function(e,t,n){return this.transform({rotate:e,ox:t,oy:n},!0)},skew:function(e,t,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:e,ox:t,oy:n},!0):this.transform({skew:[e,t],ox:n,oy:r},!0)},shear:function(e,t,n){return this.transform({shear:e,ox:t,oy:n},!0)},scale:function(e,t,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:e,ox:t,oy:n},!0):this.transform({scale:[e,t],ox:n,oy:r},!0)},translate:function(e,t){return this.transform({translate:[e,t]},!0)},relative:function(e,t){return this.transform({relative:[e,t]},!0)},flip:function(e="both",t="center"){return-1==="xybothtrue".indexOf(e)&&(t=e,e="both"),this.transform({flip:e,origin:t},!0)},opacity:function(e){return this.attr("opacity",e)}}),xo("radius",{radius:function(e,t=e){const n=(this._element||this).type;return"radialGradient"===n?this.attr("r",new As(e)):this.rx(e).ry(t)}}),xo("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(e){return new Wa(this.node.getPointAtLength(e))}}),xo(["Element","Runner"],{font:function(e,t){if("object"===typeof e){for(t in e)this.font(t,e[t]);return this}return"leading"===e?this.leading(t):"anchor"===e?this.attr("text-anchor",t):"size"===e||"family"===e||"weight"===e||"stretch"===e||"variant"===e||"style"===e?this.attr("font-"+e,t):this.attr(e,t)}});const Ls=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce((function(e,t){const n=function(e){return null===e?this.off(t):this.on(t,e),this};return e[t]=n,e}),{});function Os(){return this.attr("transform",null)}function Ds(){const e=(this.attr("transform")||"").split(ga).slice(0,-1).map((function(e){const t=e.trim().split("(");return[t[0],t[1].split(Aa).map((function(e){return parseFloat(e)}))]})).reverse().reduce((function(e,t){return"matrix"===t[0]?e.lmultiply(Za.fromArray(t[1])):e[t[0]].apply(e,t[1])}),new Za);return e}function Ps(e,t){if(this===e)return this;const n=this.screenCTM(),r=e.screenCTM().inverse();return this.addTo(e,t).untransform().transform(r.multiply(n)),this}function Is(e){return this.toParent(this.root(),e)}function Rs(e,t){if(null==e||"string"===typeof e){const t=new Za(this).decompose();return null==e?t:t[e]}Za.isMatrixLike(e)||(e={...e,origin:Do(e,this)});const n=!0===t?this:t||!1,r=new Za(n).transform(e);return this.attr("transform",r)}xo("Element",Ls),xo("Element",{untransform:Os,matrixify:Ds,toParent:Ps,toRoot:Is,transform:Rs});class Fs extends Ns{flatten(e=this,t){return this.each((function(){if(this instanceof Fs)return this.flatten().ungroup()})),this}ungroup(e=this.parent(),t=e.index(this)){return t=-1===t?e.children().length:t,this.each((function(n,r){return r[r.length-n-1].toParent(e,t)})),this.remove()}}Yo(Fs,"Container");class zs extends Fs{constructor(e,t=e){super(Go("defs",e),t)}flatten(){return this}ungroup(){return this}}Yo(zs,"Defs");class Bs extends Ns{}function _s(e){return this.attr("rx",e)}function js(e){return this.attr("ry",e)}function Hs(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())}function Us(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())}function qs(e){return this.attr("cx",e)}function Gs(e){return this.attr("cy",e)}function Ws(e){return null==e?2*this.rx():this.rx(new As(e).divide(2))}function Vs(e){return null==e?2*this.ry():this.ry(new As(e).divide(2))}Yo(Bs,"Shape");var Ys={__proto__:null,rx:_s,ry:js,x:Hs,y:Us,cx:qs,cy:Gs,width:Ws,height:Vs};class Zs extends Bs{constructor(e,t=e){super(Go("ellipse",e),t)}size(e,t){const n=Oo(this,e,t);return this.rx(new As(n.width).divide(2)).ry(new As(n.height).divide(2))}}Qo(Zs,Ys),xo("Container",{ellipse:$o((function(e=0,t=e){return this.put(new Zs).size(e,t).move(0,0)}))}),Yo(Zs,"Ellipse");class Ks extends Ts{constructor(e=Bo.document.createDocumentFragment()){super(e)}xml(e,t,n){if("boolean"===typeof e&&(n=t,t=e,e=null),null==e||"function"===typeof e){const e=new Ts(Uo("wrapper",n));return e.add(this.node.cloneNode(!0)),e.xml(!1,n)}return super.xml(e,!1,n)}}function Xs(e,t){return"radialGradient"===(this._element||this).type?this.attr({fx:new As(e),fy:new As(t)}):this.attr({x1:new As(e),y1:new As(t)})}function Js(e,t){return"radialGradient"===(this._element||this).type?this.attr({cx:new As(e),cy:new As(t)}):this.attr({x2:new As(e),y2:new As(t)})}Yo(Ks,"Fragment");var Qs={__proto__:null,from:Xs,to:Js};class $s extends Fs{constructor(e,t){super(Go(e+"Gradient","string"===typeof e?null:e),t)}attr(e,t,n){return"transform"===e&&(e="gradientTransform"),super.attr(e,t,n)}bbox(){return new es}targets(){return ss('svg [fill*="'+this.id()+'"]')}toString(){return this.url()}update(e){return this.clear(),"function"===typeof e&&e.call(this,this),this}url(){return'url("#'+this.id()+'")'}}Qo($s,Qs),xo({Container:{gradient(...e){return this.defs().gradient(...e)}},Defs:{gradient:$o((function(e,t){return this.put(new $s(e)).update(t)}))}}),Yo($s,"Gradient");class el extends Fs{constructor(e,t=e){super(Go("pattern",e),t)}attr(e,t,n){return"transform"===e&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new es}targets(){return ss('svg [fill*="'+this.id()+'"]')}toString(){return this.url()}update(e){return this.clear(),"function"===typeof e&&e.call(this,this),this}url(){return'url("#'+this.id()+'")'}}xo({Container:{pattern(...e){return this.defs().pattern(...e)}},Defs:{pattern:$o((function(e,t,n){return this.put(new el).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}))}}),Yo(el,"Pattern");class tl extends Bs{constructor(e,t=e){super(Go("image",e),t)}load(e,t){if(!e)return this;const n=new Bo.window.Image;return ms(n,"load",(function(e){const r=this.parent(el);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof el&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"===typeof t&&t.call(this,e)}),this),ms(n,"load error",(function(){gs(n)})),this.attr("href",n.src=e,Fo)}}Es((function(e,t,n){return"fill"!==e&&"stroke"!==e||ka.test(t)&&(t=n.root().defs().image(t)),t instanceof tl&&(t=n.root().defs().pattern(0,0,e=>{e.add(t)})),t})),xo({Container:{image:$o((function(e,t){return this.put(new tl).size(0,0).load(e,t)}))}}),Yo(tl,"Image");class nl extends ks{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach((function(i){e=Math.max(i[0],e),t=Math.max(i[1],t),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new es(n,r,e-n,t-r)}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+e,this[r][1]+t];return this}parse(e=[0,0]){const t=[];e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Aa).map(parseFloat),e.length%2!==0&&e.pop();for(let n=0,r=e.length;n=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*e/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*t/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let t=0,n=this.length;t":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)},bezier:function(e,t,n,r){return function(i){return i<0?e>0?t/e*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):e<1?(1-t)/(1-e)*i+(t-e)/(1-e):1:3*i*(1-i)**2*t+3*i**2*(1-i)*r+i**3}},steps:function(e,t="end"){t=t.split("-").reverse()[0];let n=e;return"none"===t?--n:"both"===t&&++n,(r,i=!1)=>{let o=Math.floor(r*e);const a=r*o%1===0;return"start"!==t&&"both"!==t||++o,i&&a&&--o,r>=0&&o<0&&(o=0),r<=1&&o>n&&(o=n),o/n}}};class fl{done(){return!1}}class pl extends fl{constructor(e=ws.ease){super(),this.ease=dl[e]||e}step(e,t,n){return"number"!==typeof e?n<1?e:t:e+(t-e)*this.ease(n)}}class ml extends fl{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function gl(){const e=(this._duration||500)/1e3,t=this._overshoot||0,n=1e-10,r=Math.PI,i=Math.log(t/100+n),o=-i/Math.sqrt(r*r+i*i),a=3.9/(o*e);this.d=2*o*a,this.k=a*a}class vl extends ml{constructor(e=500,t=0){super(),this.duration(e).overshoot(t)}step(e,t,n,r){if("string"===typeof e)return e;if(r.done=n===1/0,n===1/0)return t;if(0===n)return e;n>100&&(n=16),n/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(e-t),a=e+i*n+o*n*n/2;return r.velocity=i+o*n,r.done=Math.abs(t-a)+Math.abs(i)<.002,r.done?t:a}}Qo(vl,{duration:hl("_duration",gl),overshoot:hl("_overshoot",gl)});class bl extends ml{constructor(e=.1,t=.01,n=0,r=1e3){super(),this.p(e).i(t).d(n).windup(r)}step(e,t,n,r){if("string"===typeof e)return e;if(r.done=n===1/0,n===1/0)return t;if(0===n)return e;const i=t-e;let o=(r.integral||0)+i*n;const a=(i-(r.error||0))/n,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?t:e+(this.P*i+this.I*o+this.D*a)}}Qo(bl,{windup:hl("_windup"),p:hl("P"),i:hl("I"),d:hl("D")});const yl={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},wl={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},S:function(e,t){return t.x=e[2],t.y=e[3],["S",e[0],e[1],e[2],e[3]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},T:function(e,t){return t.x=e[0],t.y=e[1],["T",e[0],e[1]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,["Z"]},A:function(e,t){return t.x=e[5],t.y=e[6],["A",e[0],e[1],e[2],e[3],e[4],e[5],e[6]]}},xl="mlhvqtcsaz".split("");for(let RE=0,FE=xl.length;RE=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=e,this[i][2]+=t):"H"===r?this[i][1]+=e:"V"===r?this[i][1]+=t:"C"===r||"S"===r||"Q"===r?(this[i][1]+=e,this[i][2]+=t,this[i][3]+=e,this[i][4]+=t,"C"===r&&(this[i][5]+=e,this[i][6]+=t)):"A"===r&&(this[i][6]+=e,this[i][7]+=t);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),Ml(e)}size(e,t){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*e/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*t/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y,this[r][3]=(this[r][3]-n.x)*e/n.width+n.x,this[r][4]=(this[r][4]-n.y)*t/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*e/n.width+n.x,this[r][6]=(this[r][6]-n.y)*t/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*e/n.width,this[r][2]=this[r][2]*t/n.height,this[r][6]=(this[r][6]-n.x)*e/n.width+n.x,this[r][7]=(this[r][7]-n.y)*t/n.height+n.y);return this}toString(){return Ll(this)}}const Dl=e=>{const t=typeof e;return"number"===t?As:"string"===t?Ga.isColor(e)?Ga:Aa.test(e)?Ca.test(e)?Ol:ks:da.test(e)?As:Il:Bl.indexOf(e.constructor)>-1?e.constructor:Array.isArray(e)?ks:"object"===t?zl:Il};class Pl{constructor(e){this._stepper=e||new pl("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){const e=this._context.map(this._stepper.done).reduce((function(e,t){return e&&t}),!0);return e}from(e){return null==e?this._from:(this._from=this._set(e),this)}stepper(e){return null==e?this._stepper:(this._stepper=e,this)}to(e){return null==e?this._to:(this._to=this._set(e),this)}type(e){return null==e?this._type:(this._type=e,this)}_set(e){this._type||this.type(Dl(e));let t=new this._type(e);return this._type===Ga&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===zl&&(t=this._to?t.align(this._to):this._from?t.align(this._from):t),t=t.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(t.length)).map(Object).map((function(e){return e.done=!0,e})),t}}class Il{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Rl{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Rl.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Rl.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Fl=(e,t)=>e[0]t[0]?1:0;class zl{constructor(...e){this.init(...e)}align(e){const t=this.values;for(let n=0,r=t.length;ne.concat(t),[]),this}toArray(){return this.values}valueOf(){const e={},t=this.values;while(t.length){const n=t.shift(),r=t.shift(),i=t.shift(),o=t.splice(0,i);e[n]=new r(o)}return e}}const Bl=[Il,Rl,zl];function _l(e=[]){Bl.push(...[].concat(e))}function jl(){Qo(Bl,{to(e){return(new Pl).type(this.constructor).from(this.toArray()).to(e)},fromArray(e){return this.init(e),this},toConsumable(){return this.toArray()},morph(e,t,n,r,i){const o=function(e,o){return r.step(e,t[o],n,i[o],i)};return this.fromArray(e.map(o))}})}class Hl extends Bs{constructor(e,t=e){super(Go("path",e),t)}array(){return this._array||(this._array=new Ol(this.attr("d")))}clear(){return delete this._array,this}height(e){return null==e?this.bbox().height:this.size(this.bbox().width,e)}move(e,t){return this.attr("d",this.array().move(e,t))}plot(e){return null==e?this.array():this.clear().attr("d","string"===typeof e?e:this._array=new Ol(e))}size(e,t){const n=Oo(this,e,t);return this.attr("d",this.array().size(n.width,n.height))}width(e){return null==e?this.bbox().width:this.size(e,this.bbox().height)}x(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)}y(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)}}function Ul(){return this._array||(this._array=new nl(this.attr("points")))}function ql(){return delete this._array,this}function Gl(e,t){return this.attr("points",this.array().move(e,t))}function Wl(e){return null==e?this.array():this.clear().attr("points","string"===typeof e?e:this._array=new nl(e))}function Vl(e,t){const n=Oo(this,e,t);return this.attr("points",this.array().size(n.width,n.height))}Hl.prototype.MorphArray=Ol,xo({Container:{path:$o((function(e){return this.put(new Hl).plot(e||new Ol)}))}}),Yo(Hl,"Path");var Yl={__proto__:null,array:Ul,clear:ql,move:Gl,plot:Wl,size:Vl};class Zl extends Bs{constructor(e,t=e){super(Go("polygon",e),t)}}xo({Container:{polygon:$o((function(e){return this.put(new Zl).plot(e||new nl)}))}}),Qo(Zl,ll),Qo(Zl,Yl),Yo(Zl,"Polygon");class Kl extends Bs{constructor(e,t=e){super(Go("polyline",e),t)}}xo({Container:{polyline:$o((function(e){return this.put(new Kl).plot(e||new nl)}))}}),Qo(Kl,ll),Qo(Kl,Yl),Yo(Kl,"Polyline");class Xl extends Bs{constructor(e,t=e){super(Go("rect",e),t)}}Qo(Xl,{rx:_s,ry:js}),xo({Container:{rect:$o((function(e,t){return this.put(new Xl).size(e,t)}))}}),Yo(Xl,"Rect");class Jl{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const t="undefined"!==typeof e.next?e:{value:e,next:null,prev:null};return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._last=t,this._first=t),t}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Ql={nextDraw:null,frames:new Jl,timeouts:new Jl,immediates:new Jl,timer:()=>Bo.window.performance||Bo.window.Date,transforms:[],frame(e){const t=Ql.frames.push({run:e});return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),t},timeout(e,t){t=t||0;const n=Ql.timer().now()+t,r=Ql.timeouts.push({run:e,time:n});return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),r},immediate(e){const t=Ql.immediates.push(e);return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),t},cancelFrame(e){null!=e&&Ql.frames.remove(e)},clearTimeout(e){null!=e&&Ql.timeouts.remove(e)},cancelImmediate(e){null!=e&&Ql.immediates.remove(e)},_draw(e){let t=null;const n=Ql.timeouts.last();while(t=Ql.timeouts.shift())if(e>=t.time?t.run():Ql.timeouts.push(t),t===n)break;let r=null;const i=Ql.frames.last();while(r!==i&&(r=Ql.frames.shift()))r.run(e);let o=null;while(o=Ql.immediates.shift())o();Ql.nextDraw=Ql.timeouts.first()||Ql.frames.first()?Bo.window.requestAnimationFrame(Ql._draw):null}},$l=function(e){const t=e.start,n=e.runner.duration(),r=t+n;return{start:t,duration:n,end:r,runner:e.runner}},ec=function(){const e=Bo.window;return(e.performance||e.Date).now()};class tc extends bs{constructor(e=ec){super(),this._timeSource=e,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),t=e?e.runner.duration():0,n=e?e.start:this._time;return n+t}getEndTimeOfTimeline(){const e=this._runners.map(e=>e.start+e.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return null==e?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const t=this.speed();if(null==e)return this.speed(-t);const n=Math.abs(t);return this.speed(e?-n:n)}schedule(e,t,n){if(null==e)return this._runners.map($l);let r=0;const i=this.getEndTime();if(t=t||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=t,t=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(e.id);n&&(r=n.start+t,t=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const e=this.getLastRunnerInfo(),t=e?e.start:this._time;r=t}}e.unschedule(),e.timeline(this);const o=e.persist(),a={persist:null===o?this._persist:o,start:r+t,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((e,t)=>e.start-t.start),this._runnerIds=this._runners.map(e=>e.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return null==e?this._timeSource:(this._timeSource=e,this)}speed(e){return null==e?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return null==e?this._time:(this._time=e,this._continue(!0))}unschedule(e){const t=this._runnerIds.indexOf(e.id);return t<0||(this._runners.splice(t,1),this._runnerIds.splice(t,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Ql.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Ql.frame(this._step)),this)}_stepFn(e=!1){const t=this._timeSource();let n=t-this._lastSourceTime;e&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=t,e||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const e=this._runners[o],t=e.runner,n=this._time-e.start;n<=0&&t.reset()}let i=!1;for(let o=0,a=this._runners.length;o0?this._continue():(this.pause(),this.fire("finished")),this}}xo({Element:{timeline:function(e){return null==e?(this._timeline=this._timeline||new tc,this._timeline):(this._timeline=e,this)}}});class nc extends bs{constructor(e){super(),this.id=nc.id++,e=null==e?ws.duration:e,e="function"===typeof e?new ml(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"===typeof e&&e,this._isDeclarative=e instanceof ml,this._stepper=this._isDeclarative?e:new pl,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Za,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,t,n){let r=1,i=!1,o=0;return e=e||ws.duration,t=t||ws.delay,n=n||"last","object"!==typeof e||e instanceof fl||(t=e.delay||t,n=e.when||n,i=e.swing||i,r=e.times||r,o=e.wait||o,e=e.duration||ws.duration),{duration:e,delay:t,swing:i,times:r,wait:o,when:n}}active(e){return null==e?this.enabled:(this.enabled=e,this)}addTransform(e,t){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,t,n){const r=nc.sanitise(e,t,n),i=new nc(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Za,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new pl(e),this}element(e){return null==e?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,t,n){return"object"===typeof e&&(t=e.swing,n=e.wait,e=e.times),this._times=e||1/0,this._swing=t||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(e){const t=this._duration+this._wait;if(null==e){const e=Math.floor(this._time/t),n=this._time-e*t,r=n/this._duration;return Math.min(e+r,this._times)}const n=Math.floor(e),r=e%1,i=t*n+this._duration*r;return this.time(i)}persist(e){return null==e?this._persist:(this._persist=e,this)}position(e){const t=this._time,n=this._duration,r=this._wait,i=this._times,o=this._swing,a=this._reverse;let s;if(null==e){const e=function(e){const t=o*Math.floor(e%(2*(r+n))/(r+n)),i=t&&!a||!t&&a,s=Math.pow(-1,i)*(e%(r+n))/n+i,l=Math.max(Math.min(s,1),0);return l},l=i*(r+n)-r;return s=t<=0?Math.round(e(1e-5)):t=0;this._lastPosition=t;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime=r;this._lastTime=this._time,i&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!o&&this._time>=r,this._reseted=!1;let s=!1;return(n||a)&&(this._initialise(n),this.transforms=new Za,s=this._run(a?e:t),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}time(e){if(null==e)return this._time;const t=e-this._time;return this.step(t),this}timeline(e){return"undefined"===typeof e?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let t=0,n=this._queue.length;te.lmultiplyO(t),oc=e=>e.transforms;function ac(){const e=this._transformationRunners.runners,t=e.map(oc).reduce(ic,new Za);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class sc{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){const t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new rc).forEach(e=>e.clearTransformsFromQueue()),this}edit(e,t){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1,e+1),this.runners.splice(n,1,t),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let t=0;tt.id<=e.id).map(oc).reduce(ic,new Za)},_addRunner(e){this._transformationRunners.add(e),Ql.cancelImmediate(this._frameId),this._frameId=Ql.immediate(ac.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new sc).add(new rc(new Za(this))))}}});const lc=(e,t)=>e.filter(e=>!t.includes(e));Qo(nc,{attr(e,t){return this.styleAttr("attr",e,t)},css(e,t){return this.styleAttr("css",e,t)},styleAttr(e,t,n){if("string"===typeof t)return this.styleAttr(e,{[t]:n});let r=t;if(this._tryRetarget(e,r))return this;let i=new Pl(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[e](o))}),(function(t){return this.element()[e](i.at(t).valueOf()),i.done()}),(function(t){const n=Object.keys(t),a=lc(n,o);if(a.length){const t=this.element()[e](a),n=new zl(i.from()).valueOf();Object.assign(n,t),i.from(n)}const s=new zl(i.to()).valueOf();Object.assign(s,t),i.to(s),o=n,r=t})),this._rememberMorpher(e,i),this},zoom(e,t){if(this._tryRetarget("zoom",e,t))return this;let n=new Pl(this._stepper).to(new As(e));return this.queue((function(){n=n.from(this.element().zoom())}),(function(e){return this.element().zoom(n.at(e),t),n.done()}),(function(e,r){t=r,n.to(e)})),this._rememberMorpher("zoom",n),this},transform(e,t,n){if(t=e.relative||t,this._isDeclarative&&!t&&this._tryRetarget("transform",e))return this;const r=Za.isMatrixLike(e);n=null!=e.affine?e.affine:null!=n?n:!r;const i=new Pl(this._stepper).type(n?Rl:Za);let o,a,s,l,c;function u(){a=a||this.element(),o=o||Do(e,a),c=new Za(t?void 0:a),a._addRunner(this),t||a._clearTransformRunnersBefore(this)}function h(u){t||this.clearTransform();const{x:h,y:d}=new Wa(o).transform(a._currentTransform(this));let f=new Za({...e,origin:[h,d]}),p=this._isDeclarative&&s?s:c;if(n){f=f.decompose(h,d),p=p.decompose(h,d);const e=f.rotate,t=p.rotate,n=[e-360,e,e+360],r=n.map(e=>Math.abs(e-t)),i=Math.min(...r),o=r.indexOf(i);f.rotate=n[o]}t&&(r||(f.rotate=e.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),i.from(p),i.to(f);const m=i.at(u);return l=m.rotate,s=new Za(m),this.addTransform(s),a._addRunner(this),i.done()}function d(t){(t.origin||"center").toString()!==(e.origin||"center").toString()&&(o=Do(t,a)),e={...t,origin:o}}return this.queue(u,h,d,!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(e,t){return this._queueNumber("x",e)},y(e){return this._queueNumber("y",e)},dx(e=0){return this._queueNumberDelta("x",e)},dy(e=0){return this._queueNumberDelta("y",e)},dmove(e,t){return this.dx(e).dy(t)},_queueNumberDelta(e,t){if(t=new As(t),this._tryRetarget(e,t))return this;const n=new Pl(this._stepper).to(t);let r=null;return this.queue((function(){r=this.element()[e](),n.from(r),n.to(r+t)}),(function(t){return this.element()[e](n.at(t)),n.done()}),(function(e){n.to(r+new As(e))})),this._rememberMorpher(e,n),this},_queueObject(e,t){if(this._tryRetarget(e,t))return this;const n=new Pl(this._stepper).to(t);return this.queue((function(){n.from(this.element()[e]())}),(function(t){return this.element()[e](n.at(t)),n.done()})),this._rememberMorpher(e,n),this},_queueNumber(e,t){return this._queueObject(e,new As(t))},cx(e){return this._queueNumber("cx",e)},cy(e){return this._queueNumber("cy",e)},move(e,t){return this.x(e).y(t)},center(e,t){return this.cx(e).cy(t)},size(e,t){let n;return e&&t||(n=this._element.bbox()),e||(e=n.width/n.height*t),t||(t=n.height/n.width*e),this.width(e).height(t)},width(e){return this._queueNumber("width",e)},height(e){return this._queueNumber("height",e)},plot(e,t,n,r){if(4===arguments.length)return this.plot([e,t,n,r]);if(this._tryRetarget("plot",e))return this;const i=new Pl(this._stepper).type(this._element.MorphArray).to(e);return this.queue((function(){i.from(this._element.array())}),(function(e){return this._element.plot(i.at(e)),i.done()})),this._rememberMorpher("plot",i),this},leading(e){return this._queueNumber("leading",e)},viewbox(e,t,n,r){return this._queueObject("viewbox",new es(e,t,n,r))},update(e){return"object"!==typeof e?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",e.offset),this)}}),Qo(nc,{rx:_s,ry:js,from:Xs,to:Js}),Yo(nc,"Runner");class cc extends Fs{constructor(e,t=e){super(Go("svg",e),t),this.namespace()}defs(){return this.isRoot()?Wo(this.node.querySelector("defs"))||this.put(new zs):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Bo.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Po,version:"1.1"}).attr("xmlns:xlink",Fo,Ro).attr("xmlns:svgjs",zo,Ro):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ro).attr("xmlns:svgjs",null,Ro)}root(){return this.isRoot()?this:super.root()}}xo({Container:{nested:$o((function(){return this.put(new cc)}))}}),Yo(cc,"Svg",!0);class uc extends Fs{constructor(e,t=e){super(Go("symbol",e),t)}}function hc(e){return!1===this._build&&this.clear(),this.node.appendChild(Bo.document.createTextNode(e)),this}function dc(){return this.node.getComputedTextLength()}function fc(e,t=this.bbox()){return null==e?t.x:this.attr("x",this.attr("x")+e-t.x)}function pc(e,t=this.bbox()){return null==e?t.y:this.attr("y",this.attr("y")+e-t.y)}function mc(e,t,n=this.bbox()){return this.x(e,n).y(t,n)}function gc(e,t=this.bbox()){return null==e?t.cx:this.attr("x",this.attr("x")+e-t.cx)}function vc(e,t=this.bbox()){return null==e?t.cy:this.attr("y",this.attr("y")+e-t.cy)}function bc(e,t,n=this.bbox()){return this.cx(e,n).cy(t,n)}function yc(e){return this.attr("x",e)}function wc(e){return this.attr("y",e)}function xc(e,t){return this.ax(e).ay(t)}function kc(e){return this._build=!!e,this}xo({Container:{symbol:$o((function(){return this.put(new uc)}))}}),Yo(uc,"Symbol");var Ac={__proto__:null,plain:hc,length:dc,x:fc,y:pc,move:mc,cx:gc,cy:vc,center:bc,ax:yc,ay:wc,amove:xc,build:kc};class Cc extends Bs{constructor(e,t=e){super(Go("text",e),t),this.dom.leading=new As(1.3),this._rebuild=!0,this._build=!1}leading(e){return null==e?this.dom.leading:(this.dom.leading=new As(e),this.rebuild())}rebuild(e){if("boolean"===typeof e&&(this._rebuild=e),this._rebuild){const e=this;let t=0;const n=this.dom.leading;this.each((function(r){const i=Bo.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=n*new As(i);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?t+=o:(this.attr("dy",r?o+t:0),t=0))})),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new As(e.leading||1.3),this}text(e){if(void 0===e){const t=this.node.childNodes;let n=0;e="";for(let r=0,i=t.length;r{let i;try{i=n.bbox()}catch(l){return}const o=new Za(n),a=o.translate(e,t).transform(o.inverse()),s=new Wa(i.x,i.y).transform(a);n.move(s.x,s.y)}),this}function Lc(e){return this.dmove(e,0)}function Oc(e){return this.dmove(0,e)}function Dc(e,t=this.bbox()){return null==e?t.height:this.size(t.width,e,t)}function Pc(e=0,t=0,n=this.bbox()){const r=e-n.x,i=t-n.y;return this.dmove(r,i)}function Ic(e,t,n=this.bbox()){const r=Oo(this,e,t,n),i=r.width/n.width,o=r.height/n.height;return this.children().forEach((e,t)=>{const r=new Wa(n).transform(new Za(e).inverse());e.scale(i,o,r.x,r.y)}),this}function Rc(e,t=this.bbox()){return null==e?t.width:this.size(e,t.height,t)}function Fc(e,t=this.bbox()){return null==e?t.x:this.move(e,t.y,t)}function zc(e,t=this.bbox()){return null==e?t.y:this.move(t.x,e,t)}xo({Container:{foreignObject:$o((function(e,t){return this.put(new Nc).size(e,t)}))}}),Yo(Nc,"ForeignObject");var Bc={__proto__:null,dmove:Mc,dx:Lc,dy:Oc,height:Dc,move:Pc,size:Ic,width:Rc,x:Fc,y:zc};class _c extends Fs{constructor(e,t=e){super(Go("g",e),t)}}Qo(_c,Bc),xo({Container:{group:$o((function(){return this.put(new _c)}))}}),Yo(_c,"G");class jc extends Fs{constructor(e,t=e){super(Go("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Fo)}}Qo(jc,Bc),xo({Container:{link:$o((function(e){return this.put(new jc).to(e)}))},Element:{unlink(){const e=this.linker();if(!e)return this;const t=e.parent();if(!t)return this.remove();const n=t.index(e);return t.add(this,n),e.remove(),this},linkTo(e){let t=this.linker();return t||(t=new jc,this.wrap(t)),"function"===typeof e?e.call(t,t):t.to(e),this},linker(){const e=this.parent();return e&&"a"===e.node.nodeName.toLowerCase()?e:null}}}),Yo(jc,"A");class Hc extends Fs{constructor(e,t=e){super(Go("mask",e),t)}remove(){return this.targets().forEach((function(e){e.unmask()})),super.remove()}targets(){return ss('svg [mask*="'+this.id()+'"]')}}xo({Container:{mask:$o((function(){return this.defs().put(new Hc)}))},Element:{masker(){return this.reference("mask")},maskWith(e){const t=e instanceof Hc?e:this.parent().mask().add(e);return this.attr("mask",'url("#'+t.id()+'")')},unmask(){return this.attr("mask",null)}}}),Yo(Hc,"Mask");class Uc extends Ns{constructor(e,t=e){super(Go("stop",e),t)}update(e){return("number"===typeof e||e instanceof As)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new As(e.offset)),this}}function qc(e,t){if(!e)return"";if(!t)return e;let n=e+"{";for(const r in t)n+=Mo(r)+":"+t[r]+";";return n+="}",n}xo({Gradient:{stop:function(e,t,n){return this.put(new Uc).update(e,t,n)}}}),Yo(Uc,"Stop");class Gc extends Ns{constructor(e,t=e){super(Go("style",e),t)}addText(e=""){return this.node.textContent+=e,this}font(e,t,n={}){return this.rule("@font-face",{fontFamily:e,src:t,...n})}rule(e,t){return this.addText(qc(e,t))}}xo("Dom",{style(e,t){return this.put(new Gc).rule(e,t)},fontface(e,t,n){return this.put(new Gc).font(e,t,n)}}),Yo(Gc,"Style");class Wc extends Cc{constructor(e,t=e){super(Go("textPath",e),t)}array(){const e=this.track();return e?e.array():null}plot(e){const t=this.track();let n=null;return t&&(n=t.plot(e)),null==e?n:this}track(){return this.reference("href")}}xo({Container:{textPath:$o((function(e,t){return e instanceof Cc||(e=this.text(e)),e.path(t)}))},Text:{path:$o((function(e,t=!0){const n=new Wc;let r;if(e instanceof Hl||(e=this.defs().path(e)),n.attr("href","#"+e,Fo),t)while(r=this.node.firstChild)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:$o((function(e){return e instanceof Cc||(e=(new Cc).addTo(this.parent()).text(e)),e.path(this)})),targets(){return ss("svg textPath").filter(e=>(e.attr("href")||"").includes(this.id()))}}}),Wc.prototype.MorphArray=Ol,Yo(Wc,"TextPath");class Vc extends Bs{constructor(e,t=e){super(Go("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,Fo)}}xo({Container:{use:$o((function(e,t){return this.put(new Vc).use(e,t)}))}}),Yo(Vc,"Use");const Yc=qo;Qo([cc,uc,tl,el,ul],ko("viewbox")),Qo([cl,Kl,Zl,Hl],ko("marker")),Qo(Cc,ko("Text")),Qo(Hl,ko("Path")),Qo(zs,ko("Defs")),Qo([Cc,Ec],ko("Tspan")),Qo([Xl,Zs,$s,nc],ko("radius")),Qo(bs,ko("EventTarget")),Qo(Ts,ko("Dom")),Qo(Ns,ko("Element")),Qo(Bs,ko("Shape")),Qo([Fs,Ks],ko("Container")),Qo($s,ko("Gradient")),Qo(nc,ko("Runner")),os.extend(Ao()),_l([As,Ga,es,Za,ks,nl,Ol,Wa]),jl();class Zc{constructor(e){this.node=e}getShapePadding(e,t,n,r){const i=this.node.getShape(),o=15,a=5,s=e+2*n,l=t+2*r,c=Math.abs(s-l);switch(i){case oo["a"].SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case oo["a"].SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case oo["a"].SHAPE.PARALLELOGRAM:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.ELLIPSE:return{paddingX:n<=0?o:0,paddingY:r<=0?a:0};case oo["a"].SHAPE.CIRCLE:return{paddingX:l>s?c/2:0,paddingY:l0}function Qc(){const e=this.formatGetGeneralization();return!!e.find(e=>!e.range||e.range.length<=0)}function $c(e){return this._generalizationList.findIndex(t=>t.generalizationNode.uid===e.uid)}function eu(){if(this.isGeneralization||!this.checkHasGeneralization())return;let e=0,t=0;const n=this.formatGetGeneralization();n.forEach((n,r)=>{let i=this._generalizationList[r];i||(i=this._generalizationList[r]={}),i.node=this,i.range=n.range,i.generalizationLine||(i.generalizationLine=this.lineDraw.path()),i.generalizationNode||(i.generalizationNode=new ah({data:{data:n},uid:Object(v["m"])(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),i.generalizationNode.generalizationBelongNode=this,i.generalizationNode.width>e&&(e=i.generalizationNode.width),i.generalizationNode.height>t&&(t=i.generalizationNode.height),n.isActive&&this.renderer.addNodeToActiveList(i.generalizationNode)}),this._generalizationNodeWidth=e,this._generalizationNodeHeight=t}function tu(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function nu(){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();e.length<=0||!1===this.getData("expand")?this.removeGeneralization():(e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(e=>{this.style.generalizationLine(e.generalizationLine),e.generalizationNode.render()}))}function ru(){const e=this.children.length,t=this.formatGetGeneralization(),n=[];t.forEach(t=>{t.range?t.range.length>0&&t.range[0]<=e-1&&t.range[1]<=e-1&&n.push(t):n.push(t)}),n.length!==t.length&&this.setData({generalization:n})}function iu(){this.isGeneralization||(this._generalizationList.forEach(e=>{e.generalizationLine&&(e.generalizationLine.remove(),e.generalizationLine=null),e.generalizationNode&&(this.renderer.removeNodeFromActiveList(e.generalizationNode),e.generalizationNode.remove(),e.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())}function ou(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.hide(),e.generalizationNode&&e.generalizationNode.hide()})}function au(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.show(),e.generalizationNode&&e.generalizationNode.show()})}function su(e){this._generalizationList.forEach(t=>{t.generalizationLine.opacity(e),t.generalizationNode.group.opacity(e)})}function lu(){const e=this.generalizationBelongNode,t=e.formatGetGeneralization(),n=e.getGeneralizationNodeIndex(this),r=t[n];Array.isArray(r.range)&&r.range.length>0?this.mindMap.renderer.highlightNode(e,r.range):this.mindMap.renderer.highlightNode(e)}function cu(){this.mindMap.renderer.closeHighlightNode()}var uu={formatGetGeneralization:Xc,checkHasGeneralization:Jc,checkHasSelfGeneralization:Qc,getGeneralizationNodeIndex:$c,createGeneralizationNode:eu,updateGeneralization:tu,updateGeneralizationData:ru,renderGeneralization:nu,removeGeneralization:iu,hideGeneralization:ou,showGeneralization:au,setGeneralizationOpacity:su,handleGeneralizationMouseenter:lu,handleGeneralizationMouseleave:cu};const hu='',du='',fu='',pu='';var mu={open:hu,close:du,remove:fu,imgAdjust:pu};function gu(){if(this._openExpandNode)return;let{close:e,open:t}=this.mindMap.opt.expandBtnIcon||{};this.mindMap.opt.isShowExpandNum?(this._openExpandNode=Yc().text().size(this.expandBtnSize,this.expandBtnSize),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:this.expandBtnSize/2,y:2})):(this._openExpandNode=Yc(t||mu.open).size(this.expandBtnSize,this.expandBtnSize),this._openExpandNode.x(0).y(-this.expandBtnSize/2)),this._closeExpandNode=Yc(e||mu.close).size(this.expandBtnSize,this.expandBtnSize),this._closeExpandNode.x(0).y(-this.expandBtnSize/2),this._fillExpandNode=(new Sc).size(this.expandBtnSize),this._fillExpandNode.x(0).y(-this.expandBtnSize/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function vu(e=[]){return e.reduce((e,t)=>e+this.sumNode(t.children||[]),e.length)}function bu(){let e,{expand:t}=this.getData();if(t!==this._lastExpandBtnType&&(this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent(),!1===t?(e=this._openExpandNode,this._lastExpandBtnType=!1):(e=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn)){let{isShowExpandNum:n,expandBtnStyle:r,expandBtnNumHandler:i}=this.mindMap.opt;if(n)if(t)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:r.strokeColor});let t=this.sumNode(this.nodeData.children);t=i(t),e.text(t)}this._expandBtn.add(this._fillExpandNode).add(e)}}function yu(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function wu(){!this.nodeData.children||this.nodeData.children.length<=0||this.isRoot||(this._expandBtn||(this._expandBtn=new _c,this._expandBtn.on("mouseover",e=>{e.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",e=>{e.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",e=>{e.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",e=>{e.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn")),this.group.add(this._expandBtn),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function xu(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function ku(){this.mindMap.opt.alwaysShowExpandBtn||setTimeout(()=>{this.renderExpandBtn()},0)}function Au(){if(this.mindMap.opt.alwaysShowExpandBtn||this._isMouseenter)return;let{isActive:e,expand:t}=this.getData();!e&&t&&setTimeout(()=>{this.removeExpandBtn()},0)}var Cu={createExpandNodeContent:gu,updateExpandBtnNode:bu,updateExpandBtnPos:yu,renderExpandBtn:wu,removeExpandBtn:xu,showExpandBtn:ku,hideExpandBtn:Au,sumNode:vu};function Eu(e={}){this.mindMap.execCommand("SET_NODE_DATA",this,e)}function Su(e,t,n){this.mindMap.execCommand("SET_NODE_TEXT",this,e,t,n)}function Tu(e){this.mindMap.execCommand("SET_NODE_IMAGE",this,e)}function Nu(e){this.mindMap.execCommand("SET_NODE_ICON",this,e)}function Mu(e,t){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,e,t)}function Lu(e){this.mindMap.execCommand("SET_NODE_NOTE",this,e)}function Ou(e){this.mindMap.execCommand("SET_NODE_TAG",this,e)}function Du(e){this.mindMap.execCommand("SET_NODE_SHAPE",this,e)}function Pu(e,t){this.mindMap.execCommand("SET_NODE_STYLE",this,e,t)}function Iu(e){this.mindMap.execCommand("SET_NODE_STYLES",this,e)}var Ru={setData:Eu,setText:Su,setImage:Tu,setIcon:Nu,setHyperlink:Mu,setNote:Lu,setTag:Ou,setShape:Du,setStyle:Pu,setStyles:Iu};function Fu(){let e=this.getData("image");if(!e)return;let t=this.getImgShowSize(),n=(new tl).load(e).size(...t);return this.getData("imageTitle")&&n.attr("title",this.getData("imageTitle")),n.on("dblclick",e=>{this.mindMap.emit("node_img_dblclick",this,e)}),n.on("mouseenter",e=>{this.mindMap.emit("node_img_mouseenter",this,n,e)}),n.on("mouseleave",e=>{this.mindMap.emit("node_img_mouseleave",this,n,e)}),n.on("mousemove",e=>{this.mindMap.emit("node_img_mousemove",this,n,e)}),{node:n,width:t[0],height:t[1]}}function zu(){const{custom:e,width:t,height:n}=this.getData("imageSize");return e?[t,n]:Object(v["W"])(t,n,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function Bu(){let e=this.getData();if(!e.icon||e.icon.length<=0)return[];let t=this.mindMap.themeConfig.iconSize;return e.icon.map(e=>{let n=I.getNodeIconListIcon(e,this.mindMap.opt.iconList||[]),r=null;return r=/^{this.mindMap.emit("node_icon_click",this,e,t)}),{node:r,width:t,height:t}})}function _u(){const{textAutoWrapWidth:e}=this.mindMap.opt;let t=new _c,n=!1;if(this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,n=!0),[oo["a"].CHANGE_THEME].includes(this.mindMap.renderer.renderSource)&&(this.hasCustomStyle()||(n=!0)),n){let e=this.getData("text"),t=Object(v["g"])(e),n=this.style.createStyleText();t?(e=Object(v["U"])(e),e=Object(v["b"])(e,"span",n)):e=`

${e}

`,this.setData({text:e})}let r=`
${this.getData("text")}
`;oo["d"].measureRichtextNodeTextSizeEl||(oo["d"].measureRichtextNodeTextSizeEl=document.createElement("div"),oo["d"].measureRichtextNodeTextSizeEl.style.position="fixed",oo["d"].measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(oo["d"].measureRichtextNodeTextSizeEl));let i=oo["d"].measureRichtextNodeTextSizeEl;i.innerHTML=r;let o=i.children[0];o.classList.add("smm-richtext-node-wrap"),o.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),o.style.maxWidth=e+"px";let{width:a,height:s}=o.getBoundingClientRect();if(s<=0){i.innerHTML="

abc123我和你

";let e=i.children[0];e.classList.add("smm-richtext-node-wrap"),s=e.getBoundingClientRect().height}a=Math.ceil(a)+1,s=Math.ceil(s),t.attr("data-width",a),t.attr("data-height",s);let l=new Nc;return l.width(a),l.height(s),l.add(i.children[0]),t.add(l),{node:t,width:a,height:s}}function ju(){if(this.getData("richText"))return this.createRichTextNode();let e=new _c,t=this.getStyle("fontSize",!1),n=this.getStyle("lineHeight",!1),r=this.style.getTextFontStyle(),i=[];Object(v["I"])(this.getData("text"))||(i=String(this.getData("text")).split(/\n/gim));let o=this.mindMap.opt.textAutoWrapWidth,a=!1;i.forEach((e,t)=>{let n=e.split(""),s=[],l=[];while(n.length){let e=n.shift(),t=[...l,e].join("");Object(v["L"])(t,r).width<=o?l.push(e):(s.push(l.join("")),l=[e])}l.length>0&&s.push(l.join("")),s.length>1&&(a=!0),i[t]=s.join("\n")}),i=i.join("\n").split(/\n/gim),i.forEach((r,i)=>{let o=(new Cc).text(r);this.style.text(o),o.y(t*n*i),e.add(o)});let{width:s,height:l}=e.bbox();return s=Math.ceil(s),l=Math.ceil(l),e.attr("data-width",s),e.attr("data-height",l),e.attr("data-ismultiLine",a||i.length>1),{node:e,width:s,height:l}}function Hu(){let{hyperlink:e,hyperlinkTitle:t}=this.getData();if(!e)return;let n=this.mindMap.themeConfig.iconSize,r=new Yc,i=(new jc).to(e).target("_blank");i.node.addEventListener("click",e=>{e.stopPropagation()}),t&&i.attr("title",t),i.rect(n,n).fill({color:"transparent"});let o=Yc(I.hyperlink).size(n,n);return this.style.iconNode(o),i.add(o),r.add(i),{node:r,width:n,height:n}}function Uu(){let e=this.getData("tag");if(!e||e.length<=0)return[];let t=[];return e.slice(0,this.mindMap.opt.maxTag).forEach((e,n)=>{let r=new _c,i=(new Cc).text(e).x(8).cy(8);this.style.tagText(i,n);let{width:o}=i.bbox(),a=(new Xl).size(o+16,20);const s=this.mindMap.opt.tagsColorMap||{},l=s[i.node.textContent];this.style.tagRect(a,i,l),r.add(a).add(i),t.push({node:r,width:o+16,height:20})}),t}function qu(){if(!this.getData("note"))return null;let e=this.mindMap.themeConfig.iconSize,t=(new Yc).attr("cursor","pointer");t.add((new Xl).size(e,e).fill({color:"transparent"}));let n=Yc(I.note).size(e,e);if(this.style.iconNode(n),t.add(n),!this.mindMap.opt.customNoteContentShow){if(!this.noteEl){this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`\n position: fixed;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 2px 5px rgb(0 0 0 / 10%);\n display: none;\n background-color: #fff;\n z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}\n `;const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.noteEl)}this.noteEl.innerText=this.getData("note")}return t.on("mouseover",()=>{const{left:e,top:t}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),e,t,this):(this.noteEl.style.left=e+"px",this.noteEl.style.top=t+"px",this.noteEl.style.display="block")}),t.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),{node:t,width:e,height:e}}function Gu(){const e=this.mindMap.themeConfig.iconSize,{scaleY:t}=this.mindMap.view.getTransformData().transform,n=e*t;let{left:r,top:i}=this._noteData.node.node.getBoundingClientRect();return i+=n,{left:r,top:i}}function Wu(e){oo["d"].measureCustomNodeContentSizeEl||(oo["d"].measureCustomNodeContentSizeEl=document.createElement("div"),oo["d"].measureCustomNodeContentSizeEl.style.cssText="\n position: fixed;\n left: -99999px;\n top: -99999px;\n ",this.mindMap.el.appendChild(oo["d"].measureCustomNodeContentSizeEl)),oo["d"].measureCustomNodeContentSizeEl.innerHTML="",oo["d"].measureCustomNodeContentSizeEl.appendChild(e);let t=oo["d"].measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:t.width,height:t.height}}function Vu(){return!!this._customNodeContent}var Yu={createImgNode:Fu,getImgShowSize:zu,createIconNode:Bu,createRichTextNode:_u,createTextNode:ju,createHyperlinkNode:Hu,createTagNode:Uu,createNoteNode:qu,getNoteContentPosition:Gu,measureCustomNodeContentSize:Wu,isUseCustomNodeContent:Vu};function Zu(){if(!(!this.nodeData.children||this.nodeData.children.length<=0||this.isRoot)&&!this.mindMap.opt.alwaysShowExpandBtn){let{width:e,height:t}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new Xl,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,this.expandBtnSize,e,t,this)}}function Ku(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function Xu(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.nodeData.children&&this.nodeData.children.length>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}var Ju={renderExpandBtnPlaceholderRect:Zu,clearExpandBtnPlaceholderRect:Ku,updateExpandBtnPlaceholderRect:Xu};function Qu(){this.mindMap.cooperate&&(this._userListGroup=new _c,this.group.add(this._userListGroup))}function $u(e){const{avatarSize:t,fontSize:n}=this.mindMap.opt.cooperateStyle,r=new _c,i=e.isMore?e.name:String(e.name)[0],o=(new Sc).size(t,t);o.fill({color:e.color||Object(v["s"])(i)});const a=(new Cc).text(i).fill({color:"#fff"}).css({"font-size":n}).dx(-n/2).dy((t-n)/2);return r.add(o).add(a),r}function eh(e){const{avatarSize:t}=this.mindMap.opt.cooperateStyle;return(new tl).load(e.avatar).size(t,t)}function th(){if(!this._userListGroup)return;const{avatarSize:e}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const t=this.userList.length,n=Math.floor(this.width/e),r=[];t>n?r.push(...this.userList.slice(0,n-1),{isMore:!0,name:"+"+(t-n+1)}):r.push(...this.userList),r.forEach((t,n)=>{let r=null;r=t.avatar?this.createImageAvatar(t):this.createTextAvatar(t),r.x(n*e).cy(-e/2),this._userListGroup.add(r)})}function nh(e){this.userList.find(t=>t.id==e.id)||(this.userList.push(e),this.updateUserListNode())}function rh(e){const t=this.userList.findIndex(t=>t.id==e.id);-1!==t&&(this.userList.splice(t,1),this.updateUserListNode())}var ih={createUserListNode:Qu,updateUserListNode:th,createTextAvatar:$u,createImageAvatar:eh,addUser:nh,removeUser:rh};class oh{constructor(e={}){this.nodeData=this.handleData(e.data||{}),this.uid=e.uid,this.mindMap=e.mindMap,this.renderer=e.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new bo(this),this.shapeInstance=new Zc(this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=void 0!==e.isRoot&&e.isRoot,this.isGeneralization=void 0!==e.isGeneralization&&e.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=void 0===e.layerIndex?0:e.layerIndex,this.width=e.width||0,this.height=e.height||0,this._left=e.left||0,this._top=e.top||0,this.customLeft=e.data.data.customLeft||void 0,this.customTop=e.data.data.customTop||void 0,this.isDrag=!1,this.parent=e.parent||null,this.children=e.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._rectInfo={imgContentWidth:0,imgContentHeight:0,textContentWidth:0,textContentHeight:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.textContentItemMargin=this.mindMap.opt.textContentMargin,this.blockContentMargin=this.mindMap.opt.imgTextMargin,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1,Object.keys(uu).forEach(e=>{this[e]=uu[e].bind(this)}),Object.keys(Cu).forEach(e=>{this[e]=Cu[e].bind(this)}),Object.keys(Ju).forEach(e=>{this[e]=Ju[e].bind(this)}),Object.keys(Ru).forEach(e=>{this[e]=Ru[e].bind(this)}),Object.keys(Yu).forEach(e=>{this[e]=Yu[e].bind(this)}),this.mindMap.cooperate&&Object.keys(ih).forEach(e=>{this[e]=ih[e].bind(this)}),this.getSize()}get left(){return this.customLeft||this._left}set left(e){this._left=e}get top(){return this.customTop||this._top}set top(e){this._top=e}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}handleData(e){return e.data.expand=!1!==e.data.expand,e.data.isActive=!0===e.data.isActive,e.children=e.children||[],e}createNodeData(){let{isUseCustomNodeContent:e,customCreateNodeContent:t}=this.mindMap.opt;e&&t&&(this._customNodeContent=t(this),this._customNodeContent.setAttribute("xmlns","http://www.w3.org/1999/xhtml")),this._customNodeContent||(this._imgData=this.createImgNode(),this._iconData=this.createIconNode(),this._textData=this.createTextNode(),this._hyperlinkData=this.createHyperlinkNode(),this._tagData=this.createTagNode(),this._noteData=this.createNoteNode())}getSize(){this.updateGeneralization(),this.createNodeData();let{width:e,height:t}=this.getNodeRect(),n=this.width!==e||this.height!==t;return this.width=e,this.height=t,n}getNodeRect(){if(this.isUseCustomNodeContent()){let e=this.measureCustomNodeContentSize(this._customNodeContent);return{width:e.width,height:e.height}}let e=0,t=0,n=0,r=0;this._imgData&&(this._rectInfo.imgContentWidth=e=this._imgData.width,this._rectInfo.imgContentHeight=t=this._imgData.height),this._iconData.length>0&&(n+=this._iconData.reduce((e,t)=>(r=Math.max(r,t.height),e+(t.width+this.textContentItemMargin)),0)),this._textData&&(n+=this._textData.width,r=Math.max(r,this._textData.height)),this._hyperlinkData&&(n+=this._hyperlinkData.width,r=Math.max(r,this._hyperlinkData.height)),this._tagData.length>0&&(n+=this._tagData.reduce((e,t)=>(r=Math.max(r,t.height),e+(t.width+this.textContentItemMargin)),0)),this._noteData&&(n+=this._noteData.width,r=Math.max(r,this._noteData.height)),this._rectInfo.textContentWidth=n,this._rectInfo.textContentHeight=r;let i=t>0&&r>0?this.blockContentMargin:0,{paddingX:o,paddingY:a}=this.getPaddingVale(),s=Math.max(e,n),l=t+r,{paddingX:c,paddingY:u}=this.shapeInstance.getShapePadding(s,l,o,a);this.shapePadding.paddingX=c,this.shapePadding.paddingY=u;const h=this.getBorderWidth();return{width:s+2*o+2*c+h,height:l+2*a+i+2*u+h}}layout(){this.group.clear();const{hoverRectPadding:e}=this.mindMap.opt;let{width:t,height:n,textContentItemMargin:r}=this,{paddingY:i}=this.getPaddingVale();const o=this.getBorderWidth()/2;i+=this.shapePadding.paddingY+o,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(o,o),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid);const a=()=>{this.hoverNode=(new Xl).size(t+2*e,n+2*e).x(-e).y(-e),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,t,n),this.group.add(this.hoverNode)};if(this.isUseCustomNodeContent()){let e=new Nc;return e.width(t),e.height(n),e.add(this._customNodeContent),this.group.add(e),void a()}let s=0;this._imgData&&(s=this._imgData.height,this.group.add(this._imgData.node),this._imgData.node.cx(t/2).y(i));let l=new _c,c=0,u=new _c;if(this._iconData&&this._iconData.length>0){let e=0;this._iconData.forEach(t=>{t.node.x(c+e).y((this._rectInfo.textContentHeight-t.height)/2),u.add(t.node),e+=t.width+r}),l.add(u),c+=e}this._textData&&(this._textData.node.attr("data-offsetx",c),this._textData.node.x(c).y(0),l.add(this._textData.node),c+=this._textData.width+r),this._hyperlinkData&&(this._hyperlinkData.node.x(c).y((this._rectInfo.textContentHeight-this._hyperlinkData.height)/2),l.add(this._hyperlinkData.node),c+=this._hyperlinkData.width+r);let h=new _c;if(this._tagData&&this._tagData.length>0){let e=0;this._tagData.forEach(t=>{t.node.x(c+e).y((this._rectInfo.textContentHeight-t.height)/2),h.add(t.node),e+=t.width+r}),l.add(h),c+=e}this._noteData&&(this._noteData.node.x(c).y((this._rectInfo.textContentHeight-this._noteData.height)/2),l.add(this._noteData.node),c+=this._noteData.width),l.translate(t/2-l.bbox().width/2,s+i+(s>0&&this._rectInfo.textContentHeight>0?this.blockContentMargin:0)),this.group.add(l),a()}bindGroupEvent(){this.group.on("click",e=>{if(this.mindMap.emit("node_click",this,e),this.isMultipleChoice)return e.stopPropagation(),void(this.isMultipleChoice=!1);this.active(e)}),this.group.on("mousedown",e=>{const{readonly:t,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(t||(this.isRoot?3!==e.which||r||e.stopPropagation():2!==e.which&&e.stopPropagation()),e.ctrlKey&&n){this.isMultipleChoice=!0;let e=this.getData("isActive");e||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[e?"removeNodeFromActiveList":"addNodeToActiveList"](this),this.renderer.emitNodeActiveEvent(e?null:this)}this.mindMap.emit("node_mousedown",this,e)}),this.group.on("mouseup",e=>{this.isRoot||2===e.which||this.mindMap.opt.readonly||e.stopPropagation(),this.mindMap.emit("node_mouseup",this,e)}),this.group.on("mouseenter",e=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,e))}),this.group.on("mouseleave",e=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,e))}),this.group.on("dblclick",e=>{this.mindMap.opt.readonly||e.ctrlKey||(e.stopPropagation(),this.mindMap.emit("node_dblclick",this,e))}),this.group.on("contextmenu",e=>{const{readonly:t,useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;t||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),this.mindMap.select&&!n&&this.mindMap.select.hasSelectRange()||(this.getData("isActive")&&1===this.renderer.activeNodeList.length||(this.renderer.clearActiveNodeList(),this.active(e)),this.mindMap.emit("node_contextmenu",e,this)))})}active(e){this.mindMap.opt.readonly||(e&&e.stopPropagation(),this.getData("isActive")||(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this),this.renderer.emitNodeActiveEvent(this)))}update(){if(!this.group)return;this.updateNodeActiveClass();let{alwaysShowExpandBtn:e}=this.mindMap.opt;if(e)this._expandBtn&&this.nodeData.children.length<=0?this.removeExpandBtn():this.renderExpandBtn();else{let{isActive:e,expand:t}=this.getData();!t||e||this._isMouseenter?this.showExpandBtn():this.hideExpandBtn()}this.renderGeneralization(),this.updateUserListNode&&this.updateUserListNode();let t=this.group.transform();this.left===t.translateX&&this.top===t.translateY||this.group.translate(this.left-t.translateX,this.top-t.translateY)}getNodePosInClient(e,t){let n=this.mindMap.draw.transform(),{scaleX:r,scaleY:i,translateX:o,translateY:a}=n,s=e*r+o,l=t*i+a;return{left:s,top:l}}reRender(){let e=this.getSize();return this.layout(),this.update(),e}updateNodeActiveClass(){if(!this.group)return;const e=this.getData("isActive");this.group[e?"addClass":"removeClass"]("active")}updateNodeByActive(e){this.group&&(e?this.showExpandBtn():this.hideExpandBtn(),this.updateNodeActiveClass())}render(e=(()=>{})){if(this.renderLine(),this.group?(this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update()):(this.group=new _c,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update()),this.children&&this.children.length&&!1!==this.getData("expand")){let t=0;this.children.forEach(n=>{n.render(()=>{t++,t>=this.children.length&&e()})})}else e();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),setTimeout(()=>{this.mindMap.emit("node_dblclick",this,null,!0)},0))}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(e=>{e.remove()}))}destroy(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.group=null,this.parent&&this.parent.removeLine())}hide(){if(this.group.hide(),this.hideGeneralization(),this.parent){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].hide(),this._lines.forEach(e=>{e.hide()})}this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].show(),this._lines.forEach(e=>{e.show()})}this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}}setOpacity(e){this.group.opacity(e),this._lines.forEach(t=>{t.opacity(e)}),this.children.forEach(t=>{t.setOpacity(e)}),this.setGeneralizationOpacity(e)}hideChildren(){this._lines.forEach(e=>{e.hide()}),this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}showChildren(){this._lines.forEach(e=>{e.show()}),this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}startDrag(){this.isDrag=!0,this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group.removeClass("smm-node-dragging")}renderLine(e=!1){if(!1===this.getData("expand"))return;let t=this.nodeData.children.length;this.mindMap.opt.layout!==oo["a"].LAYOUT.FISHBONE||!this.isRoot&&1!==this.layerIndex||(t=0),t>this._lines.length?new Array(t-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):t{e.remove()}),this._lines=this._lines.slice(0,t)),this.renderer.layout.renderLine(this,this._lines,(e,t)=>{this.styleLine(e,t)},this.style.getStyle("lineStyle",!0)),e&&this.children&&this.children.length>0&&this.children.forEach(t=>{t.renderLine(e)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?oo["a"].SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return void 0!==this.customLeft&&void 0!==this.customTop}ancestorHasCustomPosition(){let e=this;while(e){if(e.hasCustomPosition())return!0;e=e.parent}return!1}ancestorHasGeneralization(){let e=this.parent;while(e){if(e.checkHasGeneralization())return!0;e=e.parent}return!1}addChildren(e){this.children.push(e)}styleLine(e,t){let n=t.getSelfInhertStyle("lineWidth")||t.getStyle("lineWidth",!0),r=t.getSelfInhertStyle("lineColor")||t.getStyle("lineColor",!0),i=t.getSelfInhertStyle("lineDasharray")||t.getStyle("lineDasharray",!0);this.style.line(e,{width:n,color:r,dasharray:i})}removeLine(){this._lines.forEach(e=>{e.remove()}),this._lines=[]}isAncestor(e){if(this.uid===e.uid)return!1;let t=e.parent;while(t){if(this.uid===t.uid)return!0;t=t.parent}return!1}isParent(e){if(this.uid===e.uid)return!1;const t=e.parent;return!(!t||this.uid!==t.uid)}isBrother(e){return!(!this.parent||this.uid===e.uid)&&this.parent.children.find(t=>t.uid===e.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.uid===this.uid):-1}getPaddingVale(){let{isActive:e}=this.getData();return{paddingX:this.getStyle("paddingX",!0,e),paddingY:this.getStyle("paddingY",!0,e)}}getStyle(e,t){let n=this.style.merge(e,t);return void 0===n?"":n}getSelfStyle(e){return this.style.getSelfStyle(e)}getParentSelfStyle(e){return this.parent?this.parent.getSelfStyle(e)||this.parent.getParentSelfStyle(e):null}getSelfInhertStyle(e){return this.getSelfStyle(e)||this.getParentSelfStyle(e)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(e){return e?this.nodeData.data[e]:this.nodeData.data}getPureData(e=!0,t=!1){return Object(v["k"])({},this,e,t)}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group.rbox()}getRectInSvg(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),{left:i,top:o,width:a,height:s}=this,l=(i+a)*e+n,c=(o+s)*t+r;return i=i*e+n,o=o*t+r,{left:i,right:l,top:o,bottom:c,width:a*e,height:s*t}}}var ah=oh;class sh{constructor(e){this.max=e||1e3,this.size=0,this.pool=new Map}add(e,t){if(this.delete(e),this.pool.set(e,t),this.size++,this.size>this.max){let e=this.pool.keys(),t=e.next();this.delete(t.value)}}delete(e){this.pool.has(e)&&(this.pool.delete(e),this.size--)}has(e){return this.pool.has(e)}get(e){if(this.pool.has(e))return this.pool.get(e)}}class lh{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new sh(this.mindMap.opt.maxNodeCacheCount)}doLayout(){throw new Error("【computed】方法为必要方法,需要子类进行重写!")}renderLine(){throw new Error("【renderLine】方法为必要方法,需要子类进行重写!")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法,需要子类进行重写!")}renderGeneralization(){}cacheNode(e,t){this.renderer.nodeCache[e]=t,this.lru.add(e,t)}checkIsNeedResizeSources(){return[oo["a"].CHANGE_THEME,oo["a"].TRANSFORM_TO_NORMAL_NODE].includes(this.renderer.renderSource)}checkIsLayerTypeChange(e,t){return!(e>=2&&t>=2)&&(e>=2&&t<2||(e<2&&t>=2||void 0))}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(e){this.renderer.renderSource===oo["a"].CHANGE_LAYOUT&&(e.needRerenderExpandBtnPlaceholderRect=!0)}createNode(e,t,n,r){let i=null;if(e&&e._node&&!this.renderer.reRender){i=e._node;let t=this.checkIsLayerTypeChange(i.layerIndex,r);i.reset(),i.layerIndex=r,this.cacheNode(e._node.uid,i),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(i),(this.checkIsNeedResizeSources()||t)&&(i.getSize(),i.needLayout=!0)}else if(this.lru.has(e.data.uid)&&!this.renderer.reRender){i=this.lru.get(e.data.uid);let t=JSON.stringify(i.getData()),n=this.checkIsLayerTypeChange(i.layerIndex,r);i.reset(),i.nodeData=i.handleData(e||{}),i.layerIndex=r,this.cacheNode(e.data.uid,i),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(i),e._node=i;let o=this.checkIsNeedResizeSources(),a=t!==JSON.stringify(e.data);(o||a||n)&&(i.getSize(),i.needLayout=!0)}else{let t=e.data.uid||Object(v["m"])();i=new ah({data:e,uid:t,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:r}),e.data.uid=t,this.cacheNode(t,i),e._node=i,e.data.isActive&&this.renderer.addNodeToActiveList(i)}return-1!==this.mindMap.renderer.findActiveNodeIndex(i)&&i.setData({isActive:!0}),n?(i.isRoot=!0,this.root=i):(i.parent=t._node,t._node.addChildren(i)),i}formatPosition(e,t,n){return"number"===typeof e?e:void 0!==oo["f"][e]?t*oo["f"][e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}setNodeCenter(e){let{initRootNodePosition:t}=this.mindMap.opt,{CENTER:n}=oo["a"].INIT_ROOT_NODE_POSITION;(!t||!Array.isArray(t)||t.length<2)&&(t=[n,n]),e.left=this.formatPosition(t[0],this.mindMap.width,e.width),e.top=this.formatPosition(t[1],this.mindMap.height,e.height)}updateChildren(e,t,n){e.forEach(e=>{e[t]+=n,e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildren(e.children,t,n)})}updateChildrenPro(e,t){e.forEach(e=>{Object.keys(t).forEach(n=>{e[n]+=t[n]}),e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildrenPro(e.children,t)})}getNodeAreaWidth(e,t=!1){let n=[],r=0,i=(e,o)=>{t&&e.checkHasGeneralization()&&(r+=e._generalizationNodeWidth),e.children.length?(o+=e.width/2,e.children.forEach(e=>{i(e,o)})):(o+=e.width,n.push(o))};return i(e,0),Math.max(...n)+r}quadraticCurvePath(e,t,n,r){let i=e+.2*(n-e),o=t+.8*(r-t);return`M ${e},${t} Q ${i},${o} ${n},${r}`}cubicBezierPath(e,t,n,r){let i=e+(n-e)/2,o=t,a=i,s=r;return`M ${e},${t} C ${i},${o} ${a},${s} ${n},${r}`}getMarginX(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,o=2*n.hoverRectPadding;return 1===e?r.marginX+o:i.marginX+o}getMarginY(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,o=2*n.hoverRectPadding;return 1===e?r.marginY+o:i.marginY+o}getNodeWidthWithGeneralization(e){return Math.max(e.width,e.checkHasGeneralization()?e._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(e){return Math.max(e.height,e.checkHasGeneralization()?e._generalizationNodeHeight:0)}getNodeBoundaries(e,t){let{generalizationLineMargin:n,generalizationNodeMargin:r}=this.mindMap.themeConfig,i=e=>{let n=1/0,o=-1/0,a=1/0,s=-1/0;e.children&&e.children.length>0&&e.children.forEach(e=>{let{left:l,right:c,top:u,bottom:h}=i(e),d=e.checkHasGeneralization()&&e.getData("expand")?e._generalizationNodeWidth+r:0,f=e.checkHasGeneralization()&&e.getData("expand")?e._generalizationNodeHeight+r:0;l-("h"===t?d:0)o&&(o=c+("h"===t?d:0)),us&&(s=h+("v"===t?f:0))});let l={left:e.left,right:e.left+e.width,top:e.top,bottom:e.top+e.height};return{left:l.lefto?l.right:o,top:l.tops?l.bottom:s}},{left:o,right:a,top:s,bottom:l}=i(e);return{left:o,right:a,top:s,bottom:l,generalizationLineMargin:n,generalizationNodeMargin:r}}getChildrenBoundaries(e,t,n=0,r){let{generalizationLineMargin:i,generalizationNodeMargin:o}=this.mindMap.themeConfig;const a=e.children.slice(n,r+1);let s=1/0,l=-1/0,c=1/0,u=-1/0;return a.forEach(e=>{const n=this.getNodeBoundaries(e,t);s=n.leftl?n.right:l,c=n.topu?n.bottom:u}),{left:s,right:l,top:c,bottom:u,generalizationLineMargin:i,generalizationNodeMargin:o}}getNodeGeneralizationRenderBoundaries(e,t){let n=null;return n=e.range?this.getChildrenBoundaries(e.node,t,e.range[0],e.range[1]):this.getNodeBoundaries(e.node,t),n}getNodeActChildrenLength(e){return e.nodeData.children&&e.nodeData.children.length}}var ch=lh;class uh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):i.left=t._node.left+t._node.width+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0;let o=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.childrenAreaHeight2=Math.max(e._node.childrenAreaHeight,o)},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2-e.childrenAreaHeight/2,i=n+t;e.children.forEach(e=>{e.top=i,i+=e.height+t})}},null,!0)}adjustTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=e.childrenAreaHeight2-2*this.getMarginY(r+1)-e.height;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((n,i)=>{if(n.uid===e.uid||n.hasCustomPosition())return;let o=0;ir&&(o=t),n.top+=o,n.children&&n.children.length&&this.updateChildren(n.children,"top",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.getMarginX(e.layerIndex+1),c=.6*(l-s),u=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((l,h)=>{let d=0===e.layerIndex?r+o:r+o+s,f=i+a/2,p=l.left,m=l.top+l.height/2,g=u?l.width:0;f=u&&!e.isRoot?f+a/2:f,m=u?m+l.height/2:m;let v=`M ${d},${f} L ${d+c},${f} L ${d+c},${m} L ${p+g},${m}`;t[h].plot(v),n&&n(t[h],l)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:r+o+s,d=i+a/2,f=c.left,p=c.top+c.height/2;d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let m=l?` L ${c.left+c.width},${p}`:"",g=`M ${h},${d} L ${f},${p}`+m;t[u].plot(g),n&&n(t[u],c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:r+o+s,d=i+a/2,f=c.left,p=c.top+c.height/2,m="";d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let g=l?` L ${c.left+c.width},${p}`:"";m=e.isRoot&&!this.mindMap.themeConfig.rootLineKeepSameInCurve?this.quadraticCurvePath(h,d,f,p)+g:this.cubicBezierPath(h,d,f,p)+g,t[u].plot(m),n&&n(t[u],c)})}renderExpandBtn(e,t){let{width:n,height:r}=e,{translateX:i,translateY:o}=t.transform(),a=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,s=n,l=r/2+a;s===i&&l===o||t.translate(s-i,l-o)}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(t,r).x(n).y(0)}}var hh=uh;class dh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.RIGHT:oo["a"].LAYOUT_GROW_DIR.LEFT,o.left=o.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(!e.data.expand)return e._node.leftChildrenAreaHeight=0,void(e._node.rightChildrenAreaHeight=0);let i=0,o=0,a=0,s=0;e._node.children.forEach(e=>{e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(i++,a+=e.height):(o++,s+=e.height)}),e._node.leftChildrenAreaHeight=a+(i+1)*this.getMarginY(r+1),e._node.rightChildrenAreaHeight=s+(o+1)*this.getMarginY(r+1);let l=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.leftChildrenAreaHeight2=Math.max(e._node.leftChildrenAreaHeight,l),e._node.rightChildrenAreaHeight2=Math.max(e._node.rightChildrenAreaHeight,l)},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2+t,i=n-e.leftChildrenAreaHeight/2,o=n-e.rightChildrenAreaHeight/2;e.children.forEach(e=>{e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(e.top=i,i+=e.height+t):(e.top=o,o+=e.height+t)})}},null,!0)}adjustTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=2*this.getMarginY(r+1)+e.height,o=e.leftChildrenAreaHeight2-i,a=e.rightChildrenAreaHeight2-i;(o>0||a>0)&&this.updateBrothers(e,o/2,a/2)},null,!0)}updateBrothers(e,t,n){if(e.parent){let r=e.parent.children.filter(t=>t.dir===e.dir),i=Object(v["w"])(e,r);r.forEach((e,r)=>{if(e.hasCustomPosition())return;let o=0,a=e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?t:n;ri&&(o=a),e.top+=o,e.children&&e.children.length&&this.updateChildren(e.children,"top",o)}),this.updateBrothers(e.parent,t,n)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.getMarginX(e.layerIndex+1),c=.6*(l-s),u=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((l,h)=>{let d=0,f=0,p=u?l.width:0;l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(f=-c,d=0===e.layerIndex?r:r-s,p=-p):(f=c,d=0===e.layerIndex?r+o:r+o+s);let m=i+a/2,g=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,v=l.top+l.height/2;m=u&&!e.isRoot?m+a/2:m,v=u?v+l.height/2:v;let b=`M ${d},${m} L ${d+f},${m} L ${d+f},${v} L ${g+p},${v}`;t[h].plot(b),n&&n(t[h],l)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,d=i+a/2,f=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,p=c.top+c.height/2;d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let m="";l&&(m=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?` L ${c.left},${p}`:` L ${c.left+c.width},${p}`);let g=`M ${h},${d} L ${f},${p}`+m;t[u].plot(g),n&&n(t[u],c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,d=i+a/2,f=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,p=c.top+c.height/2,m="";d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let g="";this.mindMap.themeConfig.nodeUseLineStyle&&(g=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?` L ${c.left},${p}`:` L ${c.left+c.width},${p}`),m=e.isRoot&&!this.mindMap.themeConfig.rootLineKeepSameInCurve?this.quadraticCurvePath(h,d,f,p)+g:this.cubicBezierPath(h,d,f,p)+g,t[u].plot(m),n&&n(t[u],c)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:o,translateY:a}=t.transform(),s=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,l=e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?0-i:n,c=r/2+s;if(l===o&&c===a)return;let u=l-o,h=c-a;t.translate(u,h)}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===oo["a"].LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:o,generalizationLineMargin:a,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,"h"),l=t?i-a:o+a,c=l,u=n,h=l,d=r,f=c+(t?-20:20),p=u+(d-u)/2,m=`M ${c},${u} Q ${f},${p} ${h},${d}`;e.generalizationLine.plot(m),e.generalizationNode.left=l+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}var fh=dh;class ph extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):t._node.isRoot&&(i.top=t._node.top+t._node.height+this.getMarginX(r)),!e.data.expand)return!0},(e,t,n,r)=>{if(n){let t=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaWidth=t?e._node.children.reduce((e,t)=>e+t.width,0)+(t+1)*this.getMarginX(r+1):0}},!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width/2-e.childrenAreaWidth/2,r=n+t;e.children.forEach(e=>{e.left=r,r+=e.width+t})}else{let t=e.top+this.getNodeHeightWithGeneralization(e)+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+.5*e.width,n.top=t,t+=this.getNodeHeightWithGeneralization(n)+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(t&&t.isRoot){let t=this.getNodeAreaWidth(e,!0),n=t-e.width;n>0&&this.updateBrothersLeft(e,n)}let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+this.getNodeHeightWithGeneralization(t)+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n)=>{if(n){let{right:t,left:n}=this.getNodeBoundaries(e,"h"),r=t-n,i=e.left-n-(r-e.width)/2;this.updateChildren(e.children,"left",i)}},!0)}updateBrothersLeft(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{e.hasCustomPosition()||n<=r||(e.left+=t,e.children&&e.children.length&&this.updateChildren(e.children,"left",t))}),this.updateBrothersLeft(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=e.children.length,c=this.getMarginX(e.layerIndex+1);if(e.isRoot){let s=r+o/2,u=i+a,h=.7*c,d=1/0,f=-1/0;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=e.top;if&&(f=i);let a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",s=`M ${i},${u+h} L ${i},${u+h>o?o+e.height:o}`+a;t[r].plot(s),n&&n(t[r],e)}),d=Math.min(d,s),f=Math.max(f,s);let p=this.lineDraw.path();if(e.style.line(p),p.plot(`M ${s},${u} L ${s},${u+h}`),e._lines.push(p),n&&n(p,e),l>0){let t=this.lineDraw.path();e.style.line(t),t.plot(`M ${d},${u+h} L ${f},${u+h}`),e._lines.push(t),n&&n(t,e)}}else{let r=i+a,o=-1/0,c=e.left+.3*e.width;if(e.children.forEach((a,s)=>{let l=a.top+a.height/2;l>o&&(o=l);let u="",h=a.left,d=a.left+a.widthc&&(f=!0,l=a.top,o=l),l>i&&l0){let t=this.lineDraw.path();s=l>0?s:0,e.style.line(t),o{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}var mh=ph;class gh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):i.top=t._node.top+t._node.height+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaWidth=i?e._node.children.reduce((e,t)=>e+t.width,0)+(i+1)*this.getMarginY(r+1):0;let o=e._node.checkHasGeneralization()?e._node._generalizationNodeWidth+this.getMarginY(r+1):0;e._node.childrenAreaWidth2=Math.max(e._node.childrenAreaWidth,o)},!0,0)}computedLeftValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.left+e.width/2-e.childrenAreaWidth/2,i=n+t;e.children.forEach(e=>{e.left=i,i+=e.width+t})}},null,!0)}adjustLeftValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=e.childrenAreaWidth2-2*this.getMarginY(r+1)-e.width;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;nr&&(i=t),e.left+=i,e.children&&e.children.length&&this.updateChildren(e.children,"left",i)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a}=e,s=r+o/2,l=i+a;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=e.top,a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",c=`M ${s},${l} L ${i},${o}`+a;t[r].plot(c),n&&n(t[r],e)})}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s,isRoot:l}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let c=r+o/2,u=i+a,h=this.getMarginX(e.layerIndex+1),d=.7*h,f=1/0,p=-1/0,m=e.children.length;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=u+d>e.top?e.top+e.height:e.top;ip&&(p=i);let a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",s=`M ${i},${u+d} L ${i},${o}`+a;t[r].plot(s),n&&n(t[r],e)}),f=Math.min(c,f),p=Math.max(c,p);let g=this.lineDraw.path();if(e.style.line(g),s=m>0&&!l?s:0,g.plot(`M ${c},${u+s} L ${c},${u+d}`),e._lines.push(g),n&&n(g,e),m>0){let t=this.lineDraw.path();e.style.line(t),t.plot(`M ${f},${u+d} L ${p},${u+d}`),e._lines.push(t),n&&n(t,e)}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:o,translateY:a}=t.transform();t.translate(n/2-i/2-o,r+i/2-a)}renderGeneralization(e){e.forEach(e=>{let{bottom:t,left:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"v"),a=n,s=t+i,l=r,c=t+i,u=a+(l-a)/2,h=s+20,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.top=t+o,e.generalizationNode.left=n+(r-n-e.generalizationNode.width)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}var vh=gh;class bh extends ch{constructor(e={},t){super(e),this.layout=t}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(this.layout===oo["a"].LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.BOTTOM:oo["a"].LAYOUT_GROW_DIR.TOP:o.dir="",t._node.isRoot&&(o.top=t._node.top+(e._node.height>t._node.height?-(e._node.height-t._node.height)/2:(t._node.height-e._node.height)/2))),!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r,i)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width,r=n+t;e.children.forEach(e=>{e.left=r,r+=e.width+t})}else{let t=e.top+e.height+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+.5*e.width,n.top=t,t+=n.height+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;e.isRoot&&this.updateBrothersLeft(e);let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n,r)=>{t&&t.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP&&e.children.forEach(t=>{let n=this.getNodeAreaHeight(t),r=t.top;t.top=e.top-(t.top-e.top)-n+e.height,this.updateChildren(t.children,"top",t.top-r)})},!0)}getNodeAreaHeight(e){let t=0,n=e=>{t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+this.getMarginY(e.layerIndex),e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h"),i=r-t,o=i-e.width;o>0&&(n+=o)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=e.children.length;if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.left+r.width,s=i.left,l=e.top+e.height/2,c=`M ${a},${l} L ${s},${l}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let r=-1/0,o=1/0,c=e.left+.3*e.width;if(e.children.forEach((e,i)=>{let a=e.top+e.height/2;a>r&&(r=a),a0){let t=this.lineDraw.path();s=l>0?s:0,e.parent&&e.parent.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP?t.plot(`M ${c},${i} L ${c},${o}`):t.plot(`M ${c},${i+a+s} L ${c},${r}`),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform();e.parent&&e.parent.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP?t.translate(.3*n-i/2-o,-i/2-a):t.translate(.3*n-i/2-o,r+i/2-a)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){if(this.layout===oo["a"].LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let o="";o=i.dir===oo["a"].LAYOUT_GROW_DIR.TOP&&1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM,o===oo["a"].LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}var yh=bh;class wh extends ch{constructor(e={},t){super(e),this.layout=t}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.RIGHT:oo["a"].LAYOUT_GROW_DIR.LEFT,t._node.isRoot?o.left=t._node.left+(e._node.width>t._node.width?-(e._node.width-t._node.width)/2:(t._node.width-e._node.width)/2):o.left=o.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(n)return;let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r,i)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1);if(n){let n=e.top+e.height,r=n+t;e.children.forEach(e=>{e.top=r,r+=e.height+t})}else{let t=this.getMarginY(r+1),n=e.top+e.height/2+t,i=n-e.childrenAreaHeight/2;e.children.forEach(e=>{e.top=i,i+=e.height+t})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(n)return;let i=2*this.getMarginY(r+1)+e.height,o=e.childrenAreaHeight-i;o>0&&this.updateBrothers(e,o/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((n,i)=>{if(n.hasCustomPosition())return;if(!e.parent.isRoot&&n.uid===e.uid)return;let o=0;e.parent.isRoot?o=ir?2*t:t:ir&&(o=t),n.top+=o,n.children&&n.children.length&&this.updateChildren(n.children,"top",o)}),this.updateBrothers(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{expandBtnSize:r}=e;if(this.mindMap.opt.alwaysShowExpandBtn||(r=0),e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else if(e.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT){let i=e.left+e.width,o=e.top+e.height/2,a=this.getMarginX(e.layerIndex+1),s=.6*(a-r);e.children.forEach((e,r)=>{let a=e.left,l=e.top+e.height/2,c=`\n M ${i},${o} \n L ${i+s},${o} \n L ${i+s},${l} \n L ${a},${l}`;t[r].plot(c),n&&n(t[r],e)})}else{let i=e.left,o=e.top+e.height/2,a=this.getMarginX(e.layerIndex+1),s=.6*(a-r);e.children.forEach((e,r)=>{let a=e.left+e.width,l=e.top+e.height/2,c=`\n M ${i},${o} \n L ${i-s},${o} \n L ${i-s},${l} \n L ${a},${l}`;t[r].plot(c),n&&n(t[r],e)})}}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0),e.children.forEach((l,c)=>{if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let e=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,u=i+a/2,h=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,d=l.top+l.height/2,f=`M ${e},${u} L ${h},${d}`;t[c].plot(f),n&&n(t[c],l)}})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0),e.children.forEach((l,c)=>{if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let e=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,u=i+a/2,h=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,d=l.top+l.height/2,f=this.cubicBezierPath(e,u,h,d);t[c].plot(f),n&&n(t[c],l)}})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform();e.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t.translate(n-o,r/2-a):t.translate(-i-o,r/2-a)}}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===oo["a"].LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:o,generalizationLineMargin:a,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,"h"),l=t?i-a:o+a,c=l,u=n,h=l,d=r,f=c+(t?-20:20),p=u+(d-u)/2,m=`M ${c},${u} Q ${f},${p} ${h},${d}`;e.generalizationLine.plot(m),e.generalizationNode.left=l+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}var xh=wh,kh={top:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:o,height:a}){e.parent&&e.parent.isRoot?t.translate(.3*o-n/2-r,-n/2-i):t.translate(.3*o-n/2-r,a+n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:o,expandBtnSize:a,maxy:s,ctx:l}){e.parent&&e.parent.isRoot?t.plot(`M ${r},${n} L ${r+i},${n-Math.tan(Object(v["o"])(l.mindMap.opt.fishboneDeg))*i}`):t.plot(`M ${r},${n+o+a} L ${r},${s}`)},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){if(e>=1&&t.children){let r=n.getMarginY(e+1),i=t.left+t.width*n.childIndent,o=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(e=>{e.left=i,e.top+=o,o+=e.height+(n.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,parent:t,ctx:n,layerIndex:r}){let i=e.children.length,o=n.getMarginY(r+1);if(t&&!t.isRoot&&i>0){let t=e.children.reduce((e,t)=>e+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+o,0);n.updateBrothersTop(e,t)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=t.expandBtnSize+e;t.children.forEach(e=>{let i=n.getNodeAreaHeight(e),o=e.top,a=e.left;e.top=t.top-(e.top-t.top)-i+t.height,e.left=t.left+t.width*n.indent+(i+r)/Math.tan(Object(v["o"])(n.mindMap.opt.fishboneDeg)),r+=i,n.updateChildrenPro(e.children,{top:e.top-o,left:e.left-a})})}}},bottom:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:o,height:a}){e.parent&&e.parent.isRoot?t.translate(.3*o-n/2-r,a+n/2-i):t.translate(.3*o-n/2-r,-n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:o,miny:a,ctx:s}){e.parent&&e.parent.isRoot?t.plot(`M ${r},${n+o} L ${r+i},${n+o+Math.tan(Object(v["o"])(s.mindMap.opt.fishboneDeg))*i}`):t.plot(`M ${r},${n} L ${r},${a}`)},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){let r=n.getMarginY(e+1);if(1===e&&t.children){let e=t.left+t.width*n.childIndent,i=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(t=>{t.left=e,t.top=i+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),i+=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}if(e>1&&t.children){let e=t.left+t.width*n.childIndent,i=t.top-(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)-r;t.children.forEach(t=>{t.left=e,t.top=i-t.height,i-=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,ctx:t,layerIndex:n}){let r=t.getMarginY(n+1),i=e.children.length;if(n>2&&i>0){let n=e.children.reduce((e,n)=>e+n.height+(t.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)+r,0);t.updateBrothersTop(e,-n)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=0,i=t.expandBtnSize;t.children.forEach(o=>{let a=n.getNodeActChildrenLength(o)>0,s=n.getNodeAreaHeight(o),l=a?s-o.height-(a?o.expandBtnSize:0):0;l-=a?e:0;let c=r+l,u=o.left;o.top+=c,o.left=t.left+t.width*n.indent+(s+i)/Math.tan(Object(v["o"])(n.mindMap.opt.fishboneDeg)),r+=l,i+=s,n.updateChildrenPro(o.children,{top:c,left:o.left-u})})}}}};class Ah extends ch{constructor(e={}){super(e),this.indent=.3,this.childIndent=.5}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n)this.setNodeCenter(o);else if(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM,t._node.isRoot){let e=this.getMarginY(r);this.checkIsTop(o)?o.top=t._node.top-o.height-e:o.top=t._node.top+t._node.height+e}if(!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.isRoot){let t=this.getMarginX(r+1),n=e.left+e.width+e.height+t,i=e.left+e.width+e.height+t;e.children.forEach(e=>{this.checkIsTop(e)?(e.left=n,n+=e.width+t):(e.left=i+20,i+=e.width+t)})}let i={layerIndex:r,node:e,ctx:this};this.checkIsTop(e)?kh.top.computedLeftTopValue(i):kh.bottom.computedLeftTopValue(i)},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i={node:e,parent:t,layerIndex:r,ctx:this};this.checkIsTop(e)?kh.top.adjustLeftTopValueBefore(i):kh.bottom.adjustLeftTopValueBefore(i)},(e,t)=>{let n={parent:t,node:e,ctx:this};if(this.checkIsTop(e)?kh.top.adjustLeftTopValueAfter(n):kh.bottom.adjustLeftTopValueAfter(n),e.isRoot){let t=0,n=0;e.children.forEach(e=>{if(this.checkIsTop(e)){e.left+=t,this.updateChildren(e.children,"left",t);let{left:n,right:r}=this.getNodeBoundaries(e,"h");t+=r-n}else{e.left+=n,this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h");n+=r-t}})}},!0)}getNodeAreaHeight(e){let t=0,n=e=>{let r=this.getMarginY(e.layerIndex);t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r,e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h"),i=r-t,o=i-e.width;o>0&&(n+=o)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.checkIsTop(e)?this.updateBrothersTop(e.parent,t):this.updateBrothersTop(e.parent,3===e.layerIndex?0:t)}}checkIsTop(e){return e.dir===oo["a"].LAYOUT_GROW_DIR.TOP}renderLine(e,t,n){if(1!==e.layerIndex&&e.children.length<=0)return[];let{top:r,height:i,expandBtnSize:o}=e;this.mindMap.opt.alwaysShowExpandBtn||(o=0);let a=e.children.length;if(e.isRoot){let t=-1/0;e.children.forEach(r=>{r.left>t&&(t=r.left);let i=this.getMarginY(r.layerIndex),o=r.left,a=e.height/2+i,s=a/Math.tan(Object(v["o"])(this.mindMap.opt.fishboneDeg)),l=this.lineDraw.path();this.checkIsTop(r)?l.plot(`M ${o-s},${r.top+r.height+a} L ${r.left},${r.top+r.height}`):l.plot(`M ${o-s},${r.top-a} L ${o},${r.top}`),e.style.line(l),e._lines.push(l),n&&n(l,e)});let r=e.top+e.height/2,i=e.height/2+this.getMarginY(e.layerIndex+1),o=this.lineDraw.path();o.plot(`M ${e.left+e.width},${r} L ${t-i/Math.tan(Object(v["o"])(this.mindMap.opt.fishboneDeg))},${r}`),e.style.line(o),e._lines.push(o),n&&n(o,e)}else{let s=-1/0,l=1/0,c=-1/0,u=e.left+e.width*this.indent;if(e.children.forEach((r,i)=>{r.left>c&&(c=r.left);let o=r.top+r.height/2;if(o>s&&(s=o),o1){let e=`M ${u},${o} L ${r.left},${o}`;t[i].plot(e),n&&n(t[i],r)}}),a>=0){let t=this.lineDraw.path();o=a>0?o:0;let h=c-e.left-e.width*this.indent;h=Math.max(h,0);let d={node:e,line:t,top:r,x:u,lineLength:h,height:i,expandBtnSize:o,maxy:s,miny:l,ctx:this};this.checkIsTop(e)?kh.top.renderLine(d):kh.bottom.renderLine(d),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform(),s={node:e,btn:t,expandBtnSize:i,translateX:o,translateY:a,width:n,height:r};this.checkIsTop(e)?kh.top.renderExpandBtn(s):kh.bottom.renderExpandBtn(s)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){let o="";o=i.dir===oo["a"].LAYOUT_GROW_DIR.TOP?1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM:1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.BOTTOM:oo["a"].LAYOUT_GROW_DIR.TOP,o===oo["a"].LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}var Ch=Ah;class Eh{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(e,t,n)=>{this.show({node:e,e:t,isInserting:n})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_click",()=>{this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox()}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===oo["a"].MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){const t=this.mindMap.renderer.activeNodeList;if(t.length<=0||t.length>1)return;const n=t[0];n&&this.checkIsAutoEnterTextEditKey(e)&&this.show({node:n,e:e,isInserting:!1,isFromKeyDown:!0})}checkIsAutoEnterTextEditKey(e){const t=e.keyCode;return(229===t||t>=65&&t<=90||t>=48&&t<=57)&&!this.mindMap.keyCommand.hasCombinationKey(e)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}async show({node:e,isInserting:t=!1,isFromKeyDown:n=!1,isFromScale:r=!1}){if(e.isUseCustomNodeContent())return;const{beforeTextEdit:i}=this.mindMap.opt;if("function"===typeof i){let n=!1;try{n=await i(e,t)}catch(c){n=!1,this.mindMap.opt.errorHandler(oo["b"].BEFORE_TEXT_EDIT_ERROR,c)}if(!n)return}this.currentNode=e;const{offsetLeft:o,offsetTop:a}=Object(v["i"])(this.mindMap,e);this.mindMap.view.translateXY(o,a);const s=e._textData.node.node.getBoundingClientRect(),l={node:e,rect:s,isInserting:t,isFromKeyDown:n,isFromScale:r};this.mindMap.richText?this.mindMap.richText.showEditText(l):this.showEditTextBox(l)}onScale(){this.currentNode&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.showTextEdit=!1),this.show({node:this.currentNode,isFromScale:!0}))}showEditTextBox({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:i}){if(this.showTextEdit)return;const{nodeTextEditZIndex:o,textAutoWrapWidth:a,selectTextOnEnterEditText:s}=this.mindMap.opt;if(i||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.style.cssText="position:fixed;box-sizing: border-box;background-color:#fff;box-shadow: 0 0 20px rgba(0,0,0,.5);padding: 3px 5px;margin-left: -5px;margin-top: -3px;outline: none; word-break: break-all;",this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("click",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("mousedown",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("keydown",e=>{this.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()});const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.textEditNode)}let l=this.mindMap.view.scale,c=e.style.merge("lineHeight"),u=e.style.merge("fontSize"),h=(this.cacheEditingText||e.getData("text")).split(/\n/gim).map(e=>Object(v["E"])(e)),d="true"===e._textData.node.attr("data-ismultiLine");e.style.domText(this.textEditNode,l,d),this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=h.join("
"),this.textEditNode.style.minWidth=t.width+10+"px",this.textEditNode.style.minHeight=t.height+6+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=a*l+"px",d&&1!==c&&(this.textEditNode.style.transform=`translateY(${-(c*u-u)/2*l}px)`),this.showTextEdit=!0,n||s&&!r?Object(v["Y"])(this.textEditNode):Object(v["q"])(this.textEditNode),this.cacheEditingText=""}getEditText(){return Object(v["y"])(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.currentNode=null,this.mindMap.richText)return this.mindMap.richText.hideEditText();this.showTextEdit&&(this.renderer.activeNodeList.forEach(e=>{let t=this.getEditText();this.mindMap.execCommand("SET_NODE_TEXT",e,t),e.isGeneralization&&e.generalizationBelongNode.updateGeneralization(),this.mindMap.render()}),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList),this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.showTextEdit=!1)}}var Sh={paddingX:15,paddingY:5,imgMaxWidth:100,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineStyle:"straight",rootLineKeepSameInCurve:!0,generalizationLineWidth:1,generalizationLineColor:"#549688",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",lineHeight:1.5,borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none"}};const Th=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve"],Nh=e=>{let t=Object.keys(e);for(let n=0;ne===t[n]))return!1;return!0},Mh=["lineColor","lineDasharray","lineWidth"],Lh={[oo["a"].LAYOUT.LOGICAL_STRUCTURE]:hh,[oo["a"].LAYOUT.MIND_MAP]:fh,[oo["a"].LAYOUT.CATALOG_ORGANIZATION]:mh,[oo["a"].LAYOUT.ORGANIZATION_STRUCTURE]:vh,[oo["a"].LAYOUT.TIMELINE]:yh,[oo["a"].LAYOUT.TIMELINE2]:yh,[oo["a"].LAYOUT.VERTICAL_TIMELINE]:xh,[oo["a"].LAYOUT.FISHBONE]:Ch};class Oh{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=po()({},this.mindMap.opt.data||{}),this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.waitRenderingParams=[],this.nodeCache={},this.lastNodeCache={},this.renderSource="",this.activeNodeList=[],this.root=null,this.textEdit=new Eh(this),this.lastBeingCopyData=null,this.beingCopyData=null,this.beingPasteText="",this.beingPasteImgSize=0,this.currentBeingPasteType="",this.highlightBoxNode=null,this.lastActiveNode=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout=new(Lh[this.mindMap.opt.layout]?Lh[this.mindMap.opt.layout]:Lh[oo["a"].LAYOUT.LOGICAL_STRUCTURE])(this,this.mindMap.opt.layout)}setData(e){this.mindMap.richText?this.renderTree=this.mindMap.richText.handleSetData(e):this.renderTree=e}bindEvent(){this.mindMap.on("draw_click",e=>{this.clearActiveNodeListOnDrawClick(e,"click")}),this.mindMap.on("contextmenu",e=>{this.clearActiveNodeListOnDrawClick(e,"contextmenu")}),this.mindMap.svg.on("dblclick",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()})}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.textEdit.showTextEdit||this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT",this.resetLayout)}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.onPaste()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(e=null,t=[...this.activeNodeList]){let n=!1;n=this.lastActiveNode!==e,n||(n=!Object(v["h"])(this.lastActiveNodeList,t)),n&&(this.lastActiveNode=e,this.lastActiveNodeList=[...t],this.mindMap.batchExecution.push("emitNodeActiveEvent",()=>{this.mindMap.emit("node_active",e,t)}))}clearActiveNodeListOnDrawClick(e,t){if(this.activeNodeList.length<=0)return;let n=!0;const{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if("contextmenu"===t?!r:r){const t=this.mindMap.event.mousedownPos;n=Math.abs(e.clientX-t.x)<=5&&Math.abs(e.clientY-t.y)<=5}n&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}render(e=(()=>{}),t){if(this.isRendering)return this.hasWaitRendering=!0,void(this.waitRenderingParams=[e,t]);this.isRendering=!0,this.renderSource=t,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),this.layout.doLayout(n=>{Object.keys(this.lastNodeCache).forEach(e=>{this.nodeCache[e]||(this.removeNodeFromActiveList(this.lastNodeCache[e]),this.emitNodeActiveEvent(),this.lastNodeCache[e].destroy())}),this.root=n,this.root.render(()=>{if(this.isRendering=!1,this.mindMap.emit("node_tree_render_end"),e&&e(),this.hasWaitRendering){const e=this.waitRenderingParams;this.hasWaitRendering=!1,this.waitRenderingParams=[],this.render(...e)}else this.mindMap.richText&&[oo["a"].CHANGE_THEME,oo["a"].SET_DATA].includes(t)&&this.mindMap.command.addHistory()})}),this.emitNodeActiveEvent()}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}),this.activeNodeList=[]}addNodeToActiveList(e){const t=this.findActiveNodeIndex(e);-1===t&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!0),this.activeNodeList.push(e))}removeNodeFromActiveList(e){let t=this.findActiveNodeIndex(e);-1!==t&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),this.activeNodeList.splice(t,1))}findActiveNodeIndex(e){return Object(v["w"])(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Object(v["db"])(this.root,null,e=>{e.getData("isActive")||this.addNodeToActiveList(e)},null,!0,0,0),this.emitNodeActiveEvent())}back(e){this.backForward("back",e)}forward(e){this.backForward("forward",e)}backForward(e,t){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const n=this.mindMap.command[e](t);n&&(this.renderTree=n,this.mindMap.render())}getNewNodeBehavior(e=!1,t=!1){const{createNewNodeBehavior:n}=this.mindMap.opt;let r=!1,i=!1;switch(n){case oo["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,i=!t&&e;break;case oo["a"].CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,i=!1;break;case oo["a"].CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:r=!0,i=!1;break;default:break}return{focusNewNode:r,inserting:i}}insertNode(e=!0,t=[],n=null,r=[]){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,s=a.length>1,l=!!this.mindMap.richText,{focusNewNode:c,inserting:u}=this.getNewNodeBehavior(e,s),h={expand:!0,richText:l,resetRichText:l,isActive:c};r=Object(v["a"])(r,{...h}),a.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const t=e.parent,a=1===e.layerIndex,s=a?i:o,l=Object(v["v"])(e),c={inserting:u,data:{text:s,...h,uid:Object(v["m"])(),...n||{}},children:[...Object(v["n"])(r,!0)]};t.nodeData.children.splice(l+1,0,c)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0)return;if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=!!this.mindMap.richText,{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:r,resetRichText:r,isActive:i};t=Object(v["a"])(t,o),n.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const n=e.parent,r=Object(v["v"])(e),i=Object(v["n"])(Object(v["ab"])(t),!0);n.nodeData.children.splice(r+1,0,...i)}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(e=!0,t=[],n=null,r=[]){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,s=a.length>1,l=!!this.mindMap.richText,{focusNewNode:c,inserting:u}=this.getNewNodeBehavior(e,s),h={expand:!0,richText:l,resetRichText:l,isActive:c};r=Object(v["a"])(r,{...h}),a.forEach(e=>{if(e.isGeneralization)return;e.nodeData.children||(e.nodeData.children=[]);const t=e.isRoot?i:o,a={inserting:u,data:{text:t,uid:Object(v["m"])(),...h,...n||{}},children:[...Object(v["n"])(r,!0)]};e.nodeData.children.push(a),e.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0)return;if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=!!this.mindMap.richText,{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:r,resetRichText:r,isActive:i};t=Object(v["a"])(t,o),n.forEach(e=>{e.isGeneralization||(e.nodeData.children||(e.nodeData.children=[]),t=Object(v["n"])(t,!0),e.nodeData.children.push(...t),e.setData({expand:!0}))}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(e=!0,t,n){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:r,defaultInsertBelowSecondLevelNodeText:i}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,a=o.length>1,s=!!this.mindMap.richText,{focusNewNode:l,inserting:c}=this.getNewNodeBehavior(e,a),u={expand:!0,richText:s,resetRichText:s,isActive:l};o.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const t=1===e.layerIndex?r:i,o={inserting:c,data:{text:t,uid:Object(v["m"])(),...u,...n||{}},children:[e.nodeData]},a=e.parent,s=Object(v["v"])(e);a.nodeData.children.splice(s,1,o)}),l&&this.clearActiveNodeList(),this.mindMap.render()}upNode(){if(this.activeNodeList.length<=0)return;let e=this.activeNodeList[0];if(e.isRoot)return;let t=e.parent,n=t.children,r=Object(v["w"])(e,n);if(-1===r||0===r)return;let i=r-1;n.splice(r,1),n.splice(i,0,e),t.nodeData.children.splice(r,1),t.nodeData.children.splice(i,0,e.nodeData),this.mindMap.render()}downNode(){if(this.activeNodeList.length<=0)return;let e=this.activeNodeList[0];if(e.isRoot)return;let t=e.parent,n=t.children,r=Object(v["w"])(e,n);if(-1===r||r===n.length-1)return;let i=r+1;n.splice(r,1),n.splice(i,0,e),t.nodeData.children.splice(r,1),t.nodeData.children.splice(i,0,e.nodeData),this.mindMap.render()}copy(){this.beingCopyData=this.copyNode(),Object(v["Z"])({simpleMindMap:!0,data:this.beingCopyData})}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,Object(v["Z"])({simpleMindMap:!0,data:e})})}paste(){this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}async onPaste(){const{errorHandler:e,handleIsSplitByWrapOnPasteCreateNewNode:t}=this.mindMap.opt;let n=null,r=null;try{const e=await Object(v["t"])();n=e.text,r=e.img}catch(o){e(oo["b"].READ_CLIPBOARD_ERROR,o)}const i=r?r.size:0;if(this.beingPasteText===n&&this.beingPasteImgSize===i||(this.currentBeingPasteType=oo["a"].PASTE_TYPE.CLIP_BOARD,this.beingPasteText=n,this.beingPasteImgSize=i),this.lastBeingCopyData!==this.beingCopyData&&(this.lastBeingCopyData=this.beingCopyData,this.currentBeingPasteType=oo["a"].PASTE_TYPE.CANVAS),this.currentBeingPasteType===oo["a"].PASTE_TYPE.CLIP_BOARD){if(n){let r=null,i=!0;if(this.mindMap.opt.customHandleClipboardText)try{const e=await this.mindMap.opt.customHandleClipboardText(n);Object(v["I"])(e)||(i=!1,"object"===typeof e&&e.simpleMindMap?r=e.data:n=String(e))}catch(o){e(oo["b"].CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,o)}if(i)try{const e=JSON.parse(n);e&&e.simpleMindMap&&(r=e.data)}catch(o){e(oo["b"].PARSE_PASTE_DATA_ERROR,o)}if(r)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(r)?r:[r]);else{n=Object(v["E"])(n);const e=n.split(new RegExp("\r?\n|(?!!e);e.length>1&&t?t().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e.map(e=>({data:{text:e},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:n})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:n})}}if(r)try{let e=await Object(v["K"])(r);this.activeNodeList.length>0&&this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_IMAGE",t,{url:e.url,title:"",width:e.size.width,height:e.size.height})})}catch(o){e(oo["b"].LOAD_CLIPBOARD_IMAGE_ERROR,o)}}else this.paste()}insertBefore(e,t){this.insertTo(e,t,"before")}insertAfter(e,t){this.insertTo(e,t,"after")}insertTo(e,t,n="before"){let r=Object(v["r"])(e);r=r.filter(e=>!e.isRoot),"after"===n&&r.reverse(),r.forEach(e=>{this.checkNodeLayerChange(e,t);let r=e.parent,i=r.children,o=Object(v["w"])(e,i);if(-1===o)return;i.splice(o,1),r.nodeData.children.splice(o,1);let a=t.parent,s=a.children,l=Object(v["w"])(t,s);-1!==l&&("after"===n&&l++,s.splice(l,0,e),a.nodeData.children.splice(l,0,e.nodeData))}),this.mindMap.render()}checkNodeLayerChange(e,t){if(this.mindMap.richText){let n=1===e.layerIndex&&1!==t.layerIndex||1!==e.layerIndex&&1===t.layerIndex;n&&e.setData({resetRichText:!0})}}removeNode(e=[]){if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=null,n=e.length>0,r=n?e:this.activeNodeList,i=r.find(e=>e.isRoot);if(i)this.clearActiveNodeList(),i.children=[],i.nodeData.children=[];else{t=this.getNextActiveNode();for(let e=0;e0,r=n?e:this.activeNodeList;r=r.filter(e=>!e.isRoot);for(let i=0;i0?n[r-1]:t.parent}return e}copyNode(){if(this.activeNodeList.length<=0)return;const e=Object(v["A"])(this.activeNodeList);return e.map(e=>Object(v["k"])({},e,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;const t=Object(v["A"])(this.activeNodeList).filter(e=>!e.isRoot),n=t.map(e=>Object(v["k"])({},e,!0));t.forEach(e=>{Object(v["S"])(e)}),this.clearActiveNodeList(),this.mindMap.render(),e&&"function"===typeof e&&e(n)}moveNodeTo(e,t){let n=Object(v["r"])(e);n=n.filter(e=>!e.isRoot),n.forEach(e=>{this.checkNodeLayerChange(e,t),this.removeNodeFromActiveList(e),Object(v["S"])(e),t.nodeData.children.push(e.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Object(v["r"])(e),this.activeNodeList.length<=0||e.length<=0||(this.activeNodeList.forEach(t=>{t.nodeData.children.push(...e.map(e=>{const t=Object(v["ab"])(e);return Object(v["n"])([t],!0),t}))}),this.mindMap.render())}setNodeStyle(e,t,n){let r={[t]:n};this.mindMap.richText&&this.mindMap.richText.setNotActiveNodeStyle(e,{[t]:n}),this.setNodeDataRender(e,r),Mh.includes(t)&&(e.parent||e).renderLine(!0)}setNodeStyles(e,t){let n={...t};this.mindMap.richText&&this.mindMap.richText.setNotActiveNodeStyle(e,t),this.setNodeDataRender(e,n);let r=Object.keys(t),i=!1;r.forEach(e=>{Mh.includes(e)&&(i=!0)}),i&&(e.parent||e).renderLine(!0)}setNodeActive(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{isActive:t}),e.updateNodeByActive(t)}setNodeExpand(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{expand:t}),this.mindMap.render()}expandAllNode(){Object(v["db"])(this.renderTree,null,e=>{e.data.expand||(e.data.expand=!0)},null,!0,0,0),this.mindMap.render()}unexpandAllNode(){Object(v["db"])(this.renderTree,null,(e,t,n)=>{!n&&e.children&&e.children.length>0&&(e.data.expand=!1)},null,!0,0,0),this.mindMap.render(()=>{this.mindMap.view.reset()})}expandToLevel(e){Object(v["db"])(this.renderTree,null,(t,n,r,i)=>{const o=i0&&(t.data.expand=!1)},null,!0,0,0),this.mindMap.render()}toggleActiveExpand(){this.activeNodeList.forEach(e=>{e.nodeData.children.length<=0||this.toggleNodeExpand(e)})}toggleNodeExpand(e){this.mindMap.execCommand("SET_NODE_EXPAND",e,!e.getData("expand"))}setNodeText(e,t,n,r){this.setNodeDataRender(e,{text:t,richText:n,resetRichText:r})}setNodeImage(e,t){const{url:n,title:r,width:i,height:o,custom:a=!1}=t||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(e,{image:n,imageTitle:r||"",imageSize:{width:i,height:o,custom:a}})}setNodeIcon(e,t){this.setNodeDataRender(e,{icon:t})}setNodeHyperlink(e,t,n=""){this.setNodeDataRender(e,{hyperlink:t,hyperlinkTitle:n})}setNodeNote(e,t){this.setNodeDataRender(e,{note:t})}setNodeTag(e,t){this.setNodeDataRender(e,{tag:t})}insertFormula(e,t=[]){if(!this.mindMap.richText||!this.mindMap.formula)return;t=Object(v["r"])(t);const n=t.length>0?t:this.activeNodeList;n.forEach(t=>{this.mindMap.formula.insertFormulaToNode(t,e)})}addGeneralization(e){if(this.activeNodeList.length<=0)return;const t=this.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization&&!e.checkHasSelfGeneralization()),n=Object(v["P"])(t);n.forEach(t=>{const n={...e||{text:this.mindMap.opt.defaultGeneralizationText},range:t.range||null};let r=t.node.getData("generalization");r?Array.isArray(r)?r.push(n):r=[r,n]:r=[n],this.mindMap.execCommand("SET_NODE_DATA",t.node,{generalization:r}),t.node.setData({expand:!0})}),this.mindMap.render(()=>{this.mindMap.render()})}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(e=>{e.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(e,t,n){let r=[e]||!1;r.forEach(e=>{this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:t,customTop:n})})}resetLayout(){Object(v["db"])(this.root,null,e=>{e.customLeft=void 0,e.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(e,t){if(!t||!Kc.includes(t))return;let n=[e]||!1;n.forEach(e=>{this.setNodeStyle(e,"shape",t)})}goTargetNode(e,t=(()=>{})){let n="string"===typeof e?e:e.getData("uid");n&&this.expandToNodeUid(n,()=>{let e=this.findNodeByUid(n);e&&(e.active(),this.moveNodeToCenter(e),t())})}setNodeData(e,t){Object.keys(t).forEach(n=>{e.nodeData.data[n]=t[n]})}setNodeDataRender(e,t,n=!1){this.mindMap.execCommand("SET_NODE_DATA",e,t);let r=e.reRender();r?n||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(e){let t=this.mindMap.width/2,n=this.mindMap.height/2,{left:r,top:i,width:o,height:a}=e,s=r+o/2,l=i+a/2,{state:c}=this.mindMap.view.getTransformData(),u=t-c.x,h=n-c.y,d=u-s,f=h-l;this.mindMap.view.translateX(d),this.mindMap.view.translateY(f),this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(e,t=(()=>{})){let n=[];const r={};Object(v["d"])(this.renderTree,(t,i)=>{if(t.data.uid===e)return n=i?[...r[i.data.uid],i]:[],"stop";r[t.data.uid]=i?[...r[i.data.uid],i]:[]});let i=!1;n.forEach(e=>{e.data.expand||(i=!0,e.data.expand=!0)}),i?this.mindMap.render(t):t()}findNodeByUid(e){let t=null;return Object(v["db"])(this.root,null,n=>{if(n.getData("uid")===e)return t=n,!0}),t}highlightNode(e,t){const{highlightNodeBoxStyle:n={}}=this.mindMap.opt;this.highlightBoxNode||(this.highlightBoxNode=(new Zl).stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}));let r=1/0,i=1/0,o=-1/0,a=-1/0;if(t){const n=e.children.slice(t[0],t[1]+1);n.forEach(e=>{e.lefto&&(o=t),n>a&&(a=n)})}else r=e.left,i=e.top,o=e.left+e.width,a=e.top+e.height;this.highlightBoxNode.plot([[r,i],[o,i],[o,a],[r,a]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode.remove()}}var Dh=Oh,Ph=po()(Sh,{lineColor:"#333",backgroundColor:"#d1f6ec",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"#1fb27d"},second:{fillColor:"#fff",color:"#565656",borderColor:"transparent",borderWidth:0},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Ih=po()(Sh,{lineColor:"rgb(115, 161, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(115, 161, 191)"},second:{fillColor:"rgb(238, 243, 246)",color:"#333",borderColor:"rgb(115, 161, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Rh=po()(Sh,{lineColor:"rgb(191, 115, 148)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 148)"},second:{fillColor:"rgb(246, 238, 242)",color:"#333",borderColor:"rgb(191, 115, 148)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Fh=po()(Sh,{lineColor:"rgb(123, 115, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(123, 115, 191)"},second:{fillColor:"rgb(239, 238, 246)",color:"#333",borderColor:"rgb(123, 115, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),zh=po()(Sh,{lineColor:"rgb(191, 115, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 115)"},second:{fillColor:"rgb(246, 238, 238)",color:"#333",borderColor:"rgb(191, 115, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Bh=po()(Sh,{lineColor:"rgb(191, 147, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 147, 115)"},second:{fillColor:"rgb(246, 242, 238)",color:"#333",borderColor:"rgb(191, 147, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),_h=po()(Sh,{lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(58, 65, 68)",backgroundImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=",backgroundRepeat:"repeat",backgroundSize:"auto",root:{fillColor:"rgb(233, 223, 152)",color:"#333",fontSize:24,borderRadius:21},second:{fillColor:"rgb(164, 197, 192)",borderColor:"transparent",color:"#333",fontSize:16,borderRadius:10},node:{fontSize:12,color:"#fff",fontWeight:"bold"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}}),jh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"#fff",root:{fillColor:"rgb(18, 187, 55)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(241, 242, 241)",borderColor:"transparent",color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",borderWidth:2,color:"#1a1a1a"}}),Hh=po()(Sh,{lineColor:"rgb(94, 202, 110)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"#1a1a1a",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(255, 245, 214)",color:"#1a1a1a",fontSize:24,borderRadius:10,borderColor:"rgb(249, 199, 84)",borderWidth:1},second:{fillColor:"rgb(255, 245, 214)",borderColor:"rgb(249, 199, 84)",borderWidth:1,color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"#1a1a1a",color:"#1a1a1a",borderWidth:2}}),Uh=po()(Sh,{lineColor:"rgb(30, 53, 86)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(56, 123, 233)",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(30, 53, 86)",color:"#fff",fontSize:24,borderRadius:10,borderColor:"rgb(189, 197, 201)",borderWidth:2},second:{fillColor:"rgb(169, 218, 218)",borderColor:"rgb(30, 53, 86)",borderWidth:2,color:"#fff",fontSize:18,borderRadius:10},node:{fontSize:14,color:"rgb(30, 53, 86)",borderColor:"rgb(30, 53, 86)",borderWidth:1,marginY:20},generalization:{fillColor:"rgb(56, 123, 233)",borderColor:"rgb(56, 123, 233)",color:"#fff",borderWidth:0}}),qh=po()(Sh,{lineColor:"rgb(17, 68, 23)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#fff",backgroundColor:"rgb(15, 16, 17)",root:{fillColor:"rgb(28, 178, 43)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(55, 56, 58)",color:"rgb(147,148,149)",fontSize:18,borderRadius:10,borderWidth:0},node:{fontSize:14,color:"rgb(147, 148, 149)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}}),Gh=po()(Sh,{lineColor:"rgb(123, 199, 120)",backgroundColor:"rgb(236, 245, 231)",generalizationLineWidth:2,generalizationLineColor:"rgb(123, 199, 120)",root:{fillColor:"rgb(253, 244, 217)",color:"#222"},second:{fillColor:"rgb(253, 244, 217)",color:"#222",borderColor:"rgb(242, 200, 104)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"rgb(123, 199, 120)",borderColor:"transparent",borderWidth:2,color:"#fff"}}),Wh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"rgb(239, 248, 250)",root:{fillColor:"rgb(255, 255, 255)",color:"#222"},second:{fillColor:"rgb(255, 255, 255)",color:"#222",borderColor:"rgb(255, 255, 255)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",color:"#333"}}),Vh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#222",backgroundColor:"rgb(248, 215, 49)",root:{fillColor:"rgb(55, 165, 255)",borderColor:"rgb(51, 51, 51)",borderWidth:3},second:{fillColor:"rgb(255, 160, 36)",color:"#222",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{borderColor:"#222",borderWidth:3,color:"#222"}}),Yh=po()(Sh,{lineColor:"rgb(166, 101, 106)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(255, 208, 211)",root:{fillColor:"rgb(139, 109, 225)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(243, 104, 138)",color:"#fff",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#222"}}),Zh=po()(Sh,{lineColor:"rgb(104, 204, 202)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(90, 206, 241)",backgroundColor:"rgb(239, 255, 255)",root:{fillColor:"rgb(0, 192, 184)",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"#222",borderColor:"rgb(184, 235, 233)",borderWidth:2,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(90, 206, 241)",borderColor:"transparent",color:"#fff"}}),Kh=po()(Sh,{lineColor:"rgb(51, 56, 62)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(127, 93, 64)",backgroundColor:"#fff",root:{fillColor:"rgb(51, 56, 62)",color:"rgb(247, 208, 160)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(239, 209, 176)",color:"rgb(81, 58, 42)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(127, 93, 64)",borderColor:"transparent",color:"rgb(255, 214, 175)"}}),Xh=po()(Sh,{lineColor:"rgb(254, 146, 0)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 222, 69)",backgroundColor:"rgb(255, 246, 243)",root:{fillColor:"rgb(255, 112, 52)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(51, 51, 51)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(255, 222, 69)",borderColor:"transparent",color:"rgb(51, 51, 51)"}}),Jh=po()(Sh,{lineColor:"rgb(40, 193, 84)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(251, 158, 0)",backgroundColor:"rgb(238, 255, 243)",root:{fillColor:"rgb(25, 193, 73)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(69, 149, 96)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"rgb(251, 158, 0)",borderWidth:2,color:"rgb(51, 51, 51)"}}),Qh=po()(Sh,{lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",backgroundColor:"rgb(27, 31, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(204, 204, 204)"},generalization:{fillColor:"transparent",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}}),$h=po()(Sh,{lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(80, 156, 170)",root:{fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(65, 89, 158)"},second:{fillColor:"rgb(251, 227, 188)",color:"rgb(65, 89, 158)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(65, 89, 158)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"rgb(65, 89, 158)"}}),ed=po()(Sh,{lineColor:"rgb(34, 34, 34)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(34, 34, 34)",root:{fillColor:"#fff",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(241, 246, 248)",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(34, 34, 34)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}}),td=po()(Sh,{lineColor:"rgb(113, 195, 169)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(113, 195, 169)",root:{fillColor:"rgb(16, 160, 121)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(240, 252, 249)",color:"rgb(50, 113, 96)",borderColor:"rgb(113, 195, 169)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(10, 59, 43)"},generalization:{fontSize:14,fillColor:"rgb(246, 238, 211)",borderColor:"",borderWidth:0,color:"rgb(173, 91, 12)"}}),nd=po()(Sh,{lineColor:"rgb(173, 123, 91)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(173, 123, 91)",root:{fillColor:"rgb(202, 117, 79)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(245, 231, 216)",color:"rgb(125, 86, 42)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(96, 71, 47)"},generalization:{fontSize:14,fillColor:"rgb(255, 249, 239)",borderColor:"rgb(173, 123, 91)",borderWidth:2,color:"rgb(122, 83, 44)"}}),rd=po()(Sh,{backgroundColor:"rgb(255, 238, 228)",lineColor:"rgb(230, 138, 131)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(222, 101, 85)",root:{fillColor:"rgb(207, 44, 44)",color:"rgb(255, 233, 157)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(255, 255, 255)",color:"rgb(211, 58, 21)",borderColor:"rgb(222, 101, 85)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(144, 71, 43)"},generalization:{fontSize:14,fillColor:"rgb(255, 247, 211)",borderColor:"rgb(255, 202, 162)",borderWidth:2,color:"rgb(187, 101, 69)"}}),id=po()(Sh,{backgroundColor:"rgb(27, 31, 34)",lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(27, 31, 34)",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}}),od=po()(Sh,{backgroundColor:"rgb(32, 37, 49)",lineColor:"rgb(137, 167, 196)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(23, 153, 243)",color:"rgb(255, 255, 255)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(70, 78, 94)",color:"rgb(209, 210, 210)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(255, 119, 34)",borderColor:"",borderWidth:2,color:"#fff"}}),ad=po()(Sh,{backgroundColor:"rgb(18, 20, 20)",lineColor:"rgb(205, 186, 156)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(245, 224, 191)",root:{fillColor:"rgb(255, 208, 124)",color:"rgb(111, 61, 6)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(66, 57, 46)",color:"rgb(225, 201, 158)",borderColor:"rgb(245, 224, 191)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(231, 203, 155)"},generalization:{fontSize:14,fillColor:"rgb(56, 45, 34)",borderColor:"rgb(104, 84, 61)",borderWidth:2,color:"rgb(242, 216, 176)"}}),sd=po()(Sh,{backgroundColor:"#e6f1de",lineColor:"#f5ffad",lineWidth:4,generalizationLineWidth:3,generalizationLineColor:"#749336",root:{fillColor:"#94c143",color:"#fff",borderColor:"#94c143",borderWidth:0,fontSize:24},second:{fillColor:"#cee498",color:"#749336",borderColor:"#aec668",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#749336"},generalization:{fontSize:14,fillColor:"#cee498",borderColor:"#aec668",borderWidth:2,color:"#749336"}}),ld=po()(Sh,{backgroundColor:"#fff2df",lineColor:"#b0bc47",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#b0bc47",root:{fillColor:"#e68112",color:"#fff",borderColor:"#e68112",borderWidth:0,fontSize:24},second:{fillColor:"#ffd683",color:"#8c5416",borderColor:"#b0bc47",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#8c5416"},generalization:{fontSize:14,fillColor:"#ffd683",borderColor:"#b0bc47",borderWidth:2,color:"#8c5416"}}),cd=po()(Sh,{backgroundColor:"#070616",lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",root:{fillColor:"#ff6811",color:"#110501",borderColor:"#ff6811",borderWidth:0,fontSize:24},second:{fillColor:"#070616",color:"#a9a4a9",borderColor:"#ff6811",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#a9a4a9"},generalization:{fontSize:14,fillColor:"",borderColor:"#ff6811",borderWidth:2,color:"#a9a4a9"}}),ud={default:Sh,freshGreen:Ph,blueSky:Ih,brainImpairedPink:Rh,romanticPurple:Fh,freshRed:zh,earthYellow:Bh,classic:_h,classic2:jh,classic3:Hh,classic4:Uh,dark:qh,classicGreen:Gh,classicBlue:Wh,minions:Vh,pinkGrape:Yh,mint:Zh,gold:Kh,vitalityOrange:Xh,greenLeaf:Jh,dark2:Qh,skyGreen:$h,simpleBlack:ed,courseGreen:td,coffee:nd,redSpirit:rd,blackHumour:id,lateNightOffice:od,blackGold:ad,avocado:sd,autumn:ld,orangeJuice:cd};const hd={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let RE=0;RE<=9;RE++)hd[RE]=RE+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((e,t)=>{hd[e]=t+65});const dd=hd;class fd{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.bindEvent()}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){this.shortcutMapCache=this.shortcutMap,this.shortcutMap={}}restore(){this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={}}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.mindMap.richText&&this.mindMap.richText.showTextEdit||this.mindMap.renderer.textEdit.showTextEdit||this.mindMap.associativeLine&&this.mindMap.associativeLine.showTextEdit||(this.isInSvg=!1)}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){this.isPause||this.mindMap.opt.enableShortcutOnlyWhenMouseInSvg&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(t=>{this.checkKey(e,t)&&(this.checkKey(e,"Control+v")||(e.stopPropagation(),e.preventDefault()),this.shortcutMap[t].forEach(e=>{e()}))})}checkKey(e,t){let n=this.getOriginEventCodeArr(e),r=this.getKeyCodeArr(t);if(n.length!==r.length)return!1;for(let i=0;ie===n[i]);if(-1===e)return!1;r.splice(e,1)}return!0}getOriginEventCodeArr(e){let t=[];return(e.ctrlKey||e.metaKey)&&t.push(dd["Control"]),e.altKey&&t.push(dd["Alt"]),e.shiftKey&&t.push(dd["Shift"]),t.includes(e.keyCode)||t.push(e.keyCode),t}hasCombinationKey(e){return e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}getKeyCodeArr(e){let t=e.split(/\s*\+\s*/),n=[];return t.forEach(e=>{n.push(dd[e])}),n}addShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{this.shortcutMap[e]?this.shortcutMap[e].push(t):this.shortcutMap[e]=[t]})}removeShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{if(this.shortcutMap[e])if(t){let n=this.shortcutMap[e].findIndex(e=>e===t);-1!==n&&this.shortcutMap[e].splice(n,1)}else this.shortcutMap[e]=[],delete this.shortcutMap[e]})}getShortcutFn(e){let t=[];return e.split(/\s*\|\s*/).forEach(e=>{t=this.shortcutMap[e]||[]}),t}}class pd{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.addHistory=Object(v["cb"])(this.addHistory,this.mindMap.opt.addHistoryTime,this)}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(e,...t){if(this.commands[e]){if(this.commands[e].forEach(e=>{e(...t)}),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(e))return;this.addHistory()}}add(e,t){this.commands[e]?this.commands[e].push(t):this.commands[e]=[t]}remove(e,t){if(this.commands[e])if(t){let n=this.commands[e].find(e=>e===t);-1!==n&&this.commands[e].splice(n,1)}else this.commands[e]=[],delete this.commands[e]}addHistory(){if(this.mindMap.opt.readonly)return;let e=this.getCopyData();this.history.length>0&&JSON.stringify(this.history[this.history.length-1])===JSON.stringify(e)||(this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(Object(v["ab"])(e)),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",e),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length))}back(e=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-e>=0){this.activeHistoryIndex-=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);let t=Object(v["ab"])(this.history[this.activeHistoryIndex]);return this.mindMap.emit("data_change",t),t}}forward(e=1){if(this.mindMap.opt.readonly)return;let t=this.history.length;if(this.activeHistoryIndex+e<=t-1){this.activeHistoryIndex+=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);let t=Object(v["ab"])(this.history[this.activeHistoryIndex]);return this.mindMap.emit("data_change",t),t}}getCopyData(){return Object(v["l"])({},this.mindMap.renderer.renderTree,!0)}removeDataUid(e){e=Object(v["ab"])(e);let t=e=>{delete e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};return t(e),e}}var md=pd;class gd{constructor(){this.has={},this.queue=[],this.nextTick=Object(v["N"])(this.flush,this)}push(e,t){this.has[e]?this.replaceTask(e,t):(this.has[e]=!0,this.queue.push({name:e,fn:t}),this.nextTick())}replaceTask(e,t){const n=this.queue.findIndex(t=>t.name===e);-1!==n&&(this.queue[n]={name:e,fn:t})}flush(){let e=this.queue.slice(0);this.queue=[],e.forEach(({name:e,fn:t})=>{this.has[e]=!1,t()})}}var vd=gd;const bd={readonly:!1,layout:oo["a"].LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,selectTranslateStep:3,selectTranslateLimit:20,customNoteContentShow:null,enableFreeDrag:!1,watermarkConfig:{text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14}},textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:oo["a"].MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:e=>e,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,initRootNodePosition:null,exportPaddingX:10,exportPaddingY:10,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:1e3,alwaysShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,defaultAssociativeLineText:"关联",fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,nodeDragPlaceholderMaxSize:20,enableAutoEnterTextEditWhenKeydown:!1,richTextEditFakeInPlace:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,disableTouchZoom:!1,errorHandler:(e,t)=>{console.error(e,t)},resetCss:"\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n ",enableDblclickBackToRootNode:!1,minExportImgCanvasScale:2,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,autoMoveWhenMouseInEdgeOnDrag:!0,fit:!1,dragMultiNodeRectConfig:{width:40,height:20,fill:""},dragPlaceholderRectFill:"",dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},associativeLineIsAlwaysAboveNode:!0,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,highlightNodeBoxStyle:{stroke:"rgb(94, 200, 248)",fill:"transparent"},createNewNodeBehavior:oo["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT};class yd{constructor(e={}){if(this.opt=this.handleOpt(po()(bd,e)),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.cssEl=null,this.addCss(),this.initContainer(),this.initTheme(),this.initCache(),this.event=new ho({mindMap:this}),this.keyCommand=new fd({mindMap:this}),this.command=new md({mindMap:this}),this.renderer=new Dh({mindMap:this}),this.view=new so({mindMap:this}),this.batchExecution=new vd,yd.pluginList.forEach(e=>{this.initPlugin(e)}),this.render(this.opt.fit?()=>this.view.fit():()=>{}),setTimeout(()=>{this.command.addHistory()},0)}handleOpt(e){return e.data=Object(v["ab"])(e.data||{}),oo["h"].includes(e.layout)||(e.layout=oo["a"].LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&ud[e.theme]?e.theme:"default",e}initContainer(){const{associativeLineIsAlwaysAboveNode:e}=this.opt,t=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=Yc().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),e||t(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),e&&t(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=oo["e"],document.head.appendChild(this.cssEl)}removeCss(){document.head.removeChild(this.cssEl)}render(e,t=""){this.batchExecution.push("render",()=>{this.initTheme(),this.renderer.reRender=!1,this.renderer.render(e,t)})}reRender(e,t=""){this.batchExecution.push("render",()=>{this.clearDraw(),this.initTheme(),this.renderer.reRender=!0,this.renderer.render(e,t)})}getElRectInfo(){if(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0)throw new Error("容器元素el的宽高不能为0")}resize(){this.getElRectInfo(),this.svg.size(this.width,this.height),this.emit("resize")}on(e,t){this.event.on(e,t)}emit(e,...t){this.event.emit(e,...t)}off(e,t){this.event.off(e,t)}initCache(){Object.keys(oo["d"]).forEach(e=>{let t=Object(v["B"])(oo["d"][e]),n="";switch(t){case"Boolean":n=!1;break;default:n=null;break}oo["d"][e]=n})}initTheme(){this.themeConfig=po()(ud[this.opt.theme],this.opt.themeConfig),bo.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=e,t||this.render(null,oo["a"].CHANGE_THEME),this.emit("view_theme_change",e)}getTheme(){return this.opt.theme}setThemeConfig(e,t=!1){const n=Object(v["x"])(this.themeConfig,e);if(this.opt.themeConfig=e,!t){let e=Nh(n);this.render(null,e?"":oo["a"].CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(e){return void 0===e?this.themeConfig:this.themeConfig[e]}getConfig(e){return void 0===e?this.opt:this.opt[e]}updateConfig(e={}){this.opt=this.handleOpt(po.a.all([bd,this.opt,e]))}getLayout(){return this.opt.layout}setLayout(e,t=!1){oo["h"].includes(e)||(e=oo["a"].LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,oo["a"].CHANGE_LAYOUT)}execCommand(...e){this.command.exec(...e)}setData(e){e=Object(v["ab"])(e||{}),this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(e),this.reRender(()=>{},oo["a"].SET_DATA),this.emit("set_data",e)}setFullData(e){e.root&&this.setData(e.root),e.layout&&this.setLayout(e.layout),e.theme&&(e.theme.template&&this.setTheme(e.theme.template),e.theme.config&&this.setThemeConfig(e.theme.config)),e.view&&this.view.setTransformData(e.view)}getData(e){let t=this.command.getCopyData(),n={};return n=e?{layout:this.getLayout(),root:t,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:t,Object(v["ab"])(n)}async export(...e){try{let t=await this.doExport.export(...e);return t}catch(t){this.opt.errorHandler(oo["b"].EXPORT_ERROR,t)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){[oo["a"].MODE.READONLY,oo["a"].MODE.EDIT].includes(e)&&(this.opt.readonly=e===oo["a"].MODE.READONLY,this.opt.readonly&&this.execCommand("CLEAR_ACTIVE_NODE"),this.emit("mode_change",e))}getSvgData({paddingX:e=0,paddingY:t=0,ignoreWatermark:n=!1}={}){const r=this.svg,i=this.draw,o=r.width(),a=r.height(),s=i.transform(),l=this.elRect;i.scale(1/s.scaleX,1/s.scaleY);const c=i.rbox();c.width+=2*e,c.height+=2*t,i.translate(e,t),r.size(c.width,c.height),i.translate(-c.x+l.left,-c.y+l.top);let u=r.clone();!n&&(c.width>o||c.height>a)&&this.watermark&&this.watermark.hasWatermark()&&(this.width=c.width,this.height=c.height,this.watermark.draw(),u=r.clone(),this.width=o,this.height=a,this.watermark.draw()),u.add(Yc(``));const h=r.find("marker");if(h&&h.length>0){const e=h[0].attr("id");u.find("marker").forEach(t=>{t.attr("id",e)})}return r.size(o,a),i.transform(s),{svg:u,svgHTML:u.svg(),rect:{...c,ratio:c.width/c.height},origWidth:o,origHeight:a,scaleX:s.scaleX,scaleY:s.scaleY}}addPlugin(e,t){let n=yd.hasPlugin(e);-1===n&&(yd.usePlugin(e,t),this.initPlugin(e))}removePlugin(e){let t=yd.hasPlugin(e);-1!==t&&(yd.pluginList.splice(t,1),this[e.instanceName]&&(this[e.instanceName].beforePluginRemove&&this[e.instanceName].beforePluginRemove(),delete this[e.instanceName]))}initPlugin(e){this[e.instanceName]=new e({mindMap:this,pluginOpt:e.pluginOpt})}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.associativeLine&&this.associativeLine.hideEditTextBox(),[...yd.pluginList].forEach(e=>{this[e.instanceName].beforePluginDestroy&&this[e.instanceName].beforePluginDestroy(),this[e.instanceName]=null}),this.event.unbind(),this.svg.remove(),bo.removeBackgroundStyle(this.el),this.el.innerHTML="",this.el=null,this.removeCss()}}yd.pluginList=[],yd.usePlugin=(e,t={})=>(-1!==yd.hasPlugin(e)||(e.pluginOpt=t,yd.pluginList.push(e)),yd),yd.hasPlugin=e=>yd.pluginList.findIndex(t=>t===e),yd.defineTheme=(e,t={})=>{if(ud[e])return new Error("该主题名称已存在");ud[e]=po()(Sh,t)};var wd=yd;class xd{constructor(e){this.mindMap=e.mindMap,this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.startViewPos={x:0,y:0}}calculationMiniMap(e,t){let{svg:n,rect:r,origWidth:i,origHeight:o,scaleX:a,scaleY:s}=this.mindMap.getSvgData({ignoreWatermark:!0});const l=this.mindMap.elRect;r.x-=l.left,r.x2-=l.left,r.y-=l.top,r.y2-=l.top;let c=e/t,u=0,h=0;c>r.ratio?(h=t,u=r.ratio*h):(u=e,h=u/r.ratio);let d=u/r.width,f=(e-u)/2,p=(t-h)/2,m=r.x-(r.width*a-r.width)/2,g=r.x2+(r.width*a-r.width)/2,b=r.y-(r.height*s-r.height)/2,y=r.y2+(r.height*s-r.height)/2,w=r.width*a,x=r.height*s,k={left:0,top:0,right:0,bottom:0};k.left=Math.max(0,-m/w*u)+f,k.right=Math.max(0,(g-i)/w*u)+f,k.top=Math.max(0,-b/x*h)+p,k.bottom=Math.max(0,(y-o)/x*h)+p,k.top>p+h&&(k.top=p+h),k.left>f+u&&(k.left=f+u),Object.keys(k).forEach(e=>{k[e]=k[e]+"px"}),this.removeNodeContent(n);const A=n.svg();return{getImgUrl:async e=>{const t=new Blob([A],{type:"image/svg+xml"}),n=await Object(v["R"])(t);e(n)},svgHTML:A,viewBoxStyle:k,miniMapBoxScale:d,miniMapBoxLeft:f,miniMapBoxTop:p}}removeNodeContent(e){if(e.hasClass("smm-node")){let t=e.findOne(".smm-node-shape"),n=t.attr("fill");return(Object(v["J"])(n)||Object(v["H"])(n))&&t.attr("fill",Object(v["C"])(this.mindMap.themeConfig)),e.clear(),void e.add(t)}let t=e.children();t&&t.length>0&&t.forEach(e=>{this.removeNodeContent(e)})}onMousedown(e){this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};let t=this.mindMap.view.getTransformData();this.startViewPos={x:t.state.x,y:t.state.y}}onMousemove(e,t=5){if(!this.isMousedown)return;let n=e.clientX-this.mousedownPos.x,r=e.clientY-this.mousedownPos.y;this.mindMap.view.translateXTo(n*t+this.startViewPos.x),this.mindMap.view.translateYTo(r*t+this.startViewPos.y)}onMouseup(){this.isMousedown=!1}}xd.instanceName="miniMap";var kd=xd;class Ad{constructor(e={}){this.mindMap=e.mindMap,this.lineSpacing=0,this.textSpacing=0,this.angle=0,this.text="",this.textStyle={},this.watermarkDraw=null,this.maxLong=this.getMaxLong(),this.updateWatermark(this.mindMap.opt.watermarkConfig||{}),this.bindEvent()}getMaxLong(){return Math.sqrt(Math.pow(this.mindMap.width,2)+Math.pow(this.mindMap.height,2))}bindEvent(){this.onResize=this.onResize.bind(this),this.mindMap.on("resize",this.onResize)}unBindEvent(){this.mindMap.off("resize",this.onResize)}onResize(){this.maxLong=this.getMaxLong(),this.draw()}createContainer(){this.watermarkDraw||(this.watermarkDraw=this.mindMap.svg.group().css({"pointer-events":"none","user-select":"none"}).addClass("smm-water-mark-container"))}removeContainer(){this.watermarkDraw&&(this.watermarkDraw.remove(),this.watermarkDraw=null)}hasWatermark(){return!!this.text.trim()}handleConfig({text:e,lineSpacing:t,textSpacing:n,angle:r,textStyle:i}){this.text=void 0===e?"":String(e).trim(),this.lineSpacing="number"===typeof t&&t>0?t:100,this.textSpacing="number"===typeof n&&n>0?n:100,this.angle="number"===typeof r&&r>=0&&r<=90?r:30,this.textStyle=Object.assign(this.textStyle,i||{})}draw(){if(this.watermarkDraw&&this.watermarkDraw.clear(),!this.hasWatermark())return void this.removeContainer();this.createContainer();let e=0;while(e{let n=this.textStyle[t];"color"===t?e.fill(n):e.css(Object(v["e"])(t),n)})}updateWatermark(e){this.mindMap.opt.watermarkConfig=po()(this.mindMap.opt.watermarkConfig,e),this.handleConfig(e),this.draw()}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Ad.instanceName="watermark";var Cd=Ad;class Ed{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.onKeyup=this.onKeyup.bind(this),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.LEFT,()=>{this.onKeyup(oo["a"].KEY_DIR.LEFT)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.UP,()=>{this.onKeyup(oo["a"].KEY_DIR.UP)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.RIGHT,()=>{this.onKeyup(oo["a"].KEY_DIR.RIGHT)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.DOWN,()=>{this.onKeyup(oo["a"].KEY_DIR.DOWN)})}onKeyup(e){if(this.mindMap.renderer.activeNodeList.length>0)this.focus(e);else{let e=this.mindMap.renderer.root;this.mindMap.execCommand("GO_TARGET_NODE",e)}}focus(e){let t=this.mindMap.renderer.activeNodeList[0],n=this.getNodeRect(t),r=null,i=1/0,o=(e,t)=>{let o=this.getDistance(n,e);o{if(i.uid===e.uid)return;let o=this.getNodeRect(i),{left:a,top:s,right:l,bottom:c}=o,u=!1;n===oo["a"].KEY_DIR.LEFT?u=l<=t.left:n===oo["a"].KEY_DIR.RIGHT?u=a>=t.right:n===oo["a"].KEY_DIR.UP?u=c<=t.top:n===oo["a"].KEY_DIR.DOWN&&(u=s>=t.bottom),u&&r(o,i)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Object(v["d"])(this.mindMap.renderer.root,i=>{if(i.uid===e.uid)return;let o=this.getNodeRect(i),{left:a,top:s,right:l,bottom:c}=o,u=!1;n===oo["a"].KEY_DIR.LEFT?u=at.top:n===oo["a"].KEY_DIR.RIGHT?u=l>t.right&&st.top:n===oo["a"].KEY_DIR.UP?u=st.left:n===oo["a"].KEY_DIR.DOWN&&(u=c>t.bottom&&at.left),u&&r(o,i)})}getFocusNodeByAreaAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){let i=(t.right+t.left)/2,o=(t.bottom+t.top)/2;Object(v["d"])(this.mindMap.renderer.root,t=>{if(t.uid===e.uid)return;let a=this.getNodeRect(t),{left:s,top:l,right:c,bottom:u}=a,h=(c+s)/2,d=(u+l)/2,f=h-i,p=d-o;if(0===f&&0===p)return;let m=!1;n===oo["a"].KEY_DIR.LEFT?m=f<=0&&f<=p&&f<=-p:n===oo["a"].KEY_DIR.RIGHT?m=f>0&&f>=-p&&f>=p:n===oo["a"].KEY_DIR.UP?m=p<=0&&p0&&-pf),m&&r(a,t)})}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:o,top:a,width:s,height:l}=e;return{right:(o+s)*t+r,bottom:(a+l)*n+i,left:o*t+r,top:a*n+i}}getDistance(e,t){let n=this.getCenter(e),r=this.getCenter(t);return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}getCenter({left:e,right:t,top:n,bottom:r}){return{x:(e+t)/2,y:(n+r)/2}}}Ed.instanceName="keyboardNavigation";var Sd=Ed,Td=n("fafe");class Nd{constructor(e){this.mindMap=e.mindMap}async pdf(e,t,n=!1){n?await this.multiPageExport(e,t):await this.onePageExport(e,t)}onePageExport(e,t){return new Promise((n,r)=>{let i=new Td["a"]("","pt","a4"),o=oo["c"].width/oo["c"].height,a=new Image;a.onload=()=>{let r,s,l=a.width,c=a.height,u=l/c;l<=oo["c"].width&&c<=oo["c"].height?(r=l,s=c):o>u?(r=u*oo["c"].height,s=oo["c"].height):(r=oo["c"].width,s=oo["c"].width/u),i.addImage(t,"PNG",(oo["c"].width-r)/2,(oo["c"].height-s)/2,r,s),i.save(e),n()},a.onerror=e=>{r(e)},a.src=t})}multiPageExport(e,t){return new Promise((n,r)=>{let i=new Image;i.onload=()=>{let r=i.width,o=i.height,a=r/oo["c"].width*oo["c"].height,s=o,l=0,c=oo["c"].width,u=oo["c"].width/r*o,h=new Td["a"]("","pt","a4");if(s0)h.addImage(t,"PNG",0,l,c,u),s-=a,l-=oo["c"].height,s>0&&h.addPage();h.save(e),n()},i.onerror=e=>{r(e)},i.src=t})}}Nd.instanceName="doExportPDF";var Md=Nd;class Ld{constructor(e){this.mindMap=e.mindMap}async xmind(e,t){const n=await St.transformToXmind(e,t);return n}getXmind(){return St}}Ld.instanceName="doExportXMind";var Od=Ld;const Dd=e=>{let t=String(e).split(/\s+/);return t.map(e=>{if(/^[\d.]+/.test(e)){let t=/^([\d.]+)(.*)$/.exec(e);return[Number(t[1]),t[2]]}return e})},Pd=(e,t)=>e*t,Id=(e,t)=>t/e,Rd={left:0,top:0,center:50,bottom:100,right:100},Fd=({backgroundSize:e,drawOpt:t,imageRatio:n,canvasWidth:r,canvasHeight:i,canvasRatio:o})=>{if(e){let a=Dd(e);if("auto"===a[0]&&"auto"===a[1])return;if("cover"===a[0])return void(n>o?(t.height=i,t.width=Pd(n,i)):(t.width=r,t.height=Id(n,r)));if("contain"===a[0])return void(n>o?(t.width=r,t.height=Id(n,r)):(t.height=i,t.width=Pd(n,i)));let s=-1;a[0]&&(Array.isArray(a[0])?"%"===a[0][1]?(t.width=a[0][0]/100*r,s=t.width):(t.width=a[0][0],s=a[0][0]):"auto"===a[0]&&a[1]&&("%"===a[1][1]?t.width=Pd(n,a[1][0]/100*i):t.width=Pd(n,a[1][0]))),a[1]&&Array.isArray(a[1])?"%"===a[1][1]?t.height=a[1][0]/100*i:t.height=a[1][0]:-1!==s&&(t.height=Id(n,s))}},zd=({backgroundPosition:e,drawOpt:t,imgWidth:n,imgHeight:r,canvasWidth:i,canvasHeight:o})=>{if(e){let a=Dd(e);if(a=a.map(e=>"string"===typeof e&&void 0!==Rd[e]?[Rd[e],"%"]:e),Array.isArray(a[0])){if(1===a.length&&a.push([50,"%"]),"%"===a[0][1]){let e=a[0][0]/100*i,r=a[0][0]/100*n;t.x=e-r}else t.x=a[0][0];if("%"===a[1][1]){let e=a[1][0]/100*o,n=a[1][0]/100*r;t.y=e-n}else t.y=a[1][0]}}},Bd=({ctx:e,image:t,backgroundRepeat:n,drawOpt:r,imgWidth:i,imgHeight:o,canvasWidth:a,canvasHeight:s})=>{if(n){let l=r.x,c=r.y,u=Math.ceil(l/i),h=Math.ceil(c/o),d=l-u*i,f=c-h*o,p=Dd(n);if("no-repeat"===p[0]||i>=a&&o>=s)return;if("repeat-x"===p[0]&&a>i){let n=d;while(no){let n=f;while(no){let i=f;while(i{e.drawImage(t,n.sx,n.sy,n.swidth,n.sheight,n.x,n.y,n.width,n.height)},jd=(e,t,n,r,{backgroundSize:i,backgroundPosition:o,backgroundRepeat:a},s=(()=>{}))=>{let l=t/n,c=new Image;c.src=r,c.onload=()=>{let r=c.width,u=c.height,h=r/u,d={sx:0,sy:0,swidth:r,sheight:u,x:0,y:0,width:r,height:u};Fd({backgroundSize:i,drawOpt:d,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l}),zd({backgroundPosition:o,drawOpt:d,imgWidth:d.width,imgHeight:d.height,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l});let f=Bd({ctx:e,image:c,backgroundRepeat:a,drawOpt:d,imgWidth:d.width,imgHeight:d.height,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l});f||_d(e,c,d),s()},c.onerror=e=>{s(e)}};var Hd=jd;class Ud{constructor(e){this.mindMap=e.mindMap}async export(e,t=!0,n="思维导图",...r){if(this[e]){const i=await this[e](n,...r);return t&&"pdf"!==e&&Object(v["p"])(i,n+"."+e),i}return null}createTransformImgTaskList(e,t,n,r){const i=e.find(t);return i.map(async e=>{const t=r(e);if(/^data:/.test(t)||"none"===t)return;const i=await Object(v["F"])(t);e.attr(n,i)})}async getSvgData(){let{exportPaddingX:e,exportPaddingY:t}=this.mindMap.opt,{svg:n,svgHTML:r}=this.mindMap.getSvgData({paddingX:e,paddingY:t});const i=this.createTransformImgTaskList(n,"image","href",e=>e.attr("href")||e.attr("xlink:href")),o=this.createTransformImgTaskList(n,"img","src",e=>e.attr("src")),a=[...i,...o];let s;if(await Promise.all(a),this.mindMap.richText){const e=n.find("foreignObject");e.length>0&&(e[0].add(Yc(``)),s=!0)}return(a.length>0||s)&&(r=n.svg()),{node:n,str:r}}svgToPng(e,t,n=(()=>!1),r){return new Promise((i,o)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous"),a.onload=async()=>{try{const e=document.createElement("canvas"),o=Math.max(window.devicePixelRatio,this.mindMap.opt.minExportImgCanvasScale);let s=a.width,l=a.height;if(r){const e=Object(v["W"])(s,l,r.width,r.height);s=e[0],l=e[1]}const c=n(s,l);c?(e.width=l*o,e.height=s*o,e.style.width=l+"px",e.style.height=s+"px"):(e.width=s*o,e.height=l*o,e.style.width=s+"px",e.style.height=l+"px");const u=e.getContext("2d");u.scale(o,o),c&&(u.rotate(.5*Math.PI),u.translate(0,-l)),t||await this.drawBackgroundToCanvas(u,s,l),u.drawImage(a,0,0,s,l),i(e.toDataURL())}catch(e){o(e)}},a.onerror=e=>{o(e)},a.src=e})}drawBackgroundToCanvas(e,t,n){return new Promise((r,i)=>{const{backgroundColor:o="#fff",backgroundImage:a,backgroundRepeat:s="no-repeat",backgroundPosition:l="center center",backgroundSize:c="cover"}=this.mindMap.themeConfig;e.save(),e.rect(0,0,t,n),e.fillStyle=o,e.fill(),e.restore(),a&&"none"!==a?(e.save(),Hd(e,t,n,a,{backgroundRepeat:s,backgroundPosition:l,backgroundSize:c},t=>{t?i(t):r(),e.restore()})):r()})}drawBackgroundToSvg(e){return new Promise(async t=>{const{backgroundColor:n="#fff",backgroundImage:r,backgroundRepeat:i="repeat"}=this.mindMap.themeConfig;if(e.css("background-color",n),r&&"none"!==r){const n=await Object(v["F"])(r);e.css("background-image",`url(${n})`),e.css("background-repeat",i),t()}else t()})}async png(e,t=!1,n,r){const{str:i}=await this.getSvgData(),o=await this.fixSvgStrAndToBlob(i),a=await this.svgToPng(o,t,n,r);return a}async pdf(e,t,n){if(!this.mindMap.doExportPDF)throw new Error("请注册ExportPDF插件");const r=await this.png("",!1,(e,t)=>!(e<=oo["c"].width&&t&&oo["c"].height)&&e/t>1,{width:n||2*oo["c"].width});await this.mindMap.doExportPDF.pdf(e,r,t)}async xmind(e){if(!this.mindMap.doExportXMind)throw new Error("请注册ExportXMind插件");const t=this.mindMap.getData(),n=await this.mindMap.doExportXMind.xmind(t,e),r=await Object(v["R"])(n);return r}async svg(e){const{node:t}=await this.getSvgData();t.first().before(Yc(`${e}`)),await this.drawBackgroundToSvg(t);const n=t.svg(),r=await this.fixSvgStrAndToBlob(n);return r}async fixSvgStrAndToBlob(e){e=Object(v["T"])(e),e=Object(v["D"])(e);const t=new Blob([e],{type:"image/svg+xml"}),n=await Object(v["R"])(t);return n}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),i=new Blob([r]),o=await Object(v["R"])(i);return o}async smm(e,t){const n=await this.json(e,t);return n}async md(){const e=this.mindMap.getData(),t=Ot(e),n=new Blob([t]),r=await Object(v["R"])(n);return r}}Ud.instanceName="doExport";var qd=Ud;n("a3df");class Gd extends ch{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.reset(),this.bindEvent()}reset(){this.isDragging=!1,this.mousedownNode=null,this.beingDragNodeList=[],this.nodeList=[],this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.drawTransform=null,this.clone=null,this.placeholder=null,this.offsetX=0,this.offsetY=0,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.checkDragOffset=10,this.minOffset=10}bindEvent(){this.checkOverlapNode=Object(v["cb"])(this.checkOverlapNode,300,this),this.mindMap.on("node_mousedown",(e,t)=>{if(this.mindMap.opt.readonly||1!==t.which||e.isGeneralization||e.isRoot)return;t.preventDefault(),this.isMousedown=!0,this.mousedownNode=e;const{x:n,y:r}=this.mindMap.toPos(t.clientX,t.clientY);this.mouseDownX=n,this.mouseDownY=r}),this.mindMap.on("mousemove",e=>{if(this.mindMap.opt.readonly||!this.isMousedown)return;e.preventDefault();const{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!this.isDragging&&Math.abs(t-this.mouseDownX)<=this.checkDragOffset&&Math.abs(n-this.mouseDownY)<=this.checkDragOffset||(this.mindMap.emit("node_dragging"),this.handleStartMove(),this.onMove(t,n,e))}),this.onMouseup=this.onMouseup.bind(this),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("mouseup",this.onMouseup)}onMouseup(e){if(!this.isMousedown)return;this.isMousedown=!1,this.beingDragNodeList.forEach(e=>{e.setOpacity(1),e.showChildren(),e.endDrag()}),this.removeCloneNode();let t=this.overlapNode?this.overlapNode.getData("uid"):"",n=this.prevNode?this.prevNode.getData("uid"):"",r=this.nextNode?this.nextNode.getData("uid"):"";if(this.overlapNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!1),this.mindMap.execCommand("MOVE_NODE_TO",this.beingDragNodeList,this.overlapNode);else if(this.prevNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.prevNode,!1),this.mindMap.execCommand("INSERT_AFTER",this.beingDragNodeList,this.prevNode);else if(this.nextNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.nextNode,!1),this.mindMap.execCommand("INSERT_BEFORE",this.beingDragNodeList,this.nextNode);else if(this.clone&&this.mindMap.opt.enableFreeDrag&&1===this.beingDragNodeList.length){let{x:t,y:n}=this.mindMap.toPos(e.clientX-this.offsetX,e.clientY-this.offsetY),{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.drawTransform;t=(t-o)/r,n=(n-a)/i,this.mousedownNode.left=t,this.mousedownNode.top=n,this.mousedownNode.customLeft=t,this.mousedownNode.customTop=n,this.mindMap.execCommand("SET_NODE_CUSTOM_POSITION",this.mousedownNode,t,n),this.mindMap.render()}this.isDragging&&this.mindMap.emit("node_dragend",{overlapNodeUid:t,prevNodeUid:n,nextNodeUid:r}),this.reset()}onMove(e,t,n){if(!this.isMousedown)return;let{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.drawTransform,s=e-this.offsetX,l=t-this.offsetY;e=(s-o)/r,t=(l-a)/i;let c=this.clone.transform();this.clone.translate(e-c.translateX,t-c.translateY),this.checkOverlapNode(),this.mindMap.opt.autoMoveWhenMouseInEdgeOnDrag&&this.mindMap.select&&(this.drawTransform=this.mindMap.draw.transform(),this.mindMap.select.clearAutoMoveTimer(),this.mindMap.select.onMove(n.clientX,n.clientY))}handleStartMove(){if(!this.isDragging){this.isDragging=!0;let e=this.mousedownNode;this.drawTransform=this.mindMap.draw.transform();let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.drawTransform;this.offsetX=this.mouseDownX-(e.left*t+r),this.offsetY=this.mouseDownY-(e.top*n+i),e.getData("isActive")?this.beingDragNodeList=Object(v["A"])(this.mindMap.renderer.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization)):this.beingDragNodeList=[e],this.nodeTreeToList(),this.createCloneNode(),this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}}nodeTreeToList(){const e=[];Object(v["d"])(this.mindMap.renderer.root,t=>{this.checkIsInBeingDragNodeList(t)||(e[t.layerIndex]||(e[t.layerIndex]=[]),e[t.layerIndex].push(t))}),this.nodeList=e.reduceRight((e,t)=>[...e,...t],[])}createCloneNode(){if(!this.clone){const{dragMultiNodeRectConfig:e,dragPlaceholderRectFill:t,dragOpacityConfig:n}=this.mindMap.opt,{width:r,height:i,fill:o}=e,a=this.beingDragNodeList[0],s=a.style.merge("lineColor",!0);if(this.beingDragNodeList.length>1)this.clone=this.mindMap.otherDraw.rect().size(r,i).radius(i/2).fill({color:o||s}),this.offsetX=r/2,this.offsetY=i/2;else{this.clone=a.group.clone();const e=this.clone.findOne(".smm-expand-btn");e&&e.remove(),this.mindMap.otherDraw.add(this.clone)}this.clone.opacity(n.cloneNodeOpacity),this.clone.css("z-index",99999),this.placeholder=this.mindMap.otherDraw.rect().fill({color:t||s}),this.beingDragNodeList.forEach(e=>{e.setOpacity(n.beingDragNodeOpacity),e.hideChildren(),e.startDrag()})}}removeCloneNode(){this.clone&&(this.clone.remove(),this.placeholder.remove())}checkOverlapNode(){this.drawTransform&&this.placeholder&&(this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.placeholder.size(0,0),this.nodeList.forEach(e=>{if(e.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),!(this.overlapNode||this.prevNode&&this.nextNode))switch(this.mindMap.opt.layout){case"logicalStructure":this.handleLogicalStructure(e);break;case"mindMap":this.handleMindMap(e);break;case"organizationStructure":this.handleOrganizationStructure(e);break;case"catalogOrganization":this.handleCatalogOrganization(e);break;case"timeline":this.handleTimeLine(e);break;case"timeline2":this.handleTimeLine2(e);break;case"verticalTimeline":this.handleLogicalStructure(e);break;case"fishbone":this.handleFishbone(e);break;default:this.handleLogicalStructure(e)}}),this.overlapNode&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0))}handleVerticalCheck(e,t,n=!1){let r=this.mouseMoveX,i=this.mouseMoveY,o=this.getNodeRect(e);n&&(t=t.reverse());let a=o.height/4,{prevBrotherOffset:s,nextBrotherOffset:l}=this.getNodeDistanceToSiblingNode(t,e,o,"v");if(o.left<=r&&o.right>=r){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=l>0?i>o.bottom&&i<=o.bottom+l:i>=o.bottom-a&&i<=o.bottom,r=s>0?i=o.top-s:i>=o.top&&i<=o.top+a;if(t){n?this.nextNode=e:this.prevNode=e;let t=this.formatPlaceholderSize(l);this.setPlaceholderRect(e.width,t,o.originLeft,o.originBottom)}else if(r){n?this.prevNode=e:this.nextNode=e;let t=this.formatPlaceholderSize(s);this.setPlaceholderRect(e.width,t,o.originLeft,o.originTop-t)}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:s,nextBrotherOffset:l,size:a,pos:i,nodeRect:o})}}handleHorizontalCheck(e,t){let n=this.mouseMoveX,r=this.mouseMoveY,i=this.getNodeRect(e),o=i.width/4,{prevBrotherOffset:a,nextBrotherOffset:s}=this.getNodeDistanceToSiblingNode(t,e,i,"h");if(i.top<=r&&i.bottom>=r){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=s>0?n=i.right:n<=i.right&&n>=i.right-o,r=a>0?n>i.left-a&&n<=i.left:n<=i.left+o&&n>=i.left;if(t){this.prevNode=e;let t=this.formatPlaceholderSize(s);this.setPlaceholderRect(t,e.height,i.originRight,i.originTop)}else if(r){this.nextNode=e;let t=this.formatPlaceholderSize(a);this.setPlaceholderRect(t,e.height,i.originLeft-t,i.originTop)}}this.checkIsOverlap({node:e,dir:"h",prevBrotherOffset:a,nextBrotherOffset:s,size:o,pos:n,nodeRect:i})}}getNodeDistanceToSiblingNode(e,t,n,r){let i="v"===r?"top":"left",o="v"===r?"bottom":"right",a=Object(v["w"])(t,e),s=null,l=null;-1!==a&&(a-1>=0&&(s=e[a-1]),a+1<=e.length-1&&(l=e[a+1]));let c=0;if(s){let e=this.getNodeRect(s);c=n[i]-e[o],c=c>=this.minOffset?c/2:0}else c=this.minOffset;let u=0;if(l){let e=this.getNodeRect(l);u=e[i]-n[o],u=u>=this.minOffset?u/2:0}else u=this.minOffset;return{prevBrotherOffset:c,nextBrotherOffset:u}}formatPlaceholderSize(e){const{nodeDragPlaceholderMaxSize:t}=this.mindMap.opt;return e>0?Math.min(e,t):5}setPlaceholderRect(e,t,n,r){this.placeholder.size(e,t).move(n,r)}checkIsOverlap({node:e,dir:t,prevBrotherOffset:n,nextBrotherOffset:r,size:i,pos:o,nodeRect:a}){let s="v"===t?"top":"left",l="v"===t?"bottom":"right";this.overlapNode||this.prevNode||this.nextNode||a[s]+(n>0?0:i)<=o&&a[l]-(r>0?0:i)>=o&&(this.overlapNode=e)}handleLogicalStructure(e){const t=this.commonGetNodeCheckList(e);this.handleVerticalCheck(e,t)}handleMindMap(e){const t=e.parent?e.parent.children.filter(t=>{let n=!0;return 1===e.layerIndex&&(n=t.dir===e.dir),n&&!this.checkIsInBeingDragNodeList(t)}):[];this.handleVerticalCheck(e,t)}handleOrganizationStructure(e){const t=this.commonGetNodeCheckList(e);this.handleHorizontalCheck(e,t)}handleCatalogOrganization(e){const t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine(e){let t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine2(e){let t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):"top"===e.dir&&2===e.layerIndex?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}handleFishbone(e){let t=e.parent?e.parent.children.filter(e=>e.layerIndex>1&&!this.checkIsInBeingDragNodeList(e)):[];1===e.layerIndex?this.handleHorizontalCheck(e,t):"top"===e.dir&&2===e.layerIndex?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}commonGetNodeCheckList(e){return e.parent?[...e.parent.children].filter(e=>!this.checkIsInBeingDragNodeList(e)):[]}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.drawTransform,{left:o,top:a,width:s,height:l}=e,c=o,u=a,h=a+l,d=o+s,f=(o+s)*t+r,p=(a+l)*n+i;return o=o*t+r,a=a*n+i,{width:s,height:l,left:o,top:a,right:f,bottom:p,originLeft:c,originTop:u,originBottom:h,originRight:d}}checkIsInBeingDragNodeList(e){return!!this.beingDragNodeList.find(t=>t.uid===e.uid||t.isAncestor(e))}}Gd.instanceName="drag";var Wd=Gd;class Vd{constructor({mindMap:e}){this.mindMap=e,this.rect=null,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.isSelecting=!1,this.cacheActiveList=[],this.bindEvent()}bindEvent(){this.checkInNodes=Object(v["cb"])(this.checkInNodes,300,this),this.mindMap.on("mousedown",e=>{if(this.mindMap.opt.readonly)return;let{useLeftKeySelectionRightKeyDrag:t}=this.mindMap.opt;if(!e.ctrlKey&&(t?1!==e.which:3!==e.which))return;e.preventDefault(),this.isMousedown=!0,this.cacheActiveList=[...this.mindMap.renderer.activeNodeList];let{x:n,y:r}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseDownX=n,this.mouseDownY=r,this.createRect(n,r)}),this.mindMap.on("mousemove",e=>{if(this.mindMap.opt.readonly)return;if(!this.isMousedown)return;let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,Math.abs(t-this.mouseDownX)<=10&&Math.abs(n-this.mouseDownY)<=10||(this.clearAutoMoveTimer(),this.onMove(e.clientX,e.clientY,()=>{this.isSelecting=!0,this.rect.plot([[this.mouseDownX,this.mouseDownY],[this.mouseMoveX,this.mouseDownY],[this.mouseMoveX,this.mouseMoveY],[this.mouseDownX,this.mouseMoveY]]),this.checkInNodes()},(e,t)=>{switch(e){case"left":this.mouseDownX+=t;break;case"top":this.mouseDownY+=t;break;case"right":this.mouseDownX-=t;break;case"bottom":this.mouseDownY-=t;break;default:break}}))}),this.onMouseup=this.onMouseup.bind(this),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup)}onMouseup(){this.mindMap.opt.readonly||this.isMousedown&&(this.checkTriggerNodeActiveEvent(),clearTimeout(this.autoMoveTimer),this.isMousedown=!1,this.cacheActiveList=[],this.rect&&this.rect.remove(),this.rect=null,setTimeout(()=>{this.isSelecting=!1},0))}checkTriggerNodeActiveEvent(){let e=this.cacheActiveList.length!==this.mindMap.renderer.activeNodeList.length,t=!1;if(!e)for(let n=0;nt.getData("uid")===e.getData("uid"))){t=!0;break}}(e||t)&&this.mindMap.renderer.emitNodeActiveEvent()}onMove(e,t,n=(()=>{}),r=(()=>{})){n();let i=this.mindMap.opt.selectTranslateStep,o=this.mindMap.opt.selectTranslateLimit,a=0;e<=this.mindMap.elRect.left+o&&(r("left",i),this.mindMap.view.translateX(i),a++),e>=this.mindMap.elRect.right-o&&(r("right",i),this.mindMap.view.translateX(-i),a++),t<=this.mindMap.elRect.top+o&&(r("top",i),this.mindMap.view.translateY(i),a++),t>=this.mindMap.elRect.bottom-o&&(r("bottom",i),this.mindMap.view.translateY(-i),a++),a>0&&this.startAutoMove(e,t,n,r)}startAutoMove(e,t,n,r){this.autoMoveTimer=setTimeout(()=>{this.onMove(e,t,n,r)},20)}clearAutoMoveTimer(){clearTimeout(this.autoMoveTimer)}createRect(e,t){this.rect&&this.rect.remove(),this.rect=this.mindMap.svg.polygon().stroke({color:"#0984e3"}).fill({color:"rgba(9,132,227,0.3)"}).plot([[e,t]])}checkInNodes(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),i=Math.min(this.mouseDownX,this.mouseMoveX),o=Math.min(this.mouseDownY,this.mouseMoveY),a=Math.max(this.mouseDownX,this.mouseMoveX),s=Math.max(this.mouseDownY,this.mouseMoveY);Object(v["d"])(this.mindMap.renderer.root,l=>{let{left:c,top:u,width:h,height:d}=l,f=(c+h)*e+n,p=(u+d)*t+r;if(c=c*e+n,u=u*t+r,Object(v["j"])(i,a,o,s,c,f,u,p)){if(l.getData("isActive"))return;this.mindMap.renderer.addNodeToActiveList(l)}else if(l.getData("isActive")){if(!l.getData("isActive"))return;this.mindMap.renderer.removeNodeFromActiveList(l)}})}hasSelectRange(){return this.isSelecting}}Vd.instanceName="select";var Yd=Vd,Zd=n("4f98"),Kd=n.n(Zd),Xd=n("a872"),Jd=n.n(Xd);n("5ba9");let Qd=!1,$d=["宋体, SimSun, Songti SC","微软雅黑, Microsoft YaHei","楷体, 楷体_GB2312, SimKai, STKaiti","黑体, SimHei, Heiti SC","隶书, SimLi","andale mono","arial, helvetica, sans-serif","arial black, avant garde","comic sans ms","impact, chicago","times new roman","sans-serif","serif"],ef=new Array(100).fill(0).map((e,t)=>t+"px");class tf{constructor({mindMap:e,pluginOpt:t}){this.mindMap=e,this.pluginOpt=t,this.textEditNode=null,this.showTextEdit=!1,this.quill=null,this.range=null,this.lastRange=null,this.pasteUseRange=null,this.node=null,this.isInserting=!1,this.styleEl=null,this.cacheEditingText="",this.lostStyle=!1,this.isCompositing=!1,this.initOpt(),this.extendQuill(),this.appendCss(),this.bindEvent(),this.mindMap.opt.data&&(this.mindMap.opt.data=this.handleSetData(this.mindMap.opt.data))}bindEvent(){this.onCompositionStart=this.onCompositionStart.bind(this),this.onCompositionEnd=this.onCompositionEnd.bind(this),window.addEventListener("compositionstart",this.onCompositionStart),window.addEventListener("compositionend",this.onCompositionEnd)}unbindEvent(){window.removeEventListener("compositionstart",this.onCompositionStart),window.removeEventListener("compositionend",this.onCompositionEnd)}appendCss(){let e="\n .ql-editor {\n overflow: hidden;\n padding: 0;\n height: auto;\n line-height: normal;\n -webkit-user-select: text;\n }\n \n .ql-container {\n height: auto;\n font-size: inherit;\n }\n\n .ql-container.ql-snow {\n border: none;\n }\n\n .smm-richtext-node-wrap p {\n font-family: auto;\n }\n\n .smm-richtext-node-edit-wrap p {\n font-family: auto;\n }\n ";this.styleEl=document.createElement("style"),this.styleEl.type="text/css",this.styleEl.innerHTML=e,document.head.appendChild(this.styleEl)}initOpt(){this.pluginOpt.fontFamilyList&&Array.isArray(this.pluginOpt.fontFamilyList)&&($d=this.pluginOpt.fontFamilyList),this.pluginOpt.fontSizeList&&Array.isArray(this.pluginOpt.fontSizeList)&&(ef=this.pluginOpt.fontSizeList)}extendQuill(){if(Qd)return;Qd=!0;const e=Kd.a.import("attributors/class/font");e.whitelist=$d,Kd.a.register(e,!0);const t=Kd.a.import("attributors/style/font");t.whitelist=$d,Kd.a.register(t,!0);const n=Kd.a.import("attributors/class/size");n.whitelist=ef,Kd.a.register(n,!0);const r=Kd.a.import("attributors/style/size");r.whitelist=ef,Kd.a.register(r,!0)}showEditText({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:i}){if(this.showTextEdit)return;const{richTextEditFakeInPlace:o,customInnerElsAppendTo:a,nodeTextEditZIndex:s,textAutoWrapWidth:l,selectTextOnEnterEditText:c}=this.mindMap.opt;this.node=e,this.isInserting=n,t||(t=e._textData.node.node.getBoundingClientRect()),i||this.mindMap.emit("before_show_text_edit"),this.mindMap.renderer.textEdit.registerTmpShortcut();let u=e._textData.node,h=u.attr("data-width"),d=u.attr("data-height"),f=t.width/h,p=t.height/d,m=6,g=4;if(o){let t=e.getPaddingVale();m=t.paddingX,g=t.paddingY}if(!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add("smm-richtext-node-edit-wrap"),this.textEditNode.style.cssText=`\n position:fixed; \n box-sizing: border-box; \n box-shadow: 0 0 20px rgba(0,0,0,.5);\n outline: none; \n word-break: \n break-all;padding: ${g}px ${m}px;\n `,this.textEditNode.addEventListener("click",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("mousedown",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("keydown",e=>{this.mindMap.renderer.textEdit.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()});const e=a||document.body;e.appendChild(this.textEditNode)}let b=e.style.merge("fillColor"),y=e.style.merge("color");if(this.textEditNode.style.marginLeft=`-${m*f}px`,this.textEditNode.style.marginTop=`-${g*p}px`,this.textEditNode.style.zIndex=s,this.textEditNode.style.backgroundColor="transparent"===b?Object(v["J"])(y)?Object(v["C"])(this.mindMap.themeConfig):"#fff":b,this.textEditNode.style.minWidth=h+2*m+"px",this.textEditNode.style.minHeight=d+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=l+2*m+"px",this.textEditNode.style.transform=`scale(${f}, ${p})`,this.textEditNode.style.transformOrigin="left top",o&&(this.textEditNode.style.borderRadius=(e.style.merge("borderRadius")||5)+"px","roundedRectangle"==e.style.merge("shape")&&(this.textEditNode.style.borderRadius=(e.height||50)+"px")),e.getData("richText"))this.textEditNode.innerHTML=this.cacheEditingText||e.getData("text");else{let t="";Object(v["I"])(e.getData("text"))||(t=String(e.getData("text")).split(/\n/gim).join("
"));let n=`

${t}

`;this.textEditNode.innerHTML=this.cacheEditingText||n}this.initQuillEditor(),document.querySelector(".ql-editor").style.minHeight=d+"px",this.showTextEdit=!0,this.focus(n||c&&!r?0:null),e.getData("richText")||this.setTextStyleIfNotRichText(e),this.cacheEditingText=""}setTextStyleIfNotRichText(e){let t={font:e.style.merge("fontFamily"),color:e.style.merge("color"),italic:"italic"===e.style.merge("fontStyle"),bold:"bold"===e.style.merge("fontWeight"),size:e.style.merge("fontSize")+"px",underline:"underline"===e.style.merge("textDecoration"),strike:"line-through"===e.style.merge("textDecoration")};this.pureFormatAllText(t)}getEditText(){let e=this.quill.container.firstChild.innerHTML;return e.replace(/


<\/p>$/,"")}hideEditText(e){if(!this.showTextEdit)return;let t=this.getEditText(),n=e&&e.length>0?e:this.mindMap.renderer.activeNodeList;n.forEach(e=>{this.mindMap.execCommand("SET_NODE_TEXT",e,t,!0),e.isGeneralization&&e.generalizationBelongNode.updateGeneralization(),this.mindMap.render()}),this.mindMap.emit("hide_text_edit",this.textEditNode,n),this.textEditNode.style.display="none",this.showTextEdit=!1,this.mindMap.emit("rich_text_selection_change",!1),this.node=null,this.isInserting=!1}initQuillEditor(){this.quill=new Kd.a(this.textEditNode,{modules:{toolbar:!1,keyboard:{bindings:{enter:{key:13,handler:function(){}},tab:{key:9,handler:function(){}}}}},theme:"snow"}),this.quill.on("selection-change",e=>{if(!this.isInserting&&(this.lastRange=this.range,this.range=null,e)){this.pasteUseRange=e;let t=this.quill.getBounds(e.index,e.length),n=this.textEditNode.getBoundingClientRect(),r={left:t.left+n.left,top:t.top+n.top,right:t.right+n.left,bottom:t.bottom+n.top,width:t.width},i=this.quill.getFormat(e.index,e.length),o=!1;0==e.length?o=!1:(this.range=e,o=!0),this.mindMap.emit("rich_text_selection_change",o,r,i)}}),this.quill.on("text-change",()=>{let e=this.quill.getContents(),t=e.ops.length;t<=0||1===t&&"\n"===e.ops[0].insert?(this.lostStyle=!0,this.syncFormatToNodeConfig(null,!0)):this.lostStyle&&!this.isCompositing&&(this.setTextStyleIfNotRichText(this.node),this.lostStyle=!1)}),this.quill.clipboard.addMatcher(Node.TEXT_NODE,e=>{let t=this.getPasteTextStyle();return(new Jd.a).insert(e.data,t)}),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(e,t)=>{let n=[],r=this.getPasteTextStyle();return t.ops.forEach(e=>{e.insert&&"string"===typeof e.insert&&"\n"!==e.insert&&n.push({attributes:{...r},insert:e.insert})}),t.ops=n,t})}getPasteTextStyle(){return this.pasteUseRange?this.quill.getFormat(this.pasteUseRange.index,this.pasteUseRange.length):{}}onCompositionStart(){this.showTextEdit&&(this.isCompositing=!0)}onCompositionEnd(){this.showTextEdit&&(this.isCompositing=!1,this.lostStyle&&this.setTextStyleIfNotRichText(this.node))}selectAll(){this.quill.setSelection(0,this.quill.getLength())}focus(e){let t=this.quill.getLength();this.quill.setSelection("number"===typeof e?e:t,t)}formatText(e={},t=!1){if(!this.range&&!this.lastRange)return;this.syncFormatToNodeConfig(e,t);let n=!this.range,r=n?this.lastRange:this.range;t?this.quill.removeFormat(r.index,r.length):this.quill.formatText(r.index,r.length,e),n&&this.quill.setSelection(this.lastRange.index,this.lastRange.length)}removeFormat(){this.formatText({},!0)}formatRangeText(e,t={}){e&&(this.syncFormatToNodeConfig(t),this.quill.formatText(e.index,e.length,t))}formatAllText(e={}){this.syncFormatToNodeConfig(e),this.pureFormatAllText(e)}pureFormatAllText(e={}){this.quill.formatText(0,this.quill.getLength(),e)}syncFormatToNodeConfig(e,t){if(this.node)if(t)["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color"].forEach(e=>{delete this.node.nodeData.data[e]});else{let t=this.richTextStyleToNormalStyle(e);this.mindMap.execCommand("SET_NODE_DATA",this.node,t)}}normalStyleToRichTextStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"fontFamily":t.font=r;break;case"fontSize":t.size=r+"px";break;case"fontWeight":t.bold="bold"===r;break;case"fontStyle":t.italic="italic"===r;break;case"textDecoration":t.underline="underline"===r,t.strike="line-through"===r;break;case"color":t.color=r;break;default:break}}),t}richTextStyleToNormalStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"font":t.fontFamily=r;break;case"size":t.fontSize=parseFloat(r);break;case"bold":t.fontWeight=r?"bold":"normal";break;case"italic":t.fontStyle=r?"italic":"normal";break;case"underline":t.textDecoration=r?"underline":"none";break;case"strike":t.textDecoration=r?"line-through":"none";break;case"color":t.color=r;break;default:break}}),t}setNotActiveNodeStyle(e,t){const n=this.normalStyleToRichTextStyle(t);Object.keys(n).length>0&&(this.showEditText({node:e}),this.formatAllText(n),this.hideEditText([e]))}async handleExportPng(e){let t=document.createElement("div");t.style.position="absolute",t.style.left="-9999999px",t.appendChild(e),this.mindMap.el.appendChild(t);let n=e=>{e.style.margin=0,e.style.padding=0,e.hasChildNodes()&&Array.from(e.children).forEach(e=>{n(e)})};n(e);const r=await domtoimage.toPng(t);return this.mindMap.el.removeChild(t),r}transformAllNodesToNormalNode(){Object(v["db"])(this.mindMap.renderer.renderTree,null,e=>{e.data.richText&&(e.data.richText=!1,e.data.text=Object(v["z"])(e.data.text))},null,!0,0,0),this.mindMap.command.clearHistory(),this.mindMap.command.addHistory(),this.mindMap.render(null,oo["a"].TRANSFORM_TO_NORMAL_NODE)}handleSetData(e){let t=e=>{e.data&&!e.data.richText&&(e.data.richText=!0,e.data.resetRichText=!0),e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e)})};return t(e),e}beforePluginRemove(){this.transformAllNodesToNormalNode(),document.head.removeChild(this.styleEl),this.unbindEvent()}beforePluginDestroy(){document.head.removeChild(this.styleEl),this.unbindEvent()}}tf.instanceName="richText";var nf=tf,rf=n("0f9c");const of=(e,t)=>e.getData("associativeLineTargets").findIndex(e=>e===t.getData("uid")),af=(e,t,n,r)=>{let i=e+(n-e)/2,o=t,a=i,s=r;return Math.abs(e-n)<=5&&(i=e+(r-t)/2,a=i),[{x:i,y:o},{x:a,y:s}]},sf=(e,t,n,r)=>`M ${e.x},${e.y} C ${n.x},${n.y} ${r.x},${r.y} ${t.x},${t.y}`,lf=e=>{let{left:t,top:n,width:r,height:i}=e;return{right:t+r,bottom:n+i,left:t,top:n}},cf=(e,t,n,r)=>{let i=af(e,t,n,r);return sf({x:e,y:t},{x:n,y:r},i[0],i[1])},uf=(e,t)=>{const{left:n,top:r,translateLeft:i,translateTop:o,width:a,height:s}=e,l=t.clientX,c=t.clientY,u=i+a/2,h=o+s/2,d=n+a/2,f=r+s/2,p=Math.atan(s/a),m=l-u,g=h-c,v=Math.atan2(g,m);let b=n+a,y=r+s;if(v=-p){const e=v*(a/2);return(v=0||v>=-p&&v<0)&&(y=f-e),{x:b,y:y,dir:"right",range:e}}if(v>=p&&v=p){const t=s/2/v;e=-t,b=d+t}else if(v>=Math.PI/2-p&&v=p-Math.PI){let e=0;if(v>=p-Math.PI/2&&v<-p){const t=s/2/v;e=t,b=d-t}else if(v=p-Math.PI){const t=(u-l)/(h-c),n=s/2*t;e=-n,b=d+n}return{x:b,y:y,dir:"bottom",range:e}}b=n;const w=(h-c)/(u-l),x=w*(a/2);return(v>=-Math.PI&&v=Math.PI-p)&&(y=f-x),{x:b,y:y,dir:"left",range:x}},hf=(e,t="right",n=0,r=null)=>{let{left:i,top:o,width:a,height:s}=e;if(r)return uf(e,r);switch(t){case"left":return{x:i,y:o+s/2-n};case"right":return{x:i+a,y:o+s/2-n};case"top":return{x:i+a/2-n,y:o};case"bottom":return{x:i+a/2-n,y:o+s};default:break}},df=(e,t)=>{let n=lf(e),r=(n.right+n.left)/2,i=(n.bottom+n.top)/2,o=lf(t),a=(o.right+o.left)/2,s=(o.bottom+o.top)/2,l=a-r,c=s-i;if(0===l&&0===c)return[];let u="",h="";return l<=0&&l<=c&&l<=-c?(u="left",h="right"):l>0&&l>=-c&&l>=c?(u="right",h="left"):c<=0&&c0&&-cl&&(u="right",h="right"),[hf(e,u),hf(t,h)]},ff=(e,t,n,r)=>{let i=of(n,r),o=[],a=n.getData("associativeLineTargetControlOffsets");if(a&&a[i]){let n=a[i];o=[{x:e.x+n[0].x,y:e.y+n[0].y},{x:t.x+n[1].x,y:t.y+n[1].y}]}else o=af(e.x,e.y,t.x,t.y);return{path:sf(e,t,o[0],o[1]),controlPoints:o}},pf=(e,t)=>{let n=af(e.x,e.y,t.x,t.y);return[{x:n[0].x-e.x,y:n[0].y-e.y},{x:n[1].x-t.x,y:n[1].y-t.y}]};function mf(){let{associativeLineActiveColor:e}=this.mindMap.themeConfig;this.controlLine1=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlLine2=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlPoint1=this.createOneControlNode("controlPoint1"),this.controlPoint2=this.createOneControlNode("controlPoint2")}function gf(e){let{associativeLineActiveColor:t}=this.mindMap.themeConfig;return this.associativeLineDraw.circle(this.controlPointDiameter).stroke({color:t}).fill({color:"#fff"}).click(e=>{e.stopPropagation()}).mousedown(t=>{this.onControlPointMousedown(t,e)})}function vf(e,t){e.stopPropagation(),this.isControlPointMousedown=!0,this.mousedownControlPointKey=t}function bf(e){if(!this.isControlPointMousedown||!this.mousedownControlPointKey||!this[this.mousedownControlPointKey])return;e.stopPropagation(),e.preventDefault();let t=this.controlPointDiameter/2,{x:n,y:r}=this.getTransformedEventPos(e);this.controlPointMousemoveState.pos={x:n,y:r},this[this.mousedownControlPointKey].x(n-t).y(r-t);let[,,,i,o]=this.activeLine,a=of(i,o),{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=i.getData();s=s||[];const c=this.getNodePos(i),u=this.getNodePos(o);let[h,d]=this.updateAllLinesPos(i,o,s[a]);this.controlPointMousemoveState.startPoint=h,this.controlPointMousemoveState.endPoint=d,this.controlPointMousemoveState.targetIndex=a;let f=[];f=l?l[a]:pf(h,d);let p=null,m=null;const{x:g,y:v}=this.mindMap.toPos(e.clientX,e.clientY),b={clientX:g,clientY:v};"controlPoint1"===this.mousedownControlPointKey?(h=hf(c,"",0,b),p={x:n,y:r},m={x:d.x+f[1].x,y:d.y+f[1].y},h&&(this.controlPointMousemoveState.startPoint=h,this.controlLine1.plot(h.x,h.y,p.x,p.y))):(d=hf(u,"",0,b),p={x:h.x+f[0].x,y:h.y+f[0].y},m={x:n,y:r},d&&(this.controlPointMousemoveState.endPoint=d,this.controlLine2.plot(d.x,d.y,m.x,m.y))),this.updataAassociativeLine(h,d,p,m,this.activeLine)}function yf(e,t,n,r,i){const[o,a,s]=i,l=sf(e,t,n,r);o.plot(l),a.plot(l),this.updateTextPos(o,s),this.updateTextEditBoxPos(s)}function wf(e){if(!this.isControlPointMousedown)return;e.stopPropagation(),e.preventDefault();let{pos:t,startPoint:n,endPoint:r,targetIndex:i}=this.controlPointMousemoveState,[,,,o]=this.activeLine,a=[],{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=o.getData();s||(s=[]),s[i]=s[i]||{startPoint:n,endPoint:r},l?a=l:a[i]=pf(n,r);let c=null,u=null;"controlPoint1"===this.mousedownControlPointKey?(c={x:t.x-n.x,y:t.y-n.y},u=a[i][1],s[i].startPoint=n):(c=a[i][0],u={x:t.x-r.x,y:t.y-r.y},s[i].endPoint=r),a[i]=[c,u],this.mindMap.execCommand("SET_NODE_DATA",o,{associativeLineTargetControlOffsets:a,associativeLinePoint:s}),setTimeout(()=>{this.resetControlPoint()},0)}function xf(){this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""}}function kf(e,t,n,r){this.controlLine1||this.createControlNodes();let i=this.controlPointDiameter/2;this.controlLine1.plot(e.x,e.y,n.x,n.y),this.controlLine2.plot(t.x,t.y,r.x,r.y),this.controlPoint1.x(n.x-i).y(n.y-i),this.controlPoint2.x(r.x-i).y(r.y-i)}function Af(){this.controlLine1&&([this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.remove()}),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null)}function Cf(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.hide()})}function Ef(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.show()})}var Sf={createControlNodes:mf,createOneControlNode:gf,onControlPointMousedown:vf,onControlPointMousemove:bf,onControlPointMouseup:wf,resetControlPoint:xf,renderControls:kf,removeControls:Af,hideControls:Cf,showControls:Ef,updataAassociativeLine:yf};function Tf(e){let t=this.associativeLineDraw.group();const n=()=>{this.activeLine&&this.activeLine[3]===e.node&&this.activeLine[4]===e.toNode||this.setActiveLine({...e,text:t})};return t.click(e=>{e.stopPropagation(),n()}),t.on("dblclick",e=>{e.stopPropagation(),n(),this.activeLine&&this.showEditTextBox(t)}),t}function Nf(e){if(this.mindMap.emit("before_show_text_edit"),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.style.cssText="position:fixed;box-sizing: border-box;background-color:#fff;box-shadow: 0 0 20px rgba(0,0,0,.5);padding: 3px 5px;margin-left: -5px;margin-top: -3px;outline: none; word-break: break-all;",this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("click",e=>{e.stopPropagation()});const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.textEditNode)}let{associativeLineTextFontSize:t,associativeLineTextFontFamily:n,associativeLineTextLineHeight:r}=this.mindMap.themeConfig,{defaultAssociativeLineText:i,nodeTextEditZIndex:o}=this.mindMap.opt,a=this.mindMap.view.scale,[,,,s,l]=this.activeLine,c=this.getText(s,l),u=(c||i).split(/\n/gim);this.textEditNode.style.fontFamily=n,this.textEditNode.style.fontSize=t*a+"px",this.textEditNode.style.lineHeight=u.length>1?r:"normal",this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=u.join("
"),this.textEditNode.style.display="block",this.updateTextEditBoxPos(e),this.showTextEdit=!0,""===c||c===i?Object(v["Y"])(this.textEditNode):Object(v["q"])(this.textEditNode)}function Mf(){this.hideEditTextBox()}function Lf(e){let t=e.node.getBoundingClientRect();this.textEditNode&&(this.textEditNode.style.minWidth=t.width+10+"px",this.textEditNode.style.minHeight=t.height+6+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px")}function Of(){if(!this.showTextEdit)return;let[e,,t,n,r]=this.activeLine,i=Object(v["y"])(this.textEditNode.innerHTML),o=i===this.mindMap.opt.defaultAssociativeLineText;i=o?"":i,this.mindMap.execCommand("SET_NODE_DATA",n,{associativeLineText:{...n.getData("associativeLineText")||{},[r.getData("uid")]:i}}),this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.showTextEdit=!1,this.renderText(i,e,t),this.mindMap.emit("hide_text_edit")}function Df(e,t){let n=e.getData("associativeLineText");return n&&n[t.getData("uid")]||""}function Pf(e,t,n){if(!e)return;let{associativeLineTextFontSize:r,associativeLineTextLineHeight:i}=this.mindMap.themeConfig;n.clear();let o=e.split(/\n/gim);o.forEach((e,t)=>{let o=(new Cc).text(e);o.y(r*i*t),this.styleText(o),n.add(o)}),Rf(t,n)}function If(e){let{associativeLineTextColor:t,associativeLineTextFontSize:n,associativeLineTextFontFamily:r}=this.mindMap.themeConfig;e.fill({color:t}).css({"font-family":r,"font-size":n})}function Rf(e,t){let n=e.length(),r=e.pointAt(n/2),{width:i,height:o}=t.bbox();t.x(r.x-i/2),t.y(r.y-o/2)}var Ff={getText:Df,createText:Tf,styleText:If,onScale:Mf,showEditTextBox:Nf,hideEditTextBox:Of,updateTextEditBoxPos:Lf,renderText:Pf,updateTextPos:Rf};class zf{constructor(e={}){this.mindMap=e.mindMap,this.associativeLineDraw=this.mindMap.associativeLineDraw,this.lineList=[],this.activeLine=null,this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine=null,this.overlapNode=null,this.isNodeDragging=!1,this.markerPath=null,this.marker=this.createMarker(),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null,this.controlPointDiameter=10,this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""},this.checkOverlapNode=Object(v["cb"])(this.checkOverlapNode,100,this),Object.keys(Sf).forEach(e=>{this[e]=Sf[e].bind(this)}),Object.keys(Ff).forEach(e=>{this[e]=Ff[e].bind(this)}),this.bindEvent()}bindEvent(){this.renderAllLines=this.renderAllLines.bind(this),this.mindMap.on("node_tree_render_end",this.renderAllLines),this.mindMap.on("data_change",this.renderAllLines),this.mindMap.on("draw_click",()=>{this.isControlPointMousedown||this.clearActiveLine()}),this.mindMap.on("node_click",e=>{this.isCreatingLine?this.completeCreateLine(e):this.clearActiveLine()}),this.mindMap.keyCommand.addShortcut("Del|Backspace",this.removeLine.bind(this)),this.mindMap.command.add("ADD_ASSOCIATIVE_LINE",this.addLine.bind(this)),this.mindMap.on("mousemove",this.onMousemove.bind(this)),this.mindMap.on("node_dragging",this.onNodeDragging.bind(this)),this.mindMap.on("node_dragend",this.onNodeDragend.bind(this)),this.mindMap.on("mouseup",this.onControlPointMouseup.bind(this)),this.mindMap.on("scale",this.onScale)}createMarker(){return this.associativeLineDraw.marker(20,20,e=>{e.ref(12,5),e.size(10,10),e.attr("orient","auto-start-reverse"),this.markerPath=e.path("M0,0 L2,5 L0,10 L10,5 Z")})}updateAllLinesPos(e,t,n){n=n||{};let[r,i]=df(e,t),o=0,a="",s=0,l="";return n.startPoint&&(o=n.startPoint.range||0,a=n.startPoint.dir||"right",r=hf(e,a,o)),n.endPoint&&(s=n.endPoint.range||0,l=n.endPoint.dir||"right",i=hf(t,l,s)),[r,i]}renderAllLines(){this.removeAllLines(),this.removeControls(),this.clearActiveLine();let e=this.mindMap.renderer.root;if(!e)return;let t=new Map,n=new Map;Object(v["db"])(e,null,e=>{if(!e)return;let r=e.getData();r.associativeLineTargets&&r.associativeLineTargets.length>0&&n.set(e,r.associativeLineTargets),r.uid&&t.set(r.uid,e)},()=>{},!0,0),n.forEach((e,n)=>{e.forEach((e,r)=>{let i=t.get(e);if(!n||!i)return;const o=(n.getData("associativeLinePoint")||[])[r],[a,s]=this.updateAllLinesPos(n,i,o);this.drawLine(a,s,n,i)})})}drawLine(e,t,n,r){let{associativeLineWidth:i,associativeLineColor:o,associativeLineActiveWidth:a,associativeLineActiveColor:s}=this.mindMap.themeConfig;this.markerPath.stroke({color:o}).fill({color:o});let{path:l,controlPoints:c}=ff(e,t,n,r),u=this.associativeLineDraw.path();u.stroke({width:i,color:o,dasharray:[6,4]}).fill({color:"none"}),u.plot(l),u.marker("end",this.marker);let h=this.associativeLineDraw.path();h.stroke({width:a,color:"transparent"}).fill({color:"none"}),h.plot(l);let d=this.createText({path:u,clickPath:h,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:c});h.click(i=>{i.stopPropagation(),this.setActiveLine({path:u,clickPath:h,text:d,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:c})}),h.dblclick(()=>{this.activeLine&&this.showEditTextBox(d)}),this.renderText(this.getText(n,r),u,d),this.lineList.push([u,h,d,n,r])}setActiveLine({path:e,clickPath:t,text:n,node:r,toNode:i,startPoint:o,endPoint:a,controlPoints:s}){let{associativeLineActiveColor:l}=this.mindMap.themeConfig;this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.clearActiveLine(),this.activeLine=[e,t,n,r,i],t.stroke({color:l}),this.getText(r,i)||this.renderText(this.mindMap.opt.defaultAssociativeLineText,e,n),this.renderControls(o,a,s[0],s[1]),this.mindMap.emit("associative_line_click",e,t,r,i),this.front()}removeAllLines(){this.lineList.forEach(e=>{e[0].remove(),e[1].remove(),e[2].remove()}),this.lineList=[]}createLineFromActiveNode(){if(this.mindMap.renderer.activeNodeList.length<=0)return;let e=this.mindMap.renderer.activeNodeList[0];this.createLine(e)}createLine(e){let{associativeLineWidth:t,associativeLineColor:n}=this.mindMap.themeConfig;!this.isCreatingLine&&e&&(this.front(),this.isCreatingLine=!0,this.creatingStartNode=e,this.creatingLine=this.associativeLineDraw.path(),this.creatingLine.stroke({width:t,color:n,dasharray:[6,4]}).fill({color:"none"}),this.creatingLine.marker("end",this.marker))}onMousemove(e){this.onControlPointMousemove(e),this.updateCreatingLine(e)}updateCreatingLine(e){if(!this.isCreatingLine)return;let{x:t,y:n}=this.getTransformedEventPos(e),r=hf(this.creatingStartNode),i=t>r.x?-10:10,o=cf(r.x,r.y,t+i,n);this.creatingLine.plot(o),this.checkOverlapNode(t,n)}getTransformedEventPos(e){let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY),{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.mindMap.draw.transform();return{x:(t-o)/r,y:(n-a)/i}}getNodePos(e){const{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:o,top:a,width:s,height:l}=e;let c=o*t+r,u=a*n+i;return{left:o,top:a,translateLeft:c,translateTop:u,width:s,height:l}}checkOverlapNode(e,t){this.overlapNode=null,Object(v["d"])(this.mindMap.renderer.root,n=>{if(n.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",n,!1),n.uid===this.creatingStartNode.uid||this.overlapNode)return;let{left:r,top:i,width:o,height:a}=n,s=r+o,l=i+a;e>=r&&e<=s&&t>=i&&t<=l&&(this.overlapNode=n)}),this.overlapNode&&!this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)}completeCreateLine(e){this.creatingStartNode.uid!==e.uid&&(this.addLine(this.creatingStartNode,e),this.overlapNode&&this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!1),this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine.remove(),this.creatingLine=null,this.overlapNode=null,this.back())}addLine(e,t){if(!e||!t)return;let n=t.getData("uid");n||(n=Object(rf["a"])(),this.mindMap.execCommand("SET_NODE_DATA",t,{uid:n}));let r=e.getData("associativeLineTargets")||[];const i=r.some(e=>e===n);if(i)return;r.push(n);let[o,a]=df(e,t),s=af(o.x,o.y,a.x,a.y),l=e.getData("associativeLineTargetControlOffsets")||[];l[r.length-1]=[{x:s[0].x-o.x,y:s[0].y-o.y},{x:s[1].x-a.x,y:s[1].y-a.y}];let c=e.getData("associativeLinePoint")||[];c[r.length-1]={startPoint:o,endPoint:a},this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:r,associativeLineTargetControlOffsets:l,associativeLinePoint:c})}removeLine(){if(!this.activeLine)return;let[,,,e,t]=this.activeLine;this.removeControls();let{associativeLineTargets:n,associativeLinePoint:r,associativeLineTargetControlOffsets:i,associativeLineText:o}=e.getData();r=r||[];let a=of(e,t),s={};o&&Object.keys(o).forEach(e=>{e!==t.getData("uid")&&(s[e]=o[e])}),this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:n.filter((e,t)=>t!==a),associativeLinePoint:r.filter((e,t)=>t!==a),associativeLineTargetControlOffsets:i?i.filter((e,t)=>t!==a):[],associativeLineText:s})}clearActiveLine(){if(this.activeLine){let[,e,t,n,r]=this.activeLine;e.stroke({color:"transparent"}),this.hideEditTextBox(),this.getText(n,r)||t.clear(),this.activeLine=null,this.removeControls(),this.back()}}onNodeDragging(){this.isNodeDragging||(this.isNodeDragging=!0,this.lineList.forEach(e=>{e[0].hide(),e[1].hide(),e[2].hide()}),this.hideControls())}onNodeDragend(){this.isNodeDragging&&(this.lineList.forEach(e=>{e[0].show(),e[1].show(),e[2].show()}),this.showControls(),this.isNodeDragging=!1)}front(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||this.associativeLineDraw.front()}back(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||(this.associativeLineDraw.back(),this.associativeLineDraw.forward())}}zf.instanceName="associativeLine";var Bf=zf;class _f{constructor({mindMap:e}){this.mindMap=e,this.touchesNum=0,this.singleTouchstartEvent=null,this.clickNum=0,this.touchStartScaleView=null,this.bindEvent()}bindEvent(){this.onTouchstart=this.onTouchstart.bind(this),this.onTouchmove=this.onTouchmove.bind(this),this.onTouchcancel=this.onTouchcancel.bind(this),this.onTouchend=this.onTouchend.bind(this),window.addEventListener("touchstart",this.onTouchstart),window.addEventListener("touchmove",this.onTouchmove),window.addEventListener("touchcancel",this.onTouchcancel),window.addEventListener("touchend",this.onTouchend)}unBindEvent(){window.removeEventListener("touchstart",this.onTouchstart),window.removeEventListener("touchmove",this.onTouchmove),window.removeEventListener("touchcancel",this.onTouchcancel),window.removeEventListener("touchend",this.onTouchend)}onTouchstart(e){if(this.touchesNum=e.touches.length,this.touchStartScaleView=null,1===this.touchesNum){let t=e.touches[0];this.singleTouchstartEvent=t,this.dispatchMouseEvent("mousedown",t.target,t)}}onTouchmove(e){let t=e.touches.length;if(1===t){let t=e.touches[0];this.dispatchMouseEvent("mousemove",t.target,t)}else if(2===t){if(this.mindMap.opt.disableTouchZoom)return;let t=e.touches[0],n=e.touches[1],r=t.clientX-n.clientX,i=t.clientY-n.clientY,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),{x:a,y:s}=this.mindMap.toPos(t.clientX,t.clientY),{x:l,y:c}=this.mindMap.toPos(n.clientX,n.clientY),u=(a+l)/2,h=(s+c)/2;const d=this.mindMap.view;if(!this.touchStartScaleView)return void(this.touchStartScaleView={distance:o,scale:d.scale,x:d.x,y:d.y,cx:u,cy:h});const f=this.touchStartScaleView;let p=f.scale*(o/f.distance);Math.abs(o-f.distance)<=10&&(p=f.scale);const m=1-p/f.scale;d.scale=p<.1?.1:p,d.x=f.x+(u-f.x)*m+(u-f.cx)*p,d.y=f.y+(h-f.y)*m+(h-f.cy)*p,d.transform(),this.mindMap.emit("scale",p)}}onTouchcancel(e){}onTouchend(e){if(this.dispatchMouseEvent("mouseup",e.target),1===this.touchesNum){this.clickNum++,setTimeout(()=>{this.clickNum=0},300);let e=this.singleTouchstartEvent;this.clickNum>1&&(this.clickNum=0,this.dispatchMouseEvent("dblclick",e.target,e))}this.touchesNum=0,this.singleTouchstartEvent=null,this.touchStartScaleView=null}dispatchMouseEvent(e,t,n){let r={};n&&(r={screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,which:1});let i=new MouseEvent(e,{view:window,bubbles:!0,cancelable:!0,...r});t.dispatchEvent(i)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}_f.instanceName="touchEvent";var jf=_f;class Hf{constructor({mindMap:e}){this.mindMap=e,this.resizeBtnSize=26,this.handleEl=null,this.isShowHandleEl=!1,this.node=null,this.img=null,this.rect=null,this.isMousedown=!1,this.currentImgWidth=0,this.currentImgHeight=0,this.isAdjusted=!1,this.bindEvent()}bindEvent(){this.onNodeImgMouseleave=this.onNodeImgMouseleave.bind(this),this.onNodeImgMousemove=this.onNodeImgMousemove.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onRenderEnd=this.onRenderEnd.bind(this),this.mindMap.on("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.on("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.onRenderEnd)}unBindEvent(){this.mindMap.off("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.off("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.onRenderEnd)}onNodeImgMousemove(e,t){this.isMousedown||this.isAdjusted||this.mindMap.opt.readonly||this.node&&this.node.uid===e.uid&&this.isShowHandleEl||(this.node=e,this.img=t,this.rect=this.img.rbox(),this.showHandleEl())}onNodeImgMouseleave(){this.isMousedown||this.hideHandleEl()}hideNodeImage(){this.img&&this.img.hide()}showNodeImage(){this.img&&this.img.show()}showHandleEl(){this.handleEl||this.createResizeBtnEl(),this.setHandleElRect(),this.handleEl.style.display="block",this.isShowHandleEl=!0}hideHandleEl(){this.isShowHandleEl&&(this.isShowHandleEl=!1,this.handleEl.style.display="none",this.handleEl.style.backgroundImage="",this.handleEl.style.width=0,this.handleEl.style.height=0,this.handleEl.style.left=0,this.handleEl.style.top=0)}setHandleElRect(){let{width:e,height:t,x:n,y:r}=this.rect;this.handleEl.style.left=n+"px",this.handleEl.style.top=r+"px",this.currentImgWidth=e,this.currentImgHeight=t,this.updateHandleElSize()}updateHandleElSize(){this.handleEl.style.width=this.currentImgWidth+"px",this.handleEl.style.height=this.currentImgHeight+"px"}createResizeBtnEl(){this.handleEl=document.createElement("div"),this.handleEl.style.cssText="\n pointer-events: none;\n position: fixed;\n\t display:none;\n background-size: cover;\n ",this.handleEl.className="node-img-handle";const e=document.createElement("div");e.innerHTML=mu.imgAdjust,e.style.cssText=`\n position: absolute;\n right: 0;\n bottom: 0;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: nwse-resize;\n `,e.className="node-image-resize",e.addEventListener("mouseenter",()=>{this.showHandleEl()}),e.addEventListener("mouseleave",()=>{this.isMousedown||this.hideHandleEl()}),e.addEventListener("mousedown",e=>{e.stopPropagation(),this.onMousedown(e)}),e.addEventListener("mouseup",e=>{setTimeout(()=>{this.hideHandleEl(),this.isAdjusted=!1},0)}),e.addEventListener("click",e=>{e.stopPropagation()}),this.handleEl.appendChild(e);const t=document.createElement("div");this.handleEl.prepend(t),t.className="node-image-remove",t.innerHTML=mu.remove,t.style.cssText=`\n position: absolute;\n right: 0;top:0;color:#fff;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n `,t.addEventListener("mouseenter",e=>{this.showHandleEl()}),t.addEventListener("mouseleave",e=>{this.isMousedown||this.hideHandleEl()}),t.addEventListener("click",e=>{this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:null})});const n=this.mindMap.opt.customInnerElsAppendTo||document.body;n.appendChild(this.handleEl)}onMousedown(){this.isMousedown=!0,this.hideNodeImage(),this.handleEl.style.backgroundImage=`url(${this.node.getData("image")})`}onMousemove(e){if(!this.isMousedown)return;e.preventDefault();let{width:t,height:n}=this.node.getData("imageSize"),r=e.clientX-this.rect.x,i=e.clientY-this.rect.y;if(r<=0||i<=0)return;let[o,a]=Object(v["X"])(t,n,r,i);this.currentImgWidth=o,this.currentImgHeight=a,this.updateHandleElSize()}onMouseup(){if(!this.isMousedown)return;this.showNodeImage(),this.hideHandleEl();let{image:e,imageTitle:t}=this.node.getData(),{scaleX:n,scaleY:r}=this.mindMap.draw.transform();this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:e,title:t,width:this.currentImgWidth/n,height:this.currentImgHeight/r,custom:!0}),this.isAdjusted=!0,this.isMousedown=!1}onRenderEnd(){this.isAdjusted?this.isAdjusted=!1:this.hideHandleEl()}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Hf.instanceName="nodeImgAdjust";var Uf=Hf;n("532c");class qf{constructor({mindMap:e}){this.mindMap=e,this.isSearching=!1,this.searchText="",this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isJumpNext=!1,this.onDataChange=this.onDataChange.bind(this),this.mindMap.on("data_change",this.onDataChange)}onDataChange(){if(this.isJumpNext)return this.isJumpNext=!1,void this.search(this.searchText);this.notResetSearchText?this.notResetSearchText=!1:this.searchText=""}search(e,t=(()=>{})){if(Object(v["I"])(e))return this.endSearch();e=String(e),this.isSearching=!0,this.searchText===e||(this.searchText=e,this.doSearch()),this.searchNext(t),this.emitEvent()}endSearch(){this.isSearching&&(this.searchText="",this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isSearching=!1,this.mindMap.opt.readonly&&this.mindMap.renderer.closeHighlightNode(),this.emitEvent())}doSearch(){this.matchNodeList=[],this.currentIndex=-1,Object(v["d"])(this.mindMap.renderer.root,e=>{let{richText:t,text:n}=e.getData();t&&(n=Object(v["z"])(n)),n.includes(this.searchText)&&this.matchNodeList.push(e)})}searchNext(e){if(!this.isSearching||this.matchNodeList.length<=0)return;this.currentIndex{this.notResetSearchText=!1,e(),this.mindMap.opt.readonly&&this.mindMap.renderer.highlightNode(t)})}replace(e,t=!1){if(null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0)return;this.isJumpNext=t,e=String(e);let n=this.matchNodeList[this.currentIndex];if(!n)return;let r=this.getReplacedText(n,this.searchText,e);this.notResetSearchText=!0,n.setText(r,n.getData("richText"),!0),this.matchNodeList=this.matchNodeList.filter(e=>n!==e),this.currentIndex>this.matchNodeList.length-1?this.currentIndex=-1:this.currentIndex--,this.emitEvent()}replaceAll(e){null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0||(e=String(e),this.matchNodeList.forEach(t=>{let n=this.getReplacedText(t,this.searchText,e);this.mindMap.renderer.setNodeDataRender(t,{text:n,resetRichText:!!t.getData("richText")},!0)}),this.mindMap.render(),this.mindMap.command.addHistory(),this.endSearch())}getReplacedText(e,t,n){let{richText:r,text:i}=e.getData();return r?Object(v["V"])(i,t,n):i.replaceAll(t,n)}emitEvent(){this.mindMap.emit("search_info_change",{currentIndex:this.currentIndex,total:this.matchNodeList.length})}}qf.instanceName="search";var Gf=qf;class Wf{constructor({mindMap:e}){this.mindMap=e,this.isInPainter=!1,this.painterNode=null,this.bindEvent()}bindEvent(){this.painterOneNode=this.painterOneNode.bind(this),this.onEndPainter=this.onEndPainter.bind(this),this.mindMap.on("node_click",this.painterOneNode),this.mindMap.on("draw_click",this.onEndPainter)}unBindEvent(){this.mindMap.off("node_click",this.painterOneNode),this.mindMap.off("draw_click",this.onEndPainter)}startPainter(){if(this.mindMap.opt.readonly)return;let e=this.mindMap.renderer.activeNodeList;e.length<=0||(this.painterNode=e[0],this.isInPainter=!0,this.mindMap.emit("painter_start"))}endPainter(){this.painterNode=null,this.isInPainter=!1}onEndPainter(){this.isInPainter&&(this.endPainter(),this.mindMap.emit("painter_end"))}painterOneNode(e){if(!e||!this.isInPainter||!this.painterNode||!e||e.uid===this.painterNode.uid)return;const t={},n=this.painterNode.getData();Object.keys(n).forEach(e=>{Object(v["f"])(e)&&(t[e]=n[e])}),e.setStyles(t),n.activeStyle&&e.setStyles(n.activeStyle,!0)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Wf.instanceName="painter";var Vf=Wf;class Yf{constructor(e){this.mindMap=e.mindMap,this.scrollbarWrapSize={width:0,height:0},this.chartHeight=0,this.chartWidth=0,this.reset(),this.bindEvent()}reset(){this.currentScrollType="",this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.mousedownScrollbarPos=0}bindEvent(){this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.updateScrollbar=this.updateScrollbar.bind(this),this.updateScrollbar=Object(v["cb"])(this.updateScrollbar,16,this),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.updateScrollbar),this.mindMap.on("view_data_change",this.updateScrollbar)}unBindEvent(){this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.updateScrollbar),this.mindMap.off("view_data_change",this.updateScrollbar)}updateScrollbar(){if(this.isMousedown)return;const e=this.calculationScrollbar();this.emitEvent(e)}emitEvent(e){this.mindMap.emit("scrollbar_change",e)}setScrollBarWrapSize(e,t){this.scrollbarWrapSize.width=e,this.scrollbarWrapSize.height=t}calculationScrollbar(){const e=this.mindMap.draw.rbox(),t=this.mindMap.elRect;e.x-=t.left,e.y-=t.top;const n=this.mindMap.height,r=n/2,i=e.height+2*r;this.chartHeight=i;const o=e.y-r,a=Math.min(n/i*100,100);let s=-o/i*100;s<0&&(s=0),s>100-a&&(s=100-a);const l=this.mindMap.width,c=l/2,u=e.width+2*c;this.chartWidth=u;const h=e.x-c,d=Math.min(l/u*100,100);let f=-h/u*100;f<0&&(f=0),f>100-d&&(f=100-d);const p={vertical:{top:s,height:a},horizontal:{left:f,width:d}};return p}onMousedown(e,t){e.preventDefault(),e.stopPropagation(),this.currentScrollType=t,this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};const n=window.getComputedStyle(e.target);t===oo["a"].SCROLL_BAR_DIR.VERTICAL?this.mousedownScrollbarPos=Number.parseFloat(n.top):this.mousedownScrollbarPos=Number.parseFloat(n.left)}onMousemove(e){if(this.isMousedown)if(e.preventDefault(),e.stopPropagation(),this.currentScrollType===oo["a"].SCROLL_BAR_DIR.VERTICAL){const t=e.clientY-this.mousedownPos.y+this.mousedownScrollbarPos;this.updateMindMapView(oo["a"].SCROLL_BAR_DIR.VERTICAL,t)}else{const t=e.clientX-this.mousedownPos.x+this.mousedownScrollbarPos;this.updateMindMapView(oo["a"].SCROLL_BAR_DIR.HORIZONTAL,t)}}onMouseup(){this.isMousedown=!1,this.reset()}updateMindMapView(e,t){const n=this.calculationScrollbar(),r=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),o=this.mindMap.renderer.root.group.rbox();if(e===oo["a"].SCROLL_BAR_DIR.VERTICAL){let e=t;e<=0&&(e=0);let a=(100-n.vertical.height)/100*this.scrollbarWrapSize.height;e>=a&&(e=a);const s=e/this.scrollbarWrapSize.height*100,l=-s/100*this.chartHeight,c=o.y-i.y,u=this.mindMap.height/2;let h=l+c-u*r.scaleY+u;this.mindMap.view.translateYTo(h),this.emitEvent({horizontal:n.horizontal,vertical:{top:s,height:n.vertical.height}})}else{let e=t;e<=0&&(e=0);let a=(100-n.horizontal.width)/100*this.scrollbarWrapSize.width;e>=a&&(e=a);const s=e/this.scrollbarWrapSize.width*100,l=-s/100*this.chartWidth,c=o.x-i.x,u=this.mindMap.width/2;let h=l+c-u*r.scaleX+u;this.mindMap.view.translateXTo(h),this.emitEvent({vertical:n.vertical,horizontal:{left:s,width:n.horizontal.width}})}}onClick(e,t){let n=0;n=t===oo["a"].SCROLL_BAR_DIR.VERTICAL?e.clientY-e.currentTarget.getBoundingClientRect().top:e.clientX-e.currentTarget.getBoundingClientRect().left,this.updateMindMapView(t,n)}beforePluginDestroy(){this.unBindEvent()}}Yf.instanceName="scrollbar";var Zf=Yf,Kf=n("5703"),Xf=n.n(Kf);class Jf{constructor(e){this.opt=e,this.mindMap=e.mindMap,window.katex=Xf.a,this.extendQuill()}extendQuill(){const e=Kd.a.import("formats/formula");class t extends e{static create(e){let t=super.create(e);return"string"===typeof e&&(Xf.a.render(e,t,{throwOnError:!1,errorColor:"#f00",output:"mathml"}),t.setAttribute("data-value",e)),t}}Kd.a.register("formats/formula",t,!0)}insertFormulaToNode(e,t){let n=this.mindMap.richText;n.showEditText(e),n.quill.insertEmbed(n.quill.getLength()-1,"formula",t),n.setTextStyleIfNotRichText(n.node),n.hideEditText([e])}}Jf.instanceName="formula";var Qf=Jf,$f=n("4afd"),ep=n("0d93");class tp{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.ydoc=new $f["a"],this.ymap=null,this.provider=null,this.awareness=null,this.currentAwarenessData=[],this.waitNodeUidMap={},this.currentData=null,this.userInfo=null,this.bindEvent(),this.mindMap.opt.data&&this.initData(this.mindMap.opt.data)}initData(e){e=Object(v["ab"])(e),this.ymap&&this.ymap.unobserve(this.onObserve),this.ymap=this.ydoc.getMap(),this.currentData=this.transformTreeDataToObject(e),Object.keys(this.currentData).forEach(e=>{this.ymap.set(e,this.currentData[e])}),this.onObserve=this.onObserve.bind(this),this.ymap.observe(this.onObserve)}getDoc(){return this.ydoc}setProvider(e,t={}){const{roomName:n,signalingList:r,...i}=t;this.provider=e||new ep["a"](n,this.ydoc,{signaling:r,...i}),this.awareness=this.provider.awareness,this.onAwareness=this.onAwareness.bind(this),this.awareness.on("change",this.onAwareness)}bindEvent(){this.onDataChange=this.onDataChange.bind(this),this.mindMap.on("data_change",this.onDataChange),this.onNodeActive=this.onNodeActive.bind(this),this.mindMap.on("node_active",this.onNodeActive),this.onNodeTreeRenderEnd=this.onNodeTreeRenderEnd.bind(this),this.mindMap.on("node_tree_render_end",this.onNodeTreeRenderEnd),this.initData=this.initData.bind(this),this.mindMap.on("set_data",this.initData)}unBindEvent(){this.ymap&&this.ymap.unobserve(this.onObserve),this.mindMap.off("data_change",this.onDataChange),this.mindMap.off("node_active",this.onNodeActive),this.mindMap.off("node_tree_render_end",this.onNodeTreeRenderEnd),this.mindMap.off("set_data",this.initData),this.ydoc.destroy()}onObserve(e){const t=e.target.toJSON();if(Object(v["G"])(t,this.currentData))return;this.currentData=t;const n=this.transformObjectToTreeData(t);n&&(this.mindMap.renderer.setData(n),this.mindMap.render(),this.mindMap.command.addHistory())}onDataChange(e){const t=this.transformTreeDataToObject(e);this.updateChanges(t)}updateChanges(e){const t=this.currentData;this.currentData=e,this.ydoc.transact(()=>{Object.keys(e).forEach(n=>{t[n]&&Object(v["G"])(t[n],e[n])||this.ymap.set(n,e[n])}),Object.keys(t).forEach(t=>{e[t]||this.ymap.delete(t)})})}onNodeActive(e,t){this.userInfo&&this.awareness.setLocalStateField(this.userInfo.name,{userInfo:{...this.userInfo},nodeIdList:t.map(e=>e.uid)})}onNodeTreeRenderEnd(){Object.keys(this.waitNodeUidMap).forEach(e=>{const t=this.mindMap.renderer.findNodeByUid(e);t&&t.addUser(this.waitNodeUidMap[e])}),this.waitNodeUidMap={}}setUserInfo(e){"Object"!==Object(v["B"])(e)||Object(v["I"])(e.id)||Object(v["I"])(e.name)&&Object(v["I"])(e.avatar)||(this.userInfo=e||null)}onAwareness(){const e=(e,t)=>{e.forEach(e=>{const n=Object.keys(e)[0];if(!n)return;const r=e[n],i=r.userInfo,o=r.nodeIdList;o.forEach(e=>{const n=this.mindMap.renderer.findNodeByUid(e);t(e,n,i)})})};e(this.currentAwarenessData,(e,t,n)=>{t&&t.removeUser(n)});const t=Array.from(this.awareness.getStates().values());this.currentAwarenessData=t,e(t,(e,t,n)=>{n.id!==this.userInfo.id&&(t?t.addUser(n):this.waitNodeUidMap[e]=n)})}transformTreeDataToObject(e){const t={},n=(e,r)=>{const i=e.data.uid;r&&r.children.push(i),t[i]={isRoot:!r,data:{...e.data},children:[]},e.children&&e.children.length>0&&e.children.forEach(e=>{n(e,t[i])})};return n(e,null),t}findParentUid(e,t){const n=Object.keys(e);let r="";return n.forEach(n=>{const i=e[n].children,o=-1!==i.findIndex(e=>e===t);o&&(r=n)}),r}transformObjectToTreeData(e){const t=Object.keys(e);if(t.length<=0)return null;const n=t.find(t=>e[t].isRoot);if(!n||!e[n])return null;const r={data:Object(v["ab"])(e[n].data),children:[]},i={};return i[n]=r,t.forEach(t=>{const n=this.findParentUid(e,t),r=e[t],o=i[t]||{data:Object(v["ab"])(r.data),children:[]};if(i[t]||(i[t]=o),n){const r=e[n].children.findIndex(e=>e===t);i[n]||(i[n]={data:Object(v["ab"])(e[n].data),children:[]}),i[n].children[r]=o}}),r}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}tp.instanceName="cooperate";var np=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("outline.title")}},[t("div",{staticClass:"changeBtn",class:{isDark:e.isDark},on:{click:e.onChangeToOutlineEdit}},[t("span",{staticClass:"icon iconfont iconquanping1"})]),"outline"===e.activeSidebar?t("Outline",{attrs:{mindMap:e.mindMap},on:{scrollTo:e.onScrollTo}}):e._e()],1)},rp=[],ip=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarContainer",class:{show:e.show,isDark:e.isDark},style:{zIndex:e.zIndex},on:{click:function(e){e.stopPropagation()}}},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}}),e.title?t("div",{staticClass:"sidebarHeader"},[e._v(" "+e._s(e.title)+" ")]):e._e(),t("div",{ref:"sidebarContent",staticClass:"sidebarContent"},[e._t("default")],2)])},op=[],ap={name:"Sidebar",props:{title:{type:String,default:""}},data(){return{show:!1,zIndex:0}},computed:{...Object(se["d"])(["isDark"])},watch:{show(e,t){e&&!t&&(this.zIndex=ke.sidebarZIndex++)}},created(){this.$bus.$on("closeSideBar",this.handleCloseSidebar)},beforeDestroy(){this.$bus.$off("closeSideBar",this.handleCloseSidebar)},methods:{...Object(se["c"])(["setActiveSidebar"]),handleCloseSidebar(){this.close()},close(){this.show=!1,this.setActiveSidebar("")},getEl(){return this.$refs.sidebarContent}}},sp=ap,lp=(n("7b13"),Object(p["a"])(sp,ip,op,!1,null,"e9a8c6d4",null)),cp=lp.exports,up=function(){var e=this,t=e._self._c;return t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"current-change":e.onCurrentChange},nativeOn:{mouseenter:function(t){e.isInTreArea=!0},mouseleave:function(t){e.isInTreArea=!1}},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid},on:{click:function(t){return e.onClick(r)}}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},blur:function(t){return e.onBlur(t,n)},paste:function(t){return e.onPaste(t,n)}}})])}}])})},hp=[],dp=(n("5b81"),{name:"Outline",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null,notHandleDataChange:!1,isHandleNodeTreeRenderEnd:!1,beInsertNodeUid:"",insertType:"",isInTreArea:!1,isAfterCreateNewNode:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},created(){window.addEventListener("keydown",this.onKeyDown),this.$bus.$on("data_change",this.handleDataChange),this.$bus.$on("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$on("hide_text_edit",this.handleHideTextEdit)},mounted(){this.refresh()},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown),this.$bus.$off("data_change",this.handleDataChange),this.$bus.$off("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$off("hide_text_edit",this.handleHideTextEdit)},methods:{handleHideTextEdit(){this.notHandleDataChange&&(this.notHandleDataChange=!1,this.refresh())},handleDataChange(){this.notHandleDataChange?this.notHandleDataChange=!1:this.isAfterCreateNewNode?this.isAfterCreateNewNode=!1:this.refresh()},handleNodeTreeRenderEnd(){if(this.insertType)return this[this.insertType](),void(this.insertType="");this.isHandleNodeTreeRenderEnd&&(this.isHandleNodeTreeRenderEnd=!1,this.refresh(),this.$nextTick(()=>{this.afterCreateNewNode()}))},refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=(e.data.richText?Object(v["O"])(e.data.text):e.data.text).replaceAll(/\n/g,"
");n=Object(v["E"])(n),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},afterCreateNewNode(){let e=this.beInsertNodeUid;if(e&&this.$refs.tree)try{this.isAfterCreateNewNode=!0,this.$refs.tree.setCurrentKey(e);let t=this.$refs.tree.getNode(e);this.onCurrentChange(t.data),this.onClick(t.data);const n=document.querySelector(`.customNode[data-id="${e}"] .nodeEdit`);if(n){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(n),e.removeAllRanges(),e.addRange(t);let r=n.offsetTop;this.$emit("scrollTo",r)}}catch(t){console.log(t)}this.beInsertNodeUid=""},checkAllowDrag(e){return!e.data.root},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return void(this.insertType&&(this[this.insertType](),this.insertType=""));const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText,i=this.mindMap.renderer.findNodeByUid(t.data.uid);i&&(this.notHandleDataChange=!0,n?i.setText(Object(v["bb"])(r),!0,!0):i.setText(r))},onPaste(e){e.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument();let n=(e.clipboardData||window.clipboardData).getData("text");n=Object(v["z"])(n),n=n.replaceAll(/\n/g,"");const r=document.createTextNode(n);t.getRangeAt(0).insertNode(r),t.collapseToEnd()},getKey(){return Math.random()},onNodeInputKeydown(e){13!==e.keyCode||e.shiftKey||(e.preventDefault(),this.insertType="insertNode",e.target.blur()),9===e.keyCode&&(e.preventDefault(),this.insertType="insertChildNode",e.target.blur())},insertNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(v["m"])(),this.mindMap.execCommand("INSERT_NODE",!1,[],{uid:this.beInsertNodeUid})},insertChildNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(v["m"])(),this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{uid:this.beInsertNodeUid})},onClick(e){this.notHandleDataChange=!0;const t=this.mindMap.renderer.findNodeByUid(e.uid);t&&t.nodeData.data.isActive||this.mindMap.execCommand("GO_TARGET_NODE",e.uid,()=>{this.notHandleDataChange=!1})},onNodeDrop(e,t,n){this.notHandleDataChange=!0;const r=this.mindMap.renderer.findNodeByUid(e.data.uid),i=this.mindMap.renderer.findNodeByUid(t.data.uid);if(r&&i)switch(n){case"before":this.mindMap.execCommand("INSERT_BEFORE",r,i);break;case"after":this.mindMap.execCommand("INSERT_AFTER",r,i);break;case"inner":this.mindMap.execCommand("MOVE_NODE_TO",r,i);break;default:break}},onCurrentChange(e){this.currentData=e},onKeyDown(e){if(this.isInTreArea&&[46,8].includes(e.keyCode)&&this.currentData){e.stopPropagation(),this.mindMap.renderer.textEdit.hideEditTextBox();const t=this.mindMap.renderer.findNodeByUid(this.currentData.uid);t&&!t.isRoot&&(this.notHandleDataChange=!0,this.$refs.tree.remove(this.currentData),this.mindMap.execCommand("REMOVE_NODE",[t]))}}}}),fp=dp,pp=(n("5ee0"),Object(p["a"])(fp,up,hp,!1,null,"887458fa",null)),mp=pp.exports,gp={name:"OutlineSidebar",components:{Sidebar:cp,Outline:mp},props:{mindMap:{type:Object}},computed:{...Object(se["d"])(["activeSidebar","isOutlineEdit","isDark"])},watch:{activeSidebar(e){this.$refs.sidebar.show="outline"===e}},methods:{...Object(se["c"])(["setIsOutlineEdit","setActiveSidebar"]),onChangeToOutlineEdit(){this.setActiveSidebar(""),this.setIsOutlineEdit(!0)},onScrollTo(e){let t=this.$refs.sidebar.getEl(),n=t.offsetHeight,r=t.scrollTop;e>r+n&&t.scrollTo(0,e-n/2)}}},vp=gp,bp=(n("02c6"),Object(p["a"])(vp,np,rp,!1,null,"8cff0f40",null)),yp=bp.exports,wp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("style.title")}},[e.activeNodes.length>0?t("div",{staticClass:"styleBox",class:{isDark:e.isDark}},[t("div",{staticClass:"sidebarContent"},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.text")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontFamily")}},model:{value:e.style.fontFamily,callback:function(t){e.$set(e.style,"fontFamily",t)},expression:"style.fontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontSize")}},model:{value:e.style.fontSize,callback:function(t){e.$set(e.style,"fontSize",t)},expression:"style.fontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.lineHeight")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineHeight")}},model:{value:e.style.lineHeight,callback:function(t){e.$set(e.style,"lineHeight",t)},expression:"style.lineHeight"}},e._l(e.lineHeightList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"btnGroup"},[t("el-tooltip",{attrs:{content:e.$t("style.color"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"styleBtn"},[e._v(" A "),t("span",{staticClass:"colorShow",style:{backgroundColor:e.style.color||"#eee"}})])]),t("el-tooltip",{attrs:{content:e.$t("style.addFontWeight"),placement:"bottom"}},[t("div",{staticClass:"styleBtn",class:{actived:"bold"===e.style.fontWeight},on:{click:e.toggleFontWeight}},[e._v(" B ")])]),t("el-tooltip",{attrs:{content:e.$t("style.italic"),placement:"bottom"}},[t("div",{staticClass:"styleBtn i",class:{actived:"italic"===e.style.fontStyle},on:{click:e.toggleFontStyle}},[e._v(" I ")])]),t("el-tooltip",{attrs:{content:e.$t("style.textDecoration"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"styleBtn u",style:{textDecoration:e.style.textDecoration||"none"}},[e._v(" U ")])])],1),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.color},on:{change:e.changeFontColor}})],1),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"hover"}},[t("el-radio-group",{attrs:{size:"mini"},on:{change:function(t){return e.update("textDecoration")}},model:{value:e.style.textDecoration,callback:function(t){e.$set(e.style,"textDecoration",t)},expression:"style.textDecoration"}},[t("el-radio-button",{attrs:{label:"none"}},[e._v(e._s(e.$t("style.none")))]),t("el-radio-button",{attrs:{label:"underline"}},[e._v(e._s(e.$t("style.underline")))]),t("el-radio-button",{attrs:{label:"line-through"}},[e._v(e._s(e.$t("style.lineThrough")))]),t("el-radio-button",{attrs:{label:"overline"}},[e._v(e._s(e.$t("style.overline")))])],1)],1)],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.border")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.borderColor}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.borderColor},on:{change:e.changeBorderColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderDasharray")}},model:{value:e.style.borderDasharray,callback:function(t){e.$set(e.style,"borderDasharray",t)},expression:"style.borderDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.borderDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderWidth")}},model:{value:e.style.borderWidth,callback:function(t){e.$set(e.style,"borderWidth",t)},expression:"style.borderWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"rectangle"===e.style.shape,expression:"style.shape === 'rectangle'"}],staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.borderRadius")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderRadius")}},model:{value:e.style.borderRadius,callback:function(t){e.$set(e.style,"borderRadius",t)},expression:"style.borderRadius"}},e._l(e.borderRadiusList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.background")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.fillColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.fillColor},on:{change:e.changeFillColor}})],1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.shape")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.shape")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("shape")}},model:{value:e.style.shape,callback:function(t){e.$set(e.style,"shape",t)},expression:"style.shape"}},e._l(e.shapeList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{staticStyle:{"margin-top":"5px"},attrs:{width:"60",height:"26"}},[t("path",{attrs:{d:e.shapeListMap[n.value],fill:"none",stroke:e.style.shape===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-width":"2"}})])])})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:e.changeLineColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineDasharray")}},model:{value:e.style.lineDasharray,callback:function(t){e.$set(e.style,"lineDasharray",t)},expression:"style.lineDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.lineDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineWidth")}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingX")}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingY")}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)])])]):t("div",{staticClass:"tipBox"},[t("div",{staticClass:"tipIcon iconfont icontianjiazijiedian"}),t("div",{staticClass:"tipText"},[e._v("请选择一个节点")])])])},xp=[],kp=function(){var e=this,t=e._self._c;return t("div",{staticClass:"colorContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"colorList"},e._l(e.colorList,(function(n){return t("span",{key:n,staticClass:"colorItem iconfont",class:{icontouming:"transparent"===n},style:{backgroundColor:n},on:{click:function(t){return e.clickColorItem(n)}}})})),0),t("div",{staticClass:"moreColor"},[t("span",[e._v(e._s(e.$t("color.moreColor")))]),t("el-color-picker",{attrs:{size:"mini"},on:{change:e.changeColor},model:{value:e.selectColor,callback:function(t){e.selectColor=t},expression:"selectColor"}})],1)])},Ap=[],Cp={name:"Color",props:{color:{type:String,default:""}},data(){return{colorList:he,selectColor:""}},computed:{...Object(se["d"])(["isDark"])},watch:{color(){this.selectColor=this.color}},created(){this.selectColor=this.color},methods:{clickColorItem(e){this.$emit("change",e)},changeColor(){this.$emit("change",this.selectColor)}}},Ep=Cp,Sp=(n("ce80"),Object(p["a"])(Ep,kp,Ap,!1,null,"530a160f",null)),Tp=Sp.exports,Np={name:"Style",components:{Sidebar:cp,Color:Tp},data(){return{fontSizeList:ce,borderWidthList:de,borderRadiusList:pe,lineHeightList:ue,activeNodes:[],style:{shape:"",paddingX:0,paddingY:0,color:"",fontFamily:"",fontSize:"",lineHeight:"",textDecoration:"",fontWeight:"",fontStyle:"",borderWidth:"",borderColor:"",fillColor:"",borderDasharray:"",borderRadius:"",lineColor:"",lineDasharray:"",lineWidth:""}}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),fontFamilyList(){return je[this.$i18n.locale]||je.zh},borderDasharrayList(){return He[this.$i18n.locale]||He.zh},shapeList(){return Ke[this.$i18n.locale]||Ke.zh},shapeListMap(){return Xe[this.$i18n.locale]||Xe.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeStyle"===e}},created(){this.$bus.$on("node_active",this.onNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.onNodeActive)},methods:{onNodeActive(...e){this.$nextTick(()=>{this.activeNodes=[...e[1]],this.initNodeStyle()})},initNodeStyle(){this.activeNodes.length<=0||["shape","paddingX","paddingY","color","fontFamily","fontSize","lineHeight","textDecoration","fontWeight","fontStyle","borderWidth","borderColor","fillColor","borderDasharray","borderRadius","lineColor","lineDasharray","lineWidth"].forEach(e=>{this.style[e]=this.activeNodes[0].getStyle(e,!1)})},update(e){this.activeNodes.forEach(t=>{t.setStyle(e,this.style[e])})},toggleFontWeight(){"bold"===this.style.fontWeight?this.style.fontWeight="normal":this.style.fontWeight="bold",this.update("fontWeight")},toggleFontStyle(){"italic"===this.style.fontStyle?this.style.fontStyle="normal":this.style.fontStyle="italic",this.update("fontStyle")},changeFontColor(e){this.style.color=e,this.update("color")},changeBorderColor(e){this.style.borderColor=e,this.update("borderColor")},changeLineColor(e){this.style.lineColor=e,this.update("lineColor")},changeFillColor(e){this.style.fillColor=e,this.update("fillColor")}}},Mp=Np,Lp=(n("1ab0"),n("71e2"),Object(p["a"])(Mp,wp,xp,!1,null,"4a300153",null)),Op=Lp.exports,Dp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("baseStyle.title")}},[e.data?t("div",{staticClass:"sidebarContent",class:{isDark:e.isDark}},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.background")))]),t("div",{staticClass:"row"},[t("el-tabs",{staticClass:"tab",model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.color"),name:"color"}},[t("Color",{attrs:{color:e.style.backgroundColor},on:{change:t=>{e.update("backgroundColor",t)}}})],1),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.image"),name:"image"}},[t("ImgUpload",{staticClass:"imgUpload",on:{change:t=>{e.update("backgroundImage",t)}},model:{value:e.style.backgroundImage,callback:function(t){e.$set(e.style,"backgroundImage",t)},expression:"style.backgroundImage"}}),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageRepeat")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundRepeat",t)}},model:{value:e.style.backgroundRepeat,callback:function(t){e.$set(e.style,"backgroundRepeat",t)},expression:"style.backgroundRepeat"}},e._l(e.backgroundRepeatList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imagePosition")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundPosition",t)}},model:{value:e.style.backgroundPosition,callback:function(t){e.$set(e.style,"backgroundPosition",t)},expression:"style.backgroundPosition"}},e._l(e.backgroundPositionList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageSize")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundSize",t)}},model:{value:e.style.backgroundSize,callback:function(t){e.$set(e.style,"backgroundSize",t)},expression:"style.backgroundSize"}},e._l(e.backgroundSizeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)],1)],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"block",style:{backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:t=>{e.update("lineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineWidth",t)}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineStyle",t)}},model:{value:e.style.lineStyle,callback:function(t){e.$set(e.style,"lineStyle",t)},expression:"style.lineStyle"}},e._l(e.lineStyleList,(function(n){return t("el-option",{key:n.value,staticClass:"lineStyleOption",class:{isDark:e.isDark,isSelected:e.style.lineStyle===n.value},attrs:{label:n.name,value:n.value},domProps:{innerHTML:e._s(e.lineStyleMap[n.value])}})})),1)],1),"curve"===e.style.lineStyle?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.rootStyle")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("rootLineKeepSameInCurve",t)}},model:{value:e.style.rootLineKeepSameInCurve,callback:function(t){e.$set(e.style,"rootLineKeepSameInCurve",t)},expression:"style.rootLineKeepSameInCurve"}},e._l(e.rootLineKeepSameInCurveList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1):e._e()]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.lineOfOutline")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"block",style:{backgroundColor:e.style.generalizationLineColor}}),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.generalizationLineColor},on:{change:t=>{e.update("generalizationLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("generalizationLineWidth",t)}},model:{value:e.style.generalizationLineWidth,callback:function(t){e.$set(e.style,"generalizationLineWidth",t)},expression:"style.generalizationLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLine")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineColor},on:{change:t=>{e.update("associativeLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineWidth",t)}},model:{value:e.style.associativeLineWidth,callback:function(t){e.$set(e.style,"associativeLineWidth",t)},expression:"style.associativeLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineActiveColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineActiveColor},on:{change:t=>{e.update("associativeLineActiveColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineActiveWidth",t)}},model:{value:e.style.associativeLineActiveWidth,callback:function(t){e.$set(e.style,"associativeLineActiveWidth",t)},expression:"style.associativeLineActiveWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLineText")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontFamily",t)}},model:{value:e.style.associativeLineTextFontFamily,callback:function(t){e.$set(e.style,"associativeLineTextFontFamily",t)},expression:"style.associativeLineTextFontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover6",arg:"popover6"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineTextColor}}),t("el-popover",{ref:"popover6",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineTextColor},on:{change:t=>{e.update("associativeLineTextColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontSize",t)}},model:{value:e.style.associativeLineTextFontSize,callback:function(t){e.$set(e.style,"associativeLineTextFontSize",t)},expression:"style.associativeLineTextFontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeBorderType")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.update("nodeUseLineStyle",t)}},model:{value:e.style.nodeUseLineStyle,callback:function(t){e.$set(e.style,"nodeUseLineStyle",t)},expression:"style.nodeUseLineStyle"}},[e._v(e._s(e.$t("baseStyle.nodeUseLineStyle")))])],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingX",t)}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingY",t)}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.image")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumWidth")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxWidth",t)}},model:{value:e.style.imgMaxWidth,callback:function(t){e.$set(e.style,"imgMaxWidth",t)},expression:"style.imgMaxWidth"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumHeight")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxHeight",t)}},model:{value:e.style.imgMaxHeight,callback:function(t){e.$set(e.style,"imgMaxHeight",t)},expression:"style.imgMaxHeight"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.icon")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.size")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{min:12,max:50},on:{change:t=>{e.update("iconSize",t)}},model:{value:e.style.iconSize,callback:function(t){e.$set(e.style,"iconSize",t)},expression:"style.iconSize"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeMargin")))]),t("div",{staticClass:"row column"},[t("el-tabs",{staticClass:"tab",on:{"tab-click":e.initMarginStyle},model:{value:e.marginActiveTab,callback:function(t){e.marginActiveTab=t},expression:"marginActiveTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.level2Node"),name:"second"}}),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.belowLevel2Node"),name:"node"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginX",t)}},model:{value:e.style.marginX,callback:function(t){e.$set(e.style,"marginX",t)},expression:"style.marginX"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginY",t)}},model:{value:e.style.marginY,callback:function(t){e.$set(e.style,"marginY",t)},expression:"style.marginY"}})],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.watermark")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.watermarkShowChange},model:{value:e.watermarkConfig.show,callback:function(t){e.$set(e.watermarkConfig,"show",t)},expression:"watermarkConfig.show"}},[e._v(e._s(e.$t("baseStyle.showWatermark")))])],1)]),e.watermarkConfig.show?[t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkText")))]),t("el-input",{attrs:{size:"small"},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.text,callback:function(t){e.$set(e.watermarkConfig,"text",t)},expression:"watermarkConfig.text"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{backgroundColor:e.watermarkConfig.textStyle.color}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.watermarkConfig.textStyle.color},on:{change:t=>{e.watermarkConfig.textStyle.color=t,e.updateWatermarkConfig()}}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextOpacity")))]),t("el-slider",{staticStyle:{width:"170px"},attrs:{min:0,max:1,step:.1},on:{change:e.updateWatermarkConfig},model:{value:e.watermarkConfig.textStyle.opacity,callback:function(t){e.$set(e.watermarkConfig.textStyle,"opacity",t)},expression:"watermarkConfig.textStyle.opacity"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextFontSize")))]),t("el-input-number",{attrs:{size:"small",min:0,max:50,step:1},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textStyle.fontSize,callback:function(t){e.$set(e.watermarkConfig.textStyle,"fontSize",t)},expression:"watermarkConfig.textStyle.fontSize"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkAngle")))]),t("el-input-number",{attrs:{size:"small",min:0,max:90,step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.angle,callback:function(t){e.$set(e.watermarkConfig,"angle",t)},expression:"watermarkConfig.angle"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkLineSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.lineSpacing,callback:function(t){e.$set(e.watermarkConfig,"lineSpacing",t)},expression:"watermarkConfig.lineSpacing"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textSpacing,callback:function(t){e.$set(e.watermarkConfig,"textSpacing",t)},expression:"watermarkConfig.textSpacing"}})],1)])]:e._e(),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.otherConfig")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.updateOtherConfig("enableFreeDrag",t)}},model:{value:e.config.enableFreeDrag,callback:function(t){e.$set(e.config,"enableFreeDrag",t)},expression:"config.enableFreeDrag"}},[e._v(e._s(e.$t("baseStyle.enableFreeDrag")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.enableNodeRichTextChange},model:{value:e.enableNodeRichText,callback:function(t){e.enableNodeRichText=t},expression:"enableNodeRichText"}},[e._v(e._s(e.$t("baseStyle.isEnableNodeRichText")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelAction")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelAction",t)}},model:{value:e.config.mousewheelAction,callback:function(t){e.$set(e.config,"mousewheelAction",t)},expression:"config.mousewheelAction"}},[t("el-option",{attrs:{label:e.$t("baseStyle.zoomView"),value:"zoom"}}),t("el-option",{attrs:{label:e.$t("baseStyle.moveViewUpDown"),value:"move"}})],1)],1)]),"zoom"===e.config.mousewheelAction?t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelZoomActionReverse")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelZoomActionReverse",t)}},model:{value:e.config.mousewheelZoomActionReverse,callback:function(t){e.$set(e.config,"mousewheelZoomActionReverse",t)},expression:"config.mousewheelZoomActionReverse"}},[t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse1"),value:!1}}),t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse2"),value:!0}})],1)],1)]):e._e(),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.createNewNodeBehavior")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("createNewNodeBehavior",t)}},model:{value:e.config.createNewNodeBehavior,callback:function(t){e.$set(e.config,"createNewNodeBehavior",t)},expression:"config.createNewNodeBehavior"}},[t("el-option",{attrs:{label:e.$t("baseStyle.default"),value:"default"}}),t("el-option",{attrs:{label:e.$t("baseStyle.notActive"),value:"notActive"}}),t("el-option",{attrs:{label:e.$t("baseStyle.activeOnly"),value:"activeOnly"}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:function(t){return e.updateLocalConfig("isShowScrollbar",t)}},model:{value:e.localConfigs.isShowScrollbar,callback:function(t){e.$set(e.localConfigs,"isShowScrollbar",t)},expression:"localConfigs.isShowScrollbar"}},[e._v(e._s(e.$t("baseStyle.isShowScrollbar")))])],1)])],2):e._e()])},Pp=[],Ip={name:"BaseStyle",components:{Sidebar:cp,Color:Tp,ImgUpload:g},props:{data:{type:[Object,null],default:null},mindMap:{type:Object}},data(){return{lineWidthList:me,fontSizeList:ce,activeTab:"color",marginActiveTab:"second",style:{backgroundColor:"",lineColor:"",lineWidth:"",lineStyle:"",rootLineKeepSameInCurve:"",generalizationLineWidth:"",generalizationLineColor:"",associativeLineColor:"",associativeLineWidth:0,associativeLineActiveWidth:0,associativeLineActiveColor:"",associativeLineTextFontSize:0,associativeLineTextColor:"",associativeLineTextFontFamily:"",paddingX:0,paddingY:0,imgMaxWidth:0,imgMaxHeight:0,iconSize:0,backgroundImage:"",backgroundRepeat:"no-repeat",backgroundPosition:"",backgroundSize:"",marginX:0,marginY:0,nodeUseLineStyle:!1},config:{enableFreeDrag:!1,mousewheelAction:"zoom",mousewheelZoomActionReverse:!1,createNewNodeBehavior:"default"},watermarkConfig:{show:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"",opacity:0,fontSize:1}},updateWatermarkTimer:null,enableNodeRichText:!0,localConfigs:{isShowScrollbar:!1}}},computed:{...Object(se["d"])(["activeSidebar","localConfig","isDark"]),lineStyleList(){return Ue[this.$i18n.locale]||Ue.zh},rootLineKeepSameInCurveList(){return Ge[this.$i18n.locale]||Ge.zh},backgroundRepeatList(){return We[this.$i18n.locale]||We.zh},backgroundPositionList(){return Ve[this.$i18n.locale]||Ve.zh},backgroundSizeList(){return Ye[this.$i18n.locale]||Ye.zh},fontFamilyList(){return je[this.$i18n.locale]||je.zh},lineStyleMap(){return qe[this.$i18n.locale]||qe.zh}},watch:{activeSidebar(e){"baseStyle"===e?(this.$refs.sidebar.show=!0,this.initStyle(),this.initConfig(),this.initWatermark()):this.$refs.sidebar.show=!1}},created(){this.initLoacalConfig(),this.$bus.$on("setData",this.onSetData)},beforeDestroy(){this.$bus.$off("setData",this.onSetData)},methods:{...Object(se["c"])(["setLocalConfig"]),onSetData(){"baseStyle"===this.activeSidebar&&setTimeout(()=>{this.initStyle()},0)},initStyle(){["backgroundColor","lineWidth","lineStyle","rootLineKeepSameInCurve","lineColor","generalizationLineWidth","generalizationLineColor","associativeLineColor","associativeLineWidth","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextFontSize","associativeLineTextColor","associativeLineTextFontFamily","paddingX","paddingY","imgMaxWidth","imgMaxHeight","iconSize","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","nodeUseLineStyle"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig(e),"backgroundImage"===e&&"none"===this.style[e]&&(this.style[e]="")}),this.initMarginStyle()},initConfig(){["enableFreeDrag","mousewheelAction","mousewheelZoomActionReverse","createNewNodeBehavior"].forEach(e=>{this.config[e]=this.mindMap.getConfig(e)})},initLoacalConfig(){this.enableNodeRichText=this.localConfig.openNodeRichText,this.mousewheelAction=this.localConfig.mousewheelAction,this.mousewheelZoomActionReverse=this.localConfig.mousewheelZoomActionReverse,["isShowScrollbar"].forEach(e=>{this.localConfigs[e]=this.localConfig[e]})},initWatermark(){let e=this.mindMap.getConfig("watermarkConfig");["text","lineSpacing","textSpacing","angle"].forEach(t=>{this.watermarkConfig[t]=e[t]}),this.watermarkConfig.show=!!e.text,this.watermarkConfig.textStyle={...e.textStyle}},initMarginStyle(){["marginX","marginY"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig()[this.marginActiveTab][e]})},update(e,t){this.style[e]="backgroundImage"===e&&"none"===t?"":t,this.data.theme.config[e]=t,this.$bus.$emit("showLoading"),this.mindMap.setThemeConfig(this.data.theme.config),Object(Wi["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},updateOtherConfig(e,t){this.mindMap.updateConfig({[e]:t}),this.data.config=this.data.config||{},this.data.config[e]=t,Object(Wi["d"])({config:this.data.config})},updateWatermarkConfig(){clearTimeout(this.updateWatermarkTimer),this.updateWatermarkTimer=setTimeout(()=>{let{show:e,...t}=this.watermarkConfig;this.mindMap.watermark.updateWatermark({...t}),this.data.config=this.data.config||{},this.data.config.watermarkConfig=this.mindMap.getConfig("watermarkConfig"),Object(Wi["d"])({config:this.data.config})},300)},updateMargin(e,t){this.style[e]=t,this.data.theme.config[this.marginActiveTab]||(this.data.theme.config[this.marginActiveTab]={}),this.data.theme.config[this.marginActiveTab][e]=t,this.mindMap.setThemeConfig(this.data.theme.config),Object(Wi["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},watermarkShowChange(e){if(e){let e=this.watermarkConfig.text||this.$t("baseStyle.watermarkDefaultText");this.watermarkConfig.text=e}else this.watermarkConfig.text="";this.updateWatermarkConfig()},enableNodeRichTextChange(e){this.mindMap.renderer.textEdit.hideEditTextBox(),this.setLocalConfig({openNodeRichText:e})},updateLocalConfig(e,t){this.setLocalConfig({[e]:t})}}},Rp=Ip,Fp=(n("a9e9"),n("feb0"),Object(p["a"])(Rp,Dp,Pp,!1,null,"46bf1066",null)),zp=Fp.exports,Bp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("theme.title")}},[t("div",{staticClass:"themeList",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.groupList,(function(e){return t("el-tab-pane",{key:e.name,attrs:{label:e.name,name:e.name}})})),1),e._l(e.currentList,(function(n){return t("div",{key:n.value,staticClass:"themeItem",class:{active:n.value===e.theme},on:{click:function(t){return e.useTheme(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.themeMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])}))],2)])},_p=[];const jp={logicalStructure:n("58cf"),mindMap:n("7992"),organizationStructure:n("57cb"),catalogOrganization:n("bea9"),timeline:n("0cfe"),timeline2:n("4ec2"),fishbone:n("3c2a"),verticalTimeline:n("b47d")},Hp={default:n("facf"),classic:n("5e3f"),minions:n("a57a"),pinkGrape:n("4f8c"),mint:n("d046"),gold:n("7e82"),vitalityOrange:n("7080"),greenLeaf:n("9ed8"),dark2:n("4514"),skyGreen:n("6276"),classic2:n("9876d"),classic3:n("86d9"),classic4:n("5abe"),classicGreen:n("1474"),classicBlue:n("8b92"),blueSky:n("1560"),brainImpairedPink:n("2f97"),dark:n("0d42"),earthYellow:n("8f14"),freshGreen:n("1f76"),freshRed:n("9543"),romanticPurple:n("5843"),simpleBlack:n("0754"),courseGreen:n("3cc4"),coffee:n("dbc4"),redSpirit:n("bc06"),blackHumour:n("b645"),lateNightOffice:n("6ad8"),blackGold:n("1b88"),autumn:n("7f95"),avocado:n("135f"),orangeJuice:n("be49"),oreo:n("daf1"),shallowSea:n("b0a0"),lemonBubbles:n("cb07"),rose:n("0536"),seaBlueLine:n("6c83"),neonLamp:n("1397"),darkNightLceBlade:n("aa39"),morandi:n("9192"),classic5:n("e9d1"),dark3:n("a7a61"),dark4:n("e497"),cactus:n("5a50")},Up=["a^2","a_2","a^{2+2}","a_{i,j}","x_2^3","\\overbrace{1+2+\\cdots+100}","\\sum_{k=1}^N k^2","\\lim_{n \\to \\infty}x_n","\\int_{-N}^{N} e^x\\, dx","\\sqrt{3}","\\sqrt[n]{3}","\\sin\\theta","\\log X","\\log_{10}","\\log_\\alpha X","\\lim_{t\\to n}T","\\frac{1}{2}=0.5","\\binom{n}{k}","\\begin{matrix}x & y \\\\z & v\\end{matrix}","\\begin{cases}3x + 5y + z \\\\7x - 2y + 4z \\\\-6x + 3y + 2z\\end{cases}"];var qp={lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(22, 22, 22)",color:"#fff",borderColor:"rgb(22, 22, 22)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(244, 246, 253)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}},Gp={backgroundColor:"rgb(187, 241, 250)",lineColor:"rgb(74, 139, 170)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 168, 101)",root:{fillColor:"rgb(51, 149, 255)",color:"#fff",borderColor:"rgb(51, 149, 255)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(74, 139, 170)",color:"#fff",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 168, 101)",borderWidth:2,color:"#000"}},Wp={backgroundColor:"rgb(236, 254, 255)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(39, 222, 232)",color:"rgb(26, 26, 26)",borderColor:"rgb(26, 26, 26)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(235, 255, 187)",color:"rgb(0, 0, 0)",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(26, 26, 26)",borderWidth:2,color:"rgb(26, 26, 26)"}},Vp={backgroundColor:"rgb(255, 251, 231)",lineColor:"rgb(110, 165, 79)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(136, 100, 0)",root:{fillColor:"rgb(254, 92, 92)",color:"#fff",borderColor:"rgb(18, 187, 55)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(209, 237, 176)",color:"rgb(85, 136, 55)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(26, 26, 26)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(136, 100, 0)",borderWidth:2,color:"rgb(136, 100, 0)"}},Yp={backgroundColor:"rgb(231, 245, 255)",lineColor:"rgb(96, 189, 255)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(0, 155, 255)",root:{fillColor:"rgb(96, 189, 255)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(0, 149, 255)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 66, 157)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 155, 255)",borderWidth:2,color:"rgb(0, 155, 255)"}},Zp={backgroundColor:"rgb(17, 17, 84)",lineColor:"rgb(255, 0, 214)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 181, 0)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(251, 233, 248)",color:"rgb(208, 5, 176)",borderColor:"rgb(255, 0, 214)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"transparent",color:"rgb(248, 177, 237)",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 181, 0)",borderWidth:2,color:"rgb(17, 17, 84)"}},Kp={backgroundColor:"rgb(0, 21, 21)",lineColor:"rgb(0, 139, 146)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgba(2, 167, 240, 0.5)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(0, 243, 255)",color:"rgb(0, 21, 21)",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"parallelogram"},second:{fillColor:"rgb(0, 21, 21)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:18,shape:"diamond"},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 117, 255)",borderWidth:2,color:"rgb(0, 21, 21)"}},Xp={backgroundColor:"rgb(252, 245, 241)",lineColor:"rgb(144, 114, 110)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(128, 154, 151)",associativeLineColor:"rgb(166, 124, 106)",associativeLineTextColor:"rgb(166, 124, 106)",root:{fillColor:"rgb(207, 121, 105)",color:"#fff",borderColor:"rgb(207, 121, 105)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(239, 210, 207)",color:"rgb(144, 79, 68)",borderColor:"rgb(222, 186, 183)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(131, 90, 64)"},generalization:{fontSize:14,fillColor:"rgb(172, 202, 199)",borderColor:"rgb(172, 202, 199)",borderWidth:2,color:"rgb(91, 102, 97)"}},Jp={backgroundColor:"rgb(233, 245, 241)",lineColor:"rgb(34, 34, 34)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(34, 34, 34)",associativeLineColor:"rgb(56, 44, 116)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(56, 44, 116)",color:"#fff",borderColor:"rgb(56, 44, 116)",borderWidth:0,fontSize:24},second:{fillColor:"rgb(161, 213, 188)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(56, 44, 116)",borderColor:"",borderWidth:0,color:"#fff"}},Qp={backgroundColor:"rgb(0, 0, 0)",lineColor:"rgb(172, 172, 172)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(172, 172, 172)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"#fff",color:"rgb(241, 79, 81)",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(241, 79, 81)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(241, 79, 81)"}},$p={backgroundColor:"rgb(32, 34, 43)",lineColor:"rgb(90, 136, 116)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(90, 136, 116)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(1, 192, 116)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(48, 51, 63)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"rgb(1, 192, 116)",borderColor:"",borderWidth:0,color:"#fff"}},em={backgroundColor:"rgb(219, 255, 211)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 127, 71)",associativeLineColor:"rgb(160, 220, 63)",associativeLineTextColor:"rgb(160, 220, 63)",root:{fillColor:"rgb(15, 198, 113)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(26, 26, 26)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(255, 127, 71)",borderColor:"",borderWidth:0,color:"#fff"}},tm=[{name:"奥利奥",value:"oreo",theme:qp,dark:!1},{name:"浅海",value:"shallowSea",theme:Gp,dark:!1},{name:"柠檬气泡",value:"lemonBubbles",theme:Wp,dark:!1},{name:"玫瑰",value:"rose",theme:Vp,dark:!1},{name:"海蓝线",value:"seaBlueLine",theme:Yp,dark:!1},{name:"霓虹灯",value:"neonLamp",theme:Zp,dark:!0},{name:"暗夜冰刃",value:"darkNightLceBlade",theme:Kp,dark:!0},{name:"莫兰迪",value:"morandi",theme:Xp,dark:!1},{name:"脑图经典5",value:"classic5",theme:Jp,dark:!1},{name:"暗色3",value:"dark3",theme:Qp,dark:!0},{name:"暗色4",value:"dark4",theme:$p,dark:!0},{name:"仙人掌",value:"cactus",theme:em,dark:!1}],nm={name:"Theme",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{themeList:[...oo["k"],...tm].reverse(),themeMap:Hp,theme:"",activeName:"",groupList:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),currentList(){return this.groupList.find(e=>e.name===this.activeName).list}},watch:{activeSidebar(e){"theme"===e?(this.theme=this.mindMap.getTheme(),this.handleDark(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},created(){this.initGroup(),this.theme=this.mindMap.getTheme(),this.handleDark(),this.mindMap.on("view_theme_change",this.handleViewThemeChange)},beforeDestroy(){this.mindMap.off("view_theme_change",this.handleViewThemeChange)},methods:{...Object(se["c"])(["setIsDark"]),handleViewThemeChange(){this.theme=this.mindMap.getTheme(),this.handleDark()},initGroup(){let e=["default","skyGreen","classic2","classic3","classicGreen","classicBlue","blueSky","brainImpairedPink","earthYellow","freshGreen","freshRed","romanticPurple","pinkGrape","mint"],t=[],n=[];this.themeList.forEach(r=>{e.includes(r.value)?t.push(r):r.dark||n.push(r)}),this.groupList=[{name:this.$t("theme.classics"),list:n},{name:this.$t("theme.dark"),list:this.themeList.filter(e=>e.dark)},{name:this.$t("theme.simple"),list:t}],this.activeName=this.groupList[0].name},useTheme(e){if(e.value===this.theme)return;this.theme=e.value,this.handleDark();const t=this.mindMap.getCustomThemeConfig(),n=Object.keys(t).length>0;n?this.$confirm(this.$t("theme.coverTip"),this.$t("theme.tip"),{confirmButtonText:this.$t("theme.cover"),cancelButtonText:this.$t("theme.reserve"),type:"warning"}).then(()=>{this.mindMap.setThemeConfig({},!0),this.changeTheme(e,{})}).catch(()=>{this.changeTheme(e,t)}):this.changeTheme(e,t)},changeTheme(e,t){this.$bus.$emit("showLoading"),this.mindMap.setTheme(e.value),Object(Wi["d"])({theme:{template:e.value,config:t}})},handleDark(){let e=this.themeList.find(e=>e.value===this.theme);this.setIsDark(e.dark)}}},rm=nm,im=(n("8952"),Object(p["a"])(rm,Bp,_p,!1,null,"80f2e6de",null)),om=im.exports,am=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("strusture.title")}},[t("div",{staticClass:"layoutList",class:{isDark:e.isDark}},e._l(e.layoutList,(function(n){return t("div",{key:n.value,staticClass:"layoutItem",class:{active:n.value===e.layout},on:{click:function(t){return e.useLayout(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.layoutImgMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])})),0)])},sm=[],lm={name:"Structure",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{layoutList:oo["g"],layoutImgMap:jp,layout:""}},computed:{...Object(se["d"])(["activeSidebar","isDark"])},watch:{activeSidebar(e){"structure"===e?(this.layout=this.mindMap.getLayout(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},methods:{useLayout(e){this.layout=e.value,this.mindMap.setLayout(e.value),Object(Wi["d"])({layout:e.value})}}},cm=lm,um=(n("da5b"),Object(p["a"])(cm,am,sm,!1,null,"a218ac20",null)),hm=um.exports,dm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"countContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.words")))]),t("span",{staticClass:"value"},[e._v(e._s(e.words))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.nodes")))]),t("span",{staticClass:"value"},[e._v(e._s(e.num))])])])},fm=[];let pm=document.createElement("div");var mm={name:"Count",props:{mindMap:{type:Object}},data(){return{textStr:"",words:0,num:0}},computed:{...Object(se["d"])(["isDark"])},created(){this.$bus.$on("data_change",this.onDataChange),this.mindMap&&this.onDataChange(this.mindMap.getData())},beforeDestroy(){this.$bus.$off("data_change",this.onDataChange)},methods:{onDataChange(e){this.textStr="",this.words=0,this.num=0,this.walk(e),pm.innerHTML=this.textStr,this.words=pm.textContent.length},walk(e){this.num++,this.textStr+=String(e.data.text)||"",e.children&&e.children.length>0&&e.children.forEach(e=>{this.walk(e)})}}},gm=mm,vm=(n("bf32"),Object(p["a"])(gm,dm,fm,!1,null,"0770e0d2",null)),bm=vm.exports,ym=function(){var e=this,t=e._self._c;return t("div",{staticClass:"navigatorContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("el-select",{staticStyle:{width:"100px"},attrs:{size:"small"},on:{change:e.onLangChange},model:{value:e.lang,callback:function(t){e.lang=t},expression:"lang"}},e._l(e.langList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont iconsousuo",on:{click:e.showSearch}})]),t("div",{staticClass:"item"},[t("MouseAction",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.openMiniMap?e.$t("navigatorToolbar.closeMiniMap"):e.$t("navigatorToolbar.openMiniMap"),placement:"top"}},[t("div",{staticClass:"btn iconfont icondaohang1",on:{click:e.toggleMiniMap}})])],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.isReadonly?e.$t("navigatorToolbar.edit"):e.$t("navigatorToolbar.readonly"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.isReadonly?"iconyanjing":"iconbianji1"],on:{click:e.readonlyChange}})])],1),t("div",{staticClass:"item"},[t("Fullscreen",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("Scale",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont",class:[e.isDark?"iconmoon_line":"iconlieri"],on:{click:e.toggleDark}})]),t("div",{staticClass:"item"},[t("el-dropdown",{on:{command:e.handleCommand}},[t("div",{staticClass:"btn iconfont iconbangzhu"}),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"github"}},[e._v("Github")]),t("el-dropdown-item",{attrs:{command:"helpDoc"}},[e._v("使用文档")]),t("el-dropdown-item",{attrs:{command:"devDoc"}},[e._v("开发文档")]),t("el-dropdown-item",{attrs:{command:"site"}},[e._v("官方网站")]),t("el-dropdown-item",{attrs:{command:"issue"}},[e._v("意见反馈")]),t("el-dropdown-item",{attrs:{disabled:""}},[e._v("当前:v"+e._s(e.version))])],1)],1)],1)])},wm=[],xm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scaleContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomOut"),placement:"top"}},[t("div",{staticClass:"btn el-icon-minus",on:{click:e.narrow}})]),t("div",{staticClass:"scaleInfo"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.scaleNum,expression:"scaleNum"}],attrs:{type:"text"},domProps:{value:e.scaleNum},on:{change:e.onScaleNumChange,focus:e.onScaleNumInputFocus,input:function(t){t.target.composing||(e.scaleNum=t.target.value)}}}),e._v("% ")]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomIn"),placement:"top"}},[t("div",{staticClass:"btn el-icon-plus",on:{click:e.enlarge}})])],1)},km=[],Am={name:"Scale",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{scaleNum:100,cacheScaleNum:0}},watch:{mindMap(e,t){e&&!t&&(this.mindMap.on("scale",e=>{this.scaleNum=this.toPer(e)}),this.scaleNum=this.toPer(this.mindMap.view.scale))}},methods:{toPer(e){return(100*e).toFixed(0)},narrow(){this.mindMap.view.narrow()},enlarge(){this.mindMap.view.enlarge()},onScaleNumInputFocus(){this.cacheScaleNum=this.scaleNum},onScaleNumChange(){const e=Number(this.scaleNum);if(Number.isNaN(e)||e<=0)this.scaleNum=this.cacheScaleNum;else{const e=this.mindMap.width/2,t=this.mindMap.height/2;this.mindMap.view.setScale(this.scaleNum/100,e,t)}}}},Cm=Am,Em=(n("6ffb0"),Object(p["a"])(Cm,xm,km,!1,null,"07c47fcc",null)),Sm=Em.exports,Tm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fullscreenContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenShow"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping",on:{click:e.toFullscreenShow}})]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenEdit"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping1",on:{click:e.toFullscreenEdit}})])],1)},Nm=[],Mm={name:"Fullscreen",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},created(){document[Ri]=()=>{setTimeout(()=>{this.mindMap.resize()},1e3)}},methods:{toFullscreenShow(){Fi(this.mindMap.el)},toFullscreenEdit(){Fi(document.body)}}},Lm=Mm,Om=(n("7812"),Object(p["a"])(Lm,Tm,Nm,!1,null,"1bcbabda",null)),Dm=Om.exports,Pm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mouseActionContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.useLeftKeySelectionRightKeyDrag?e.$t("mouseAction.tip2"):e.$t("mouseAction.tip1"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.useLeftKeySelectionRightKeyDrag?"iconmouseR":"iconmouseL"],on:{click:e.toggleAction}})])],1)},Im=[],Rm={name:"MouseAction",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},computed:{...Object(se["d"])({useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag})},methods:{...Object(se["c"])(["setLocalConfig"]),toggleAction(){let e=!this.useLeftKeySelectionRightKeyDrag;this.mindMap.updateConfig({useLeftKeySelectionRightKeyDrag:e}),this.setLocalConfig({useLeftKeySelectionRightKeyDrag:e})}}},Fm=Rm,zm=(n("ad01"),Object(p["a"])(Fm,Pm,Im,!1,null,"a1887b1e",null)),Bm=zm.exports,_m=n("9225"),jm=n("a06c"),Hm={name:"NavigatorToolbar",components:{Scale:Sm,Fullscreen:Dm,MouseAction:Bm},props:{mindMap:{type:Object}},data(){return{version:jm.version,langList:Se,lang:"",openMiniMap:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},created(){this.lang=Object(Wi["b"])()},methods:{...Object(se["c"])(["setIsDark","setIsReadonly"]),readonlyChange(){this.setIsReadonly(!this.isReadonly),this.mindMap.setMode(this.isReadonly?"readonly":"edit")},toggleMiniMap(){this.openMiniMap=!this.openMiniMap,this.$bus.$emit("toggle_mini_map",this.openMiniMap)},onLangChange(e){_m["a"].locale=e,Object(Wi["f"])(e),this.$bus.$emit("lang_change")},showSearch(){this.$bus.$emit("show_search")},toggleDark(){this.setIsDark(!this.isDark)},handleCommand(e){let t="";switch(e){case"github":t="https://github.com/wanglin2/mind-map";break;case"helpDoc":t="https://wanglin2.github.io/mind-map/#/help/zh/";break;case"devDoc":t="https://wanglin2.github.io/mind-map/#/doc/zh/introduction/";break;case"site":t="https://wanglin2.github.io/mind-map/#/index";break;case"issue":t="https://github.com/wanglin2/mind-map/issues/new";break;default:break}const n=document.createElement("a");n.href=t,n.target="_blank",n.click()}}},Um=Hm,qm=(n("eb43"),Object(p["a"])(Um,ym,wm,!1,null,"1f9b5dca",null)),Gm=qm.exports,Wm=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("shortcutKey.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},e._l(e.shortcutKeyList,(function(n){return t("div",{key:n.type},[t("div",{staticClass:"title"},[e._v(e._s(n.type))]),e._l(n.list,(function(n){return t("div",{key:n.value,staticClass:"list"},[t("div",{staticClass:"item"},[n.icon?t("span",{staticClass:"icon iconfont",class:[n.icon]}):e._e(),t("span",{staticClass:"name",attrs:{title:n.name}},[e._v(e._s(n.name))]),t("div",{staticClass:"value",attrs:{title:n.value}},[e._v(e._s(n.value))])])])}))],2)})),0)])},Vm=[],Ym={name:"ShortcutKey",components:{Sidebar:cp},data(){return{}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),shortcutKeyList(){return Ze[this.$i18n.locale]||Ze.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="shortcutKey"===e}}},Zm=Ym,Km=(n("56c4"),Object(p["a"])(Zm,Wm,Vm,!1,null,"cff0b1d2",null)),Xm=Km.exports,Jm=function(){var e=this,t=e._self._c;return e.isShow?t("div",{staticClass:"contextmenuContainer listBox",class:{isDark:e.isDark},style:{left:e.left+"px",top:e.top+"px"}},["node"===e.type?[t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_NODE",e.insertNodeBtnDisabled)}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSiblingNode")))]),t("span",{staticClass:"desc"},[e._v("Enter")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("INSERT_CHILD_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertChildNode")))]),t("span",{staticClass:"desc"},[e._v("Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_PARENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertParentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("ADD_GENERALIZATION")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSummary")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + G")])]),t("div",{staticClass:"item",class:{disabled:e.upNodeBtnDisabled},on:{click:function(t){return e.exec("UP_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveUpNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↑")])]),t("div",{staticClass:"item",class:{disabled:e.downNodeBtnDisabled},on:{click:function(t){return e.exec("DOWN_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveDownNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↓")])]),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteNode")))]),t("span",{staticClass:"desc"},[e._v("Delete")])]),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_CURRENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteCurrentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Backspace")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("COPY_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.copyNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + C")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("CUT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.cutNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + X")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("PASTE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.pasteNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + V")])]),e.hasHyperlink?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_HYPERLINK")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeHyperlink")))])]):e._e(),e.hasNote?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_NOTE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeNote")))])]):e._e()]:e._e(),"svg"===e.type?[t("div",{staticClass:"item",on:{click:function(t){return e.exec("RETURN_CENTER")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.backCenter")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + Enter")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("EXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandAll")))])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.unExpandAll")))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandTo")))]),t("div",{staticClass:"subItems listBox",class:{isDark:e.isDark}},e._l(e.expandList,(function(n,r){return t("div",{key:n,staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_TO_LEVEL",!1,r+1)}}},[e._v(" "+e._s(n)+" ")])})),0)]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("RESET_LAYOUT")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.arrangeLayout")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + L")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("FIT_CANVAS")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.fitCanvas")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + i")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("TOGGLE_ZEN_MODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.zenMode")))]),e._v(" "+e._s(e.isZenMode?"√":"")+" ")])]:e._e()],2):e._e()},Qm=[],$m={name:"Contextmenu",props:{mindMap:{type:Object}},data(){return{isShow:!1,left:0,top:0,node:null,type:"",isMousedown:!1,mosuedownX:0,mosuedownY:0}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.isDark}),expandList(){return[this.$t("contextmenu.level1"),this.$t("contextmenu.level2"),this.$t("contextmenu.level3"),this.$t("contextmenu.level4"),this.$t("contextmenu.level5"),this.$t("contextmenu.level6")]},insertNodeBtnDisabled(){return!this.node||this.node.isRoot||this.node.isGeneralization},upNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=0===this.node.parent.children.findIndex(e=>e===this.node);return e},downNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=this.node.parent.children,t=e.findIndex(e=>e===this.node)===e.length-1;return t},isGeneralization(){return this.node.isGeneralization},hasHyperlink(){return!!this.node.getData("hyperlink")},hasNote(){return!!this.node.getData("note")}},created(){this.$bus.$on("node_contextmenu",this.show),this.$bus.$on("node_click",this.hide),this.$bus.$on("draw_click",this.hide),this.$bus.$on("expand_btn_click",this.hide),this.$bus.$on("svg_mousedown",this.onMousedown),this.$bus.$on("mouseup",this.onMouseup)},beforeDestroy(){this.$bus.$off("node_contextmenu",this.show),this.$bus.$off("node_click",this.hide),this.$bus.$off("draw_click",this.hide),this.$bus.$off("expand_btn_click",this.hide),this.$bus.$off("svg_mousedown",this.onMousedown),this.$bus.$off("mouseup",this.onMouseup)},methods:{...Object(se["c"])(["setLocalConfig"]),show(e,t){this.type="node",this.left=e.clientX+10,this.top=e.clientY+10,this.isShow=!0,this.node=t},onMousedown(e){3===e.which&&(this.mosuedownX=e.clientX,this.mosuedownY=e.clientY,this.isMousedown=!0)},onMouseup(e){this.isMousedown&&(this.isMousedown=!1,Math.abs(this.mosuedownX-e.clientX)>3||Math.abs(this.mosuedownY-e.clientY)>3?this.hide():this.show2(e))},show2(e){this.type="svg",this.left=e.clientX+10,this.top=e.clientY+10,this.isShow=!0},hide(){this.isShow=!1,this.left=0,this.top=0,this.type=""},exec(e,t,...n){if(!t){switch(e){case"COPY_NODE":this.mindMap.renderer.copy();break;case"CUT_NODE":this.mindMap.renderer.cut();break;case"PASTE_NODE":this.mindMap.renderer.paste();break;case"RETURN_CENTER":this.mindMap.renderer.setRootNodeCenter();break;case"TOGGLE_ZEN_MODE":this.setLocalConfig({isZenMode:!this.isZenMode});break;case"FIT_CANVAS":this.mindMap.view.fit();break;case"REMOVE_HYPERLINK":this.node.setHyperlink("","");break;case"REMOVE_NOTE":this.node.setNote("");break;default:this.$bus.$emit("execCommand",e,...n);break}this.hide()}}}},eg=$m,tg=(n("fca3"),Object(p["a"])(eg,Jm,Qm,!1,null,"dbfd708e",null)),ng=tg.exports,rg=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showRichTextToolbar,expression:"showRichTextToolbar"}],ref:"richTextToolbar",staticClass:"richTextToolbar",class:{isDark:e.isDark},style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.bold"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.bold},on:{click:e.toggleBold}},[t("span",{staticClass:"icon iconfont iconzitijiacu"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.italic"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.italic},on:{click:e.toggleItalic}},[t("span",{staticClass:"icon iconfont iconzitixieti"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.underline"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.underline},on:{click:e.toggleUnderline}},[t("span",{staticClass:"icon iconfont iconzitixiahuaxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.strike"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.strike},on:{click:e.toggleStrike}},[t("span",{staticClass:"icon iconfont iconshanchuxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontFamily"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontFamilyList,(function(n){return t("div",{key:n.value,staticClass:"fontOptionItem",class:{active:e.formatInfo.font===n.value},style:{fontFamily:n.value},on:{click:function(t){return e.changeFontFamily(n.value)}}},[e._v(" "+e._s(n.name)+" ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconxingzhuang-wenzi"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontSize"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontSizeList,(function(n){return t("div",{key:n,staticClass:"fontOptionItem",class:{active:e.formatInfo.size===n+"px"},style:{fontSize:n+"px"},on:{click:function(t){return e.changeFontSize(n)}}},[e._v(" "+e._s(n)+"px ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconcase fontColor"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.color"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontColor},on:{change:e.changeFontColor}}),t("div",{staticClass:"btn",style:{color:e.formatInfo.color},attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconzitiyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.backgroundColor"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontBackgroundColor},on:{change:e.changeFontBackgroundColor}}),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconbeijingyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.removeFormat"),placement:"top"}},[t("div",{staticClass:"btn",on:{click:e.removeFormat}},[t("span",{staticClass:"icon iconfont iconqingchu"})])])],1)},ig=[],og={name:"RichTextToolbar",components:{Color:Tp},props:{mindMap:{type:Object}},data(){return{fontSizeList:ce,showRichTextToolbar:!1,style:{left:0,top:0},fontColor:"",fontBackgroundColor:"",formatInfo:{}}},computed:{...Object(se["d"])(["isDark"]),fontFamilyList(){return je[this.$i18n.locale]||je.zh}},created(){this.$bus.$on("rich_text_selection_change",this.onRichTextSelectionChange)},mounted(){document.body.append(this.$refs.richTextToolbar)},beforeDestroy(){this.$bus.$off("rich_text_selection_change",this.onRichTextSelectionChange)},methods:{onRichTextSelectionChange(e,t,n){e&&(this.style.left=t.left+t.width/2+"px",this.style.top=t.top-60+"px",this.formatInfo={...n||{}}),this.showRichTextToolbar=e},toggleBold(){this.formatInfo.bold=!this.formatInfo.bold,this.mindMap.richText.formatText({bold:this.formatInfo.bold})},toggleItalic(){this.formatInfo.italic=!this.formatInfo.italic,this.mindMap.richText.formatText({italic:this.formatInfo.italic})},toggleUnderline(){this.formatInfo.underline=!this.formatInfo.underline,this.mindMap.richText.formatText({underline:this.formatInfo.underline})},toggleStrike(){this.formatInfo.strike=!this.formatInfo.strike,this.mindMap.richText.formatText({strike:this.formatInfo.strike})},changeFontFamily(e){this.formatInfo.font=e,this.mindMap.richText.formatText({font:e})},changeFontSize(e){this.formatInfo.size=e,this.mindMap.richText.formatText({size:e+"px"})},changeFontColor(e){this.formatInfo.color=e,this.mindMap.richText.formatText({color:e})},changeFontBackgroundColor(e){this.formatInfo.background=e,this.mindMap.richText.formatText({background:e})},removeFormat(){this.mindMap.richText.removeFormat()}}},ag=og,sg=(n("146c"),Object(p["a"])(ag,rg,ig,!1,null,"50a360a9",null)),lg=sg.exports,cg=function(){var e=this,t=e._self._c;return t("div",{ref:"noteContentViewer",staticClass:"noteContentViewer",style:{left:this.left+"px",top:this.top+"px",visibility:e.show?"visible":"hidden"},on:{click:function(e){e.stopPropagation()}}})},ug=[],hg=n("f059"),dg=n.n(hg),fg=(n("fe5f"),{name:"NodeNoteContentShow",data(){return{editor:null,show:!1,left:0,top:0,node:null}},created(){this.$bus.$on("showNoteContent",this.onShowNoteContent),this.$bus.$on("hideNoteContent",this.hideNoteContent),document.body.addEventListener("click",this.hideNoteContent),this.$bus.$on("node_active",this.hideNoteContent),this.$bus.$on("scale",this.onScale),this.$bus.$on("svg_mousedown",this.hideNoteContent)},mounted(){this.initEditor()},beforeDestroy(){this.$bus.$off("showNoteContent",this.onShowNoteContent),this.$bus.$off("hideNoteContent",this.hideNoteContent),document.body.removeEventListener("click",this.hideNoteContent),this.$bus.$off("node_active",this.hideNoteContent),this.$bus.$off("scale",this.onScale),this.$bus.$off("svg_mousedown",this.hideNoteContent)},methods:{onShowNoteContent(e,t,n,r){this.node=r,this.editor.setMarkdown(e),this.updateNoteContentPosition(t,n),this.show=!0},updateNoteContentPosition(e,t){this.left=e,this.top=t},onScale(){if(!this.node||!this.show)return;const{left:e,top:t}=this.node.getNoteContentPosition();this.updateNoteContentPosition(e,t)},hideNoteContent(){this.show=!1},initEditor(){this.editor||(this.editor=new dg.a({el:this.$refs.noteContentViewer}))}}}),pg=fg,mg=(n("3aa9"),Object(p["a"])(pg,cg,ug,!1,null,"1484624c",null)),gg=mg.exports,vg=function(){var e=this,t=e._self._c;return e.showMiniMap?t("div",{ref:"navigatorBox",staticClass:"navigatorBox",class:{isDark:e.isDark},on:{mousedown:e.onMousedown,mousemove:e.onMousemove,mouseup:e.onMouseup}},[t("div",{ref:"svgBox",staticClass:"svgBox",style:{transform:`scale(${e.svgBoxScale})`,left:e.svgBoxLeft+"px",top:e.svgBoxTop+"px"}},[t("img",{attrs:{src:e.mindMapImg},on:{mousedown:function(e){e.preventDefault()}}})]),t("div",{staticClass:"windowBox",style:e.viewBoxStyle})]):e._e()},bg=[],yg={props:{mindMap:{type:Object}},data(){return{showMiniMap:!1,timer:null,boxWidth:0,boxHeight:0,svgBoxScale:1,svgBoxLeft:0,svgBoxTop:0,viewBoxStyle:{left:0,top:0,bottom:0,right:0},mindMapImg:""}},computed:{...Object(se["d"])(["isDark"])},mounted(){this.$bus.$on("toggle_mini_map",this.toggle_mini_map),this.$bus.$on("data_change",this.data_change),this.$bus.$on("view_data_change",this.data_change),this.$bus.$on("node_tree_render_end",this.data_change)},destroyed(){this.$bus.$off("toggle_mini_map",this.toggle_mini_map),this.$bus.$off("data_change",this.data_change),this.$bus.$off("view_data_change",this.data_change),this.$bus.$off("node_tree_render_end",this.data_change)},methods:{toggle_mini_map(e){this.showMiniMap=e,this.$nextTick(()=>{this.$refs.navigatorBox&&this.init(),this.$refs.svgBox&&this.drawMiniMap()})},data_change(){this.showMiniMap&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.drawMiniMap()},500))},init(){let{width:e,height:t}=this.$refs.navigatorBox.getBoundingClientRect();this.boxWidth=e,this.boxHeight=t},drawMiniMap(){let{getImgUrl:e,viewBoxStyle:t,miniMapBoxScale:n,miniMapBoxLeft:r,miniMapBoxTop:i}=this.mindMap.miniMap.calculationMiniMap(this.boxWidth,this.boxHeight);e(e=>{this.mindMapImg=e}),this.viewBoxStyle=t,this.svgBoxScale=n,this.svgBoxLeft=r,this.svgBoxTop=i},onMousedown(e){this.mindMap.miniMap.onMousedown(e)},onMousemove(e){this.mindMap.miniMap.onMousemove(e)},onMouseup(e){this.mindMap.miniMap.onMouseup(e)}}},wg=yg,xg=(n("a121"),Object(p["a"])(wg,vg,bg,!1,null,"c41a0b0a",null)),kg=xg.exports,Ag=function(){var e=this,t=e._self._c;return t("viewer",{attrs:{images:e.images}},e._l(e.images,(function(e){return t("img",{key:e,attrs:{src:e}})})),0)},Cg=[],Eg={props:{mindMap:{type:Object,default(){return null}}},data(){return{images:[]}},mounted(){this.mindMap.on("node_img_dblclick",this.onNodeTmgDblclick)},beforeDestroy(){this.mindMap.off("node_img_dblclick",this.onNodeTmgDblclick)},methods:{onNodeTmgDblclick(e,t){t.stopPropagation(),t.preventDefault(),this.images=[e.nodeData.data.image],this.$viewerApi({images:this.images})}}},Sg=Eg,Tg=Object(p["a"])(Sg,Ag,Cg,!1,null,null,null),Ng=Tg.exports,Mg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarTriggerContainer",class:{hasActive:e.show&&e.activeSidebar,show:e.show,isDark:e.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"toggleShowBtn",class:{hide:!e.show},on:{click:function(t){e.show=!e.show}}},[t("span",{staticClass:"iconfont iconjiantouyou"})]),t("div",{staticClass:"trigger"},e._l(e.triggerList,(function(n){return t("div",{key:n.value,staticClass:"triggerItem",class:{active:e.activeSidebar===n.value},on:{click:function(t){return e.trigger(n)}}},[t("div",{staticClass:"triggerIcon iconfont",class:[n.icon]}),t("div",{staticClass:"triggerName"},[e._v(e._s(n.name))])])})),0)])},Lg=[],Og={name:"SidebarTrigger",data(){return{show:!0}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),triggerList(){return Je[this.$i18n.locale]||Je.zh}},methods:{...Object(se["c"])(["setActiveSidebar"]),trigger(e){this.setActiveSidebar(e.value)}}},Dg=Og,Pg=(n("7100"),Object(p["a"])(Dg,Mg,Lg,!1,null,"7fe703e0",null)),Ig=Pg.exports,Rg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"customNodeContent"},[t("p",[e._v(e._s(e.title))]),t("p",{domProps:{innerHTML:e._s(e.html)}}),t("p",{style:{backgroundColor:e.color},on:{click:e.onClick}},[e._v("点击我会变色")])])},Fg=[],zg={props:{html:{type:String,default:""}},data(){return{title:"我是自定义节点",color:""}},methods:{onClick(){this.color="red"}}},Bg=zg,_g=(n("7cb3"),Object(p["a"])(Bg,Rg,Fg,!1,null,"6ef61ceb",null)),jg=(_g.exports,n("41cb"),n("c0d6"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"searchContainer",class:{isDark:e.isDark,show:e.show},on:{mouseleave:e.onMouseleave}},[t("div",{staticClass:"closeBtnBox"},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}})]),t("div",{staticClass:"searchInputBox"},[t("el-input",{ref:"searchInputRef",attrs:{placeholder:e.$t("search.searchPlaceholder"),size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.onSearchNext.apply(null,arguments))},keydown:function(e){e.stopPropagation()}},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"}),e.isUndef(e.searchText)?e._e():t("el-button",{attrs:{slot:"append",size:"small"},on:{click:function(t){e.showReplaceInput=!0}},slot:"append"},[e._v(e._s(e.$t("search.replace")))])],1),e.showSearchInfo?t("div",{staticClass:"searchInfo"},[e._v(" "+e._s(e.currentIndex)+" / "+e._s(e.total)+" ")]):e._e()],1),e.showReplaceInput?t("el-input",{ref:"replaceInputRef",staticStyle:{margin:"12px 0"},attrs:{placeholder:e.$t("search.replacePlaceholder"),size:"small"},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.replaceText,callback:function(t){e.replaceText=t},expression:"replaceText"}},[t("i",{staticClass:"el-input__icon el-icon-edit",attrs:{slot:"prefix"},slot:"prefix"}),t("el-button",{attrs:{slot:"append",size:"small"},on:{click:e.hideReplaceInput},slot:"append"},[e._v(e._s(e.$t("search.cancel")))])],1):e._e(),e.showReplaceInput?t("div",{staticClass:"btnList"},[t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replace}},[e._v(e._s(e.$t("search.replace")))]),t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replaceAll}},[e._v(e._s(e.$t("search.replaceAll")))])],1):e._e()],1)}),Hg=[],Ug={name:"Search",props:{mindMap:{type:Object}},data(){return{show:!1,searchText:"",replaceText:"",showReplaceInput:!1,currentIndex:0,total:0,showSearchInfo:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},watch:{searchText(){Object(v["I"])(this.searchText)&&(this.currentIndex=0,this.total=0,this.showSearchInfo=!1)}},created(){this.$bus.$on("show_search",this.showSearch),this.mindMap.on("search_info_change",this.handleSearchInfoChange),this.mindMap.keyCommand.addShortcut("Control+f",this.showSearch)},beforeDestroy(){this.$bus.$off("show_search",this.showSearch),this.mindMap.off("search_info_change",this.handleSearchInfoChange),this.mindMap.keyCommand.removeShortcut("Control+f",this.showSearch)},methods:{isUndef:v["I"],handleSearchInfoChange(e){this.currentIndex=e.currentIndex+1,this.total=e.total,this.showSearchInfo=!0},showSearch(){this.$bus.$emit("closeSideBar"),this.show=!0},hideReplaceInput(){this.showReplaceInput=!1,this.replaceText=""},onSearchNext(){this.mindMap.search.search(this.searchText,()=>{this.$refs.searchInputRef.focus()})},replace(){this.mindMap.search.replace(this.replaceText,!0)},replaceAll(){this.mindMap.search.replaceAll(this.replaceText)},close(){this.show=!1,this.showSearchInfo=!1,this.total=0,this.currentIndex=0,this.searchText="",this.hideReplaceInput(),this.mindMap.search.endSearch()},onMouseleave(){this.$refs.searchInputRef&&this.$refs.searchInputRef.blur(),this.$refs.replaceInputRef&&this.$refs.replaceInputRef.blur()}}},qg=Ug,Gg=(n("c6fd"),Object(p["a"])(qg,jg,Hg,!1,null,"6455708e",null)),Wg=Gg.exports,Vg=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("nodeIconSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.icon"),name:"icon"}}),t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.sticker"),name:"image"}})],1),t("div",{staticClass:"boxContent"},["icon"===e.activeName?t("div",{staticClass:"iconBox"},e._l(e.nodeIconList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(r){return t("div",{key:r.name,staticClass:"icon",class:{selected:e.iconList.includes(n.type+"_"+r.name)},domProps:{innerHTML:e._s(e.getHtml(r.icon))},on:{click:function(t){return e.setIcon(n.type,r.name)}}})})),0)])})),0):e._e(),"image"===e.activeName?t("div",{staticClass:"imageBox"},e._l(e.nodeImageList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(n){return t("div",{key:n.url,staticClass:"icon",class:{selected:e.nodeImage===n.url},on:{click:function(t){return e.setImage(n)}}},[t("img",{attrs:{src:n.url,alt:""}})])})),0)])})),0):e._e()])],1)])},Yg=[],Zg=n("7cc6"),Kg=n.n(Zg),Xg=n("a493"),Jg=n.n(Xg),Qg=n("e921"),$g=n.n(Qg),ev=n("6490"),tv=n.n(ev),nv=n("41c5"),rv=n.n(nv),iv=n("b684"),ov=n.n(iv),av=n("4f5a"),sv=n.n(av),lv=n("9c85"),cv=n.n(lv),uv=n("3247"),hv=n.n(uv),dv=n("26eb"),fv=n.n(dv),pv=n("9f18"),mv=n.n(pv),gv=n("eab8"),vv=n.n(gv),bv=n("ad10"),yv=n.n(bv),wv=n("fe40"),xv=n.n(wv),kv=n("f670"),Av=n.n(kv),Cv=n("b8fe"),Ev=n.n(Cv),Sv=n("a641"),Tv=n.n(Sv),Nv=n("4910"),Mv=n.n(Nv),Lv=n("b765"),Ov=n.n(Lv),Dv=n("347b"),Pv=n.n(Dv),Iv=n("577e6"),Rv=n.n(Iv),Fv=n("c99b"),zv=n.n(Fv),Bv=n("3acd"),_v=n.n(Bv),jv=n("e40b"),Hv=n.n(jv),Uv=n("f6d6"),qv=n.n(Uv),Gv=n("aecb"),Wv=n.n(Gv),Vv=n("299e"),Yv=n.n(Vv),Zv=n("de62"),Kv=n.n(Zv),Xv=n("9537"),Jv=n.n(Xv),Qv=n("ea51"),$v=n.n(Qv),eb=n("e114"),tb=n.n(eb),nb=n("e274"),rb=n.n(nb),ib=n("9643"),ob=n.n(ib),ab=n("ac4f"),sb=n.n(ab),lb=n("f54b"),cb=n.n(lb),ub=n("e8ae"),hb=n.n(ub),db=n("fae8"),fb=n.n(db),pb=n("8763"),mb=n.n(pb),gb=n("5fd6"),vb=n.n(gb),bb=n("33d7"),yb=n.n(bb),wb=n("9cf4"),xb=n.n(wb),kb=n("e34b"),Ab=n.n(kb),Cb=n("ca39"),Eb=n.n(Cb),Sb=n("1faf"),Tb=n.n(Sb),Nb=n("ae00"),Mb=n.n(Nb),Lb=n("eadc"),Ob=n.n(Lb),Db=n("82b0"),Pb=n.n(Db),Ib=n("da5e"),Rb=n.n(Ib),Fb=n("b75f"),zb=n.n(Fb),Bb=n("290f"),_b=n.n(Bb),jb=n("8113"),Hb=n.n(jb),Ub=n("4244"),qb=n.n(Ub),Gb=n("3469"),Wb=n.n(Gb),Vb=n("e531"),Yb=n.n(Vb),Zb=n("8b39"),Kb=n.n(Zb),Xb=n("1bc3"),Jb=n.n(Xb),Qb=n("12b7"),$b=n.n(Qb),ey=n("25cac"),ty=n.n(ey),ny=n("0e5fa"),ry=n.n(ny),iy=n("8cd8"),oy=n.n(iy),ay=n("655f"),sy=n.n(ay),ly=n("e00a"),cy=n.n(ly),uy=n("594c"),hy=n.n(uy),dy=n("8484"),fy=n.n(dy),py=n("a8729"),my=n.n(py),gy=n("b019"),vy=n.n(gy),by=n("8ce6"),yy=n.n(by),wy=n("7d59"),xy=n.n(wy),ky=n("265a"),Ay=n.n(ky),Cy=n("9461"),Ey=n.n(Cy),Sy=n("da72"),Ty=n.n(Sy),Ny=n("b93d"),My=n.n(Ny),Ly=n("8f8b"),Oy=n.n(Ly),Dy=n("9897"),Py=n.n(Dy),Iy=n("c442"),Ry=n.n(Iy),Fy=n("7f93"),zy=n.n(Fy),By=n("24c7"),_y=n.n(By),jy=n("cacf"),Hy=n.n(jy),Uy=n("6ade"),qy=n.n(Uy),Gy=n("5a18"),Wy=n.n(Gy),Vy=n("5b16"),Yy=n.n(Vy),Zy=n("e35d"),Ky=n.n(Zy),Xy=n("3d18"),Jy=n.n(Xy),Qy=n("3bd3"),$y=n.n(Qy),ew=n("0a8f"),tw=n.n(ew),nw=n("318a"),rw=n.n(nw),iw=n("17f2"),ow=n.n(iw),aw=n("1c6b"),sw=n.n(aw),lw=n("482d"),cw=n.n(lw),uw=n("f796"),hw=n.n(uw),dw=n("049e"),fw=n.n(dw),pw=n("1e35"),mw=n.n(pw),gw=n("c97e"),vw=n.n(gw),bw=n("d67c"),yw=n.n(bw),ww=n("369f"),xw=n.n(ww),kw=n("5e32"),Aw=n.n(kw),Cw=n("e362"),Ew=n.n(Cw),Sw=n("6412"),Tw=n.n(Sw),Nw=n("0914"),Mw=n.n(Nw),Lw=n("22a7"),Ow=n.n(Lw),Dw=n("cace"),Pw=n.n(Dw),Iw=n("528d"),Rw=n.n(Iw),Fw=n("43cf"),zw=n.n(Fw),Bw=n("d875"),_w=n.n(Bw),jw=n("c87a"),Hw=n.n(jw),Uw=n("ea46"),qw=n.n(Uw),Gw=n("60fc"),Ww=n.n(Gw),Vw=n("07f3"),Yw=n.n(Vw),Zw=n("5023"),Kw=n.n(Zw),Xw=n("e437"),Jw=n.n(Xw),Qw=n("7f10"),$w=n.n(Qw),ex=n("a747"),tx=n.n(ex),nx=n("b46e"),rx=n.n(nx),ix=n("bd3c"),ox=n.n(ix),ax=n("7a10"),sx=n.n(ax),lx=n("0fb5"),cx=n.n(lx),ux=n("5af9"),hx=n.n(ux),dx=n("ba0f"),fx=n.n(dx),px=n("21cd"),mx=n.n(px),gx=n("35aa"),vx=n.n(gx),bx=n("aee9"),yx=n.n(bx),wx=n("ded7"),xx=n.n(wx),kx=n("aac9"),Ax=n.n(kx),Cx=n("0455"),Ex=n.n(Cx),Sx=n("027d"),Tx=n.n(Sx),Nx=n("f781"),Mx=n.n(Nx),Lx=n("7c97"),Ox=n.n(Lx),Dx=n("d271"),Px=n.n(Dx),Ix=n("cbf7"),Rx=n.n(Ix),Fx=n("a028"),zx=n.n(Fx),Bx=n("ca50"),_x=n.n(Bx),jx=n("ea3b"),Hx=n.n(jx),Ux=n("93af"),qx=n.n(Ux),Gx=n("2710"),Wx=n.n(Gx),Vx=n("3752"),Yx=n.n(Vx),Zx=n("8722"),Kx=n.n(Zx),Xx=n("3b50"),Jx=n.n(Xx),Qx=n("67dd"),$x=n.n(Qx),ek=n("229d"),tk=n.n(ek),nk=n("6d42"),rk=n.n(nk),ik=n("77f4"),ok=n.n(ik),ak=n("c53a"),sk=n.n(ak),lk=n("1485"),ck=n.n(lk),uk=n("b466"),hk=n.n(uk),dk=n("6705"),fk=n.n(dk),pk=n("b467"),mk=n.n(pk),gk=n("ee12"),vk=n.n(gk),bk=n("fee0"),yk=n.n(bk),wk=n("a3e0"),xk=n.n(wk),kk=n("bce0"),Ak=n.n(kk),Ck=n("9c58"),Ek=n.n(Ck),Sk=n("5e35"),Tk=n.n(Sk),Nk=n("6f5c"),Mk=n.n(Nk),Lk=n("a057"),Ok=n.n(Lk),Dk=n("2c41"),Pk=n.n(Dk),Ik=n("4659"),Rk=n.n(Ik),Fk=n("5082"),zk=n.n(Fk),Bk=n("9b17"),_k=n.n(Bk),jk=n("bd4d"),Hk=n.n(jk),Uk=n("0e25"),qk=n.n(Uk),Gk=n("7be0"),Wk=n.n(Gk),Vk=n("29dc"),Yk=n.n(Vk),Zk=n("e4a4"),Kk=n.n(Zk),Xk=n("5edb"),Jk=n.n(Xk),Qk=n("02a0"),$k=n.n(Qk),eA=n("3ec8"),tA=n.n(eA),nA=n("d5e5"),rA=n.n(nA),iA=n("2a43"),oA=n.n(iA),aA=n("ceaa"),sA=n.n(aA),lA=n("325b"),cA=n.n(lA),uA=n("98ee"),hA=n.n(uA),dA=n("0613"),fA=n.n(dA),pA=n("c5b2"),mA=n.n(pA),gA=n("c0b1"),vA=n.n(gA),bA=n("d4e4"),yA=n.n(bA),wA=n("4869"),xA=n.n(wA),kA=n("12a6"),AA=n.n(kA),CA=n("0bf4"),EA=n.n(CA),SA=n("14bd"),TA=n.n(SA),NA=n("a76c"),MA=n.n(NA),LA=n("8121"),OA=n.n(LA),DA=n("2783"),PA=n.n(DA),IA=n("65ee"),RA=n.n(IA),FA=n("db91"),zA=n.n(FA),BA=n("c80c"),_A=n.n(BA),jA=n("9f38"),HA=n.n(jA),UA=n("6c25"),qA=n.n(UA),GA=n("0e50"),WA=n.n(GA),VA=n("cd5f"),YA=n.n(VA),ZA=n("56d3"),KA=n.n(ZA),XA=n("2613"),JA=n.n(XA),QA=n("7e11"),$A=n.n(QA),eC=n("bf26"),tC=n.n(eC),nC=n("89c8"),rC=n.n(nC),iC=n("6d50"),oC=n.n(iC),aC=n("b0d8"),sC=n.n(aC),lC=n("a7fd"),cC=n.n(lC),uC=n("0082"),hC=n.n(uC),dC=n("c8db"),fC=n.n(dC),pC=n("a3cc"),mC=n.n(pC),gC=n("222a"),vC=n.n(gC),bC=n("7718"),yC=n.n(bC),wC=n("c099"),xC=n.n(wC),kC=n("b259"),AC=n.n(kC),CC=n("c605"),EC=n.n(CC),SC=n("6d75"),TC=n.n(SC),NC=n("35ae"),MC=n.n(NC),LC=n("103a"),OC=n.n(LC),DC=n("813c"),PC=n.n(DC),IC=n("b291"),RC=n.n(IC),FC=n("14d4"),zC=n.n(FC),BC=n("be45"),_C=n.n(BC),jC=n("dbfc"),HC=n.n(jC),UC=n("227b"),qC=n.n(UC),GC=n("5227"),WC=n.n(GC),VC=[{name:"商务",list:[{url:Kg.a,width:100,height:100},{url:Jg.a,width:100,height:100},{url:$g.a,width:100,height:100},{url:tv.a,width:100,height:100},{url:rv.a,width:100,height:100},{url:ov.a,width:100,height:100},{url:sv.a,width:100,height:100},{url:cv.a,width:100,height:100},{url:hv.a,width:100,height:100},{url:fv.a,width:100,height:100},{url:mv.a,width:100,height:100},{url:vv.a,width:100,height:100},{url:yv.a,width:100,height:100},{url:xv.a,width:100,height:100},{url:Av.a,width:100,height:100},{url:Ev.a,width:100,height:100},{url:Tv.a,width:100,height:100},{url:Mv.a,width:100,height:100},{url:Ov.a,width:100,height:100},{url:Pv.a,width:100,height:100},{url:Rv.a,width:100,height:100},{url:zv.a,width:100,height:100},{url:_v.a,width:100,height:100},{url:Hv.a,width:100,height:100},{url:qv.a,width:100,height:100},{url:Wv.a,width:100,height:100},{url:Yv.a,width:100,height:100},{url:Kv.a,width:100,height:100},{url:Jv.a,width:100,height:100},{url:$v.a,width:100,height:100},{url:tb.a,width:100,height:100},{url:rb.a,width:100,height:100},{url:ob.a,width:100,height:100},{url:sb.a,width:100,height:100},{url:cb.a,width:100,height:100},{url:hb.a,width:100,height:100},{url:fb.a,width:100,height:100},{url:mb.a,width:100,height:100}]},{name:"教育",list:[{url:vb.a,width:100,height:100},{url:yb.a,width:100,height:100},{url:xb.a,width:100,height:100},{url:Ab.a,width:100,height:100},{url:Eb.a,width:100,height:100},{url:Tb.a,width:100,height:100},{url:Mb.a,width:100,height:100},{url:Ob.a,width:100,height:100},{url:Pb.a,width:100,height:100},{url:Rb.a,width:100,height:100},{url:zb.a,width:100,height:100},{url:_b.a,width:100,height:100},{url:Hb.a,width:100,height:100},{url:qb.a,width:100,height:100},{url:Wb.a,width:100,height:100},{url:Yb.a,width:100,height:100},{url:Kb.a,width:100,height:100},{url:Jb.a,width:100,height:100},{url:$b.a,width:100,height:100},{url:ty.a,width:100,height:100},{url:ry.a,width:100,height:100},{url:oy.a,width:100,height:100},{url:sy.a,width:100,height:100},{url:cy.a,width:100,height:100},{url:hy.a,width:100,height:100},{url:fy.a,width:100,height:100},{url:my.a,width:100,height:100},{url:vy.a,width:100,height:100},{url:yy.a,width:100,height:100},{url:xy.a,width:100,height:100},{url:Ay.a,width:100,height:100},{url:Ey.a,width:100,height:100},{url:Ty.a,width:100,height:100},{url:My.a,width:100,height:100},{url:Oy.a,width:100,height:100},{url:Py.a,width:100,height:100},{url:Ry.a,width:100,height:100},{url:zy.a,width:100,height:100},{url:_y.a,width:100,height:100},{url:Hy.a,width:100,height:100},{url:qy.a,width:100,height:100},{url:Wy.a,width:100,height:100},{url:Yy.a,width:100,height:100},{url:Ky.a,width:100,height:100},{url:Jy.a,width:100,height:100},{url:$y.a,width:100,height:100},{url:tw.a,width:100,height:100},{url:rw.a,width:100,height:100},{url:ow.a,width:100,height:100},{url:sw.a,width:100,height:100},{url:cw.a,width:100,height:100},{url:hw.a,width:100,height:100},{url:fw.a,width:100,height:100},{url:mw.a,width:100,height:100},{url:vw.a,width:100,height:100},{url:yw.a,width:100,height:100},{url:xw.a,width:100,height:100},{url:Aw.a,width:100,height:100},{url:Ew.a,width:100,height:100},{url:Tw.a,width:100,height:100},{url:Mw.a,width:100,height:100},{url:Ow.a,width:100,height:100},{url:Pw.a,width:100,height:100},{url:Rw.a,width:100,height:100},{url:zw.a,width:100,height:100},{url:_w.a,width:100,height:100},{url:Hw.a,width:100,height:100}]},{name:"节日",list:[{url:qw.a,width:100,height:100},{url:Ww.a,width:100,height:100},{url:Yw.a,width:100,height:100},{url:Kw.a,width:100,height:100},{url:Jw.a,width:100,height:100},{url:$w.a,width:100,height:100},{url:tx.a,width:100,height:100},{url:rx.a,width:100,height:100},{url:ox.a,width:100,height:100},{url:sx.a,width:100,height:100},{url:cx.a,width:100,height:100},{url:hx.a,width:100,height:100},{url:fx.a,width:100,height:100},{url:mx.a,width:100,height:100},{url:vx.a,width:100,height:100},{url:yx.a,width:100,height:100},{url:xx.a,width:100,height:100},{url:Ax.a,width:100,height:100},{url:Ex.a,width:100,height:100},{url:Tx.a,width:100,height:100}]},{name:"食物",list:[{url:Mx.a,width:100,height:100},{url:Ox.a,width:100,height:100},{url:Px.a,width:100,height:100},{url:Rx.a,width:100,height:100},{url:zx.a,width:100,height:100},{url:_x.a,width:100,height:100},{url:Hx.a,width:100,height:100},{url:qx.a,width:100,height:100},{url:Wx.a,width:100,height:100},{url:Yx.a,width:100,height:100},{url:Kx.a,width:100,height:100},{url:Jx.a,width:100,height:100},{url:$x.a,width:100,height:100},{url:tk.a,width:100,height:100},{url:rk.a,width:100,height:100},{url:ok.a,width:100,height:100},{url:sk.a,width:100,height:100},{url:ck.a,width:100,height:100},{url:hk.a,width:100,height:100},{url:fk.a,width:100,height:100},{url:mk.a,width:100,height:100},{url:vk.a,width:100,height:100},{url:yk.a,width:100,height:100},{url:xk.a,width:100,height:100},{url:Ak.a,width:100,height:100},{url:Ek.a,width:100,height:100},{url:Tk.a,width:100,height:100},{url:Mk.a,width:100,height:100},{url:Ok.a,width:100,height:100},{url:Pk.a,width:100,height:100}]},{name:"医疗",list:[{url:Rk.a,width:100,height:100},{url:zk.a,width:100,height:100},{url:_k.a,width:100,height:100},{url:Hk.a,width:100,height:100},{url:qk.a,width:100,height:100},{url:Wk.a,width:100,height:100},{url:Yk.a,width:100,height:100},{url:Kk.a,width:100,height:100},{url:Jk.a,width:100,height:100},{url:$k.a,width:100,height:100},{url:tA.a,width:100,height:100},{url:rA.a,width:100,height:100},{url:oA.a,width:100,height:100},{url:sA.a,width:100,height:100},{url:cA.a,width:100,height:100},{url:hA.a,width:100,height:100},{url:fA.a,width:100,height:100},{url:mA.a,width:100,height:100},{url:vA.a,width:100,height:100},{url:yA.a,width:100,height:100}]},{name:"工具",list:[{url:xA.a,width:100,height:100},{url:AA.a,width:100,height:100},{url:EA.a,width:100,height:100},{url:TA.a,width:100,height:100},{url:MA.a,width:100,height:100},{url:OA.a,width:100,height:100},{url:PA.a,width:100,height:100},{url:RA.a,width:100,height:100},{url:zA.a,width:100,height:100},{url:_A.a,width:100,height:100},{url:HA.a,width:100,height:100},{url:qA.a,width:100,height:100},{url:WA.a,width:100,height:100},{url:YA.a,width:100,height:100},{url:KA.a,width:100,height:100},{url:JA.a,width:100,height:100},{url:$A.a,width:100,height:100},{url:tC.a,width:100,height:100},{url:rC.a,width:100,height:100},{url:oC.a,width:100,height:100}]},{name:"旅行",list:[{url:sC.a,width:100,height:100},{url:cC.a,width:100,height:100},{url:hC.a,width:100,height:100},{url:fC.a,width:100,height:100},{url:mC.a,width:100,height:100},{url:vC.a,width:100,height:100},{url:yC.a,width:100,height:100},{url:xC.a,width:100,height:100},{url:AC.a,width:100,height:100},{url:EC.a,width:100,height:100},{url:TC.a,width:100,height:100},{url:MC.a,width:100,height:100},{url:OC.a,width:100,height:100},{url:PC.a,width:100,height:100},{url:RC.a,width:100,height:100},{url:zC.a,width:100,height:100},{url:_C.a,width:100,height:100},{url:HC.a,width:100,height:100},{url:qC.a,width:100,height:100},{url:WC.a,width:100,height:100}]}],YC={name:"NodeIconSidebar",components:{Sidebar:cp},data(){return{activeName:"icon",nodeIconList:Object(v["M"])([...D,...H]),nodeImageList:[...VC],iconList:[],nodeImage:"",activeNodes:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark"])},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeIconSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive),this.$bus.$on("showNodeIcon",this.handleShowNodeIcon)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive),this.$bus.$off("showNodeIcon",this.handleShowNodeIcon)},methods:{handleNodeActive(...e){if(this.activeNodes=[...e[1]],this.activeNodes.length>0)if(1===this.activeNodes.length){let e=this.activeNodes[0];this.nodeImage=e.getData("image")||"",this.iconList=e.getData("icon")||[]}else this.nodeImage=[],this.iconList=[];else this.iconList=[],this.nodeImage=""},handleShowNodeIcon(){this.dialogVisible=!0},getHtml(e){return/^`},setIcon(e,t){this.activeNodes.forEach(n=>{const r=[...n.getData("icon")||[]];let i=e+"_"+t,o=r.findIndex(e=>e===i);if(-1!==o)r.splice(o,1);else{let t=r.findIndex(t=>t.split("_")[0]===e);-1!==t?r.splice(t,1,i):r.push(i)}n.setIcon(r),1===this.activeNodes.length&&(this.iconList=r)})},setImage(e){this.activeNodes.forEach(t=>{this.nodeImage=e.url,t.setImage({...e})})}}},ZC=YC,KC=(n("fff4"),Object(p["a"])(ZC,Vg,Yg,!1,null,"6adf6422",null)),XC=KC.exports,JC=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showNodeIconToolbar,expression:"showNodeIconToolbar"}],ref:"nodeIconToolbar",staticClass:"nodeIconToolbar",style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("div",{staticClass:"iconListBox"},e._l(e.iconList,(function(n){return t("div",{key:n.name,staticClass:"icon",class:{selected:e.nodeIconList.includes(e.iconType+"_"+n.name)},domProps:{innerHTML:e._s(e.getHtml(n.icon))},on:{click:function(t){return e.setIcon(n.name)}}})})),0),t("div",{staticClass:"btnBox"},[t("span",{staticClass:"btn iconfont iconshanchu",on:{click:e.deleteIcon}})])])},QC=[];const $C=[...D,...H];var eE={name:"NodeIconToolbar",components:{},props:{mindMap:{type:Object}},data(){return{showNodeIconToolbar:!1,style:{left:0,top:0},node:null,iconType:"",iconName:"",nodeIconList:[],iconList:[]}},computed:{...Object(se["d"])(["activeSidebar"])},created(){this.mindMap.on("node_icon_click",this.show),this.mindMap.on("draw_click",this.close),this.mindMap.on("svg_mousedown",this.close),this.mindMap.on("node_dblclick",this.close),this.mindMap.on("node_active",this.onNodeActive),this.mindMap.on("scale",this.onScale),this.$bus.$on("close_node_icon_toolbar",this.close)},mounted(){document.body.append(this.$refs.nodeIconToolbar)},beforeDestroy(){this.mindMap.off("node_icon_click",this.show),this.mindMap.off("draw_click",this.close),this.mindMap.off("svg_mousedown",this.close),this.mindMap.off("node_dblclick",this.close),this.mindMap.off("node_active",this.onNodeActive),this.mindMap.off("scale",this.onScale),this.$bus.$off("close_node_icon_toolbar",this.close)},methods:{...Object(se["c"])(["setActiveSidebar"]),show(e,t){this.node=e,this.iconType=t.split("_")[0],this.iconName=t.split("_")[1],this.nodeIconList=e.getData("icon")||[],this.iconList=[...$C.find(e=>e.type===this.iconType).list],this.updatePos(),this.showNodeIconToolbar=!0,"nodeIconSidebar"===this.activeSidebar&&this.setActiveSidebar("")},close(){this.showNodeIconToolbar=!1,this.node=null,this.iconType="",this.iconName="",this.nodeIconList=[],this.iconList=[],this.style.left=0,this.style.top=0},updatePos(){if(!this.node)return;const e=this.node.getRect();this.style.left=e.x+"px",this.style.top=e.y+e.height+"px"},onScale(){this.updatePos()},onNodeActive(e){e!==this.node&&this.close()},deleteIcon(){this.setIcon(this.iconName),this.close()},getHtml(e){return/^`},setIcon(e){let t=this.iconType+"_"+e,n=this.nodeIconList.findIndex(e=>e===t);if(-1!==n)this.nodeIconList.splice(n,1);else{let n=this.nodeIconList.findIndex(e=>e.split("_")[0]===this.iconType);-1!==n?(this.nodeIconList.splice(n,1,t),this.iconName=e):this.nodeIconList.push(t)}this.node.setIcon([...this.nodeIconList])}}},tE=eE,nE=(n("e6d0"),Object(p["a"])(tE,JC,QC,!1,null,"1321abee",null)),rE=nE.exports,iE=function(){var e=this,t=e._self._c;return e.isOutlineEdit?t("div",{ref:"outlineEditContainer",staticClass:"outlineEditContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"closeBtn",on:{click:e.onClose}},[t("span",{staticClass:"icon iconfont iconguanbi"})]),t("div",{ref:"outlineEditBox",staticClass:"outlineEditBox"},[t("div",{staticClass:"outlineEdit"},[t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"current-change":e.onCurrentChange},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{blur:function(t){return e.onBlur(t,n)},keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},paste:function(t){return e.onPaste(t,n)}}})])}}],null,!1,485109613)})],1)])]):e._e()},oE=[],aE={name:"OutlineEdit",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null}},computed:{...Object(se["d"])(["isOutlineEdit","isDark","isReadonly"])},watch:{isOutlineEdit(e){e&&(this.refresh(),this.$nextTick(()=>{document.body.appendChild(this.$refs.outlineEditContainer)}))}},created(){window.addEventListener("keydown",this.onKeyDown)},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown)},methods:{...Object(se["c"])(["setIsOutlineEdit"]),refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=(e.data.richText?Object(v["O"])(e.data.text):e.data.text).replaceAll(/\n/g,"
");n=Object(v["E"])(n),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},checkAllowDrag(e){return!e.data.root},onNodeDrop(){this.save()},onCurrentChange(e){this.currentData=e},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return;const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText;t.data.data.text=n?Object(v["bb"])(r):r,n&&(t.data.data.resetRichText=!0),t.data.textCache=e.target.innerHTML,this.save()},onNodeInputKeydown(e,t){const n=!!t.data.data.richText,r=Object(v["m"])(),i=this.$t("outline.nodeDefaultText"),o={textCache:i,uid:r,label:i,data:{text:n?Object(v["bb"])(i):i,uid:r,richText:n},children:[]};if(n&&(o.data.resetRichText=!0),13===e.keyCode&&!e.shiftKey){if(e.preventDefault(),t.data.root)return;this.$refs.tree.insertAfter(o,t)}9===e.keyCode&&(e.preventDefault(),this.$refs.tree.append(o,t)),this.save(),this.$nextTick(()=>{this.$refs.tree.setCurrentKey(r);const e=document.querySelector(`.customNode[data-id="${r}"] .nodeEdit`);if(e){let t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n);let r=e.offsetTop;this.scrollTo(r)}})},onKeyDown(e){this.isOutlineEdit&&[46,8].includes(e.keyCode)&&this.currentData&&(e.stopPropagation(),this.$refs.tree.remove(this.currentData),this.currentData=null,this.save())},onPaste(e){e.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument();let n=(e.clipboardData||window.clipboardData).getData("text");n=Object(v["z"])(n),n=n.replaceAll(/\n/g,"");const r=document.createTextNode(n);t.getRangeAt(0).insertNode(r),t.collapseToEnd()},getKey(){return Math.random()},onClose(){this.setIsOutlineEdit(!1),this.$bus.$emit("setData",this.getData())},scrollTo(e){let t=this.$refs.outlineEditBox,n=t.offsetHeight,r=t.scrollTop;e+=50,e>r+n&&t.scrollTo(0,e-n/2)},getData(){let e={},t=this.data[0],n=(e,t)=>{t.data=e.data,t.children=[],(e.children||[]).forEach(e=>{const r={};t.children.push(r),n(e,r)})};return n(t,e),Object(v["ab"])(e)},save(){Object(Wi["e"])(this.getData())}}},sE=aE,lE=(n("fdc4"),Object(p["a"])(sE,iE,oE,!1,null,"07021e90",null)),cE=lE.exports;let uE=null;const hE=()=>{uE=qi["Loading"].service({lock:!0})},dE=()=>{uE&&(uE.close(),uE=null)},fE=async e=>{try{try{Array.isArray(e)||(e=String(e).replace("￿\ufeff",""),e=JSON.parse(e))}catch(t){console.log(t)}Array.isArray(e)||(e=[]);const n=[],r=[],i=(e,n)=>{e.forEach(async e=>{let o={};if(n.push(o),o.data={text:e.data.text,hyperlink:e.data.hyperlink,hyperlinkTitle:e.data.hyperlinkTitle,note:e.data.note},e.data.image){let n=null,i=new Promise(e=>{n=e});r.push(i);try{o.data.image=await Object(v["F"])(e.data.image),o.data.imageSize=e.data.imageSize,n()}catch(t){n()}}if(o.children=[],e.children&&e.children.length>0){const t=[];e.children.forEach(e=>{"generalize"===e.data.type?o.data.generalization={text:e.data.text}:t.push(e)}),i(t,o.children)}})};return i(e,n),await Promise.all(r),{simpleMindMap:!0,data:n}}catch(t){return""}},pE=async e=>{try{let t=JSON.parse(e);if(void 0!==t.__c_zx_v){const e=await fE(t.children);return e}}catch(t){}if(e.includes("￿\ufeff")){const t=await fE(e);return t}return""};var mE=pE,gE=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scrollbarContainer",class:{isDark:e.isDark}},[t("div",{ref:"verticalScrollbarRef",staticClass:"scrollbar verticalScrollbar",on:{click:e.onVerticalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.verticalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onVerticalScrollbarMousedown}})]),t("div",{ref:"horizontalScrollbarRef",staticClass:"scrollbar horizontalScrollbar",on:{click:e.onHorizontalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.horizontalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onHorizontalScrollbarMousedown}})])])},vE=[],bE={props:{mindMap:{type:Object}},data(){return{timer:null,resizeTimer:null,verticalScrollbarStyle:{},horizontalScrollbarStyle:{}}},computed:{...Object(se["d"])(["isDark"])},mounted(){this.setScrollBarWrapSize(),this.$bus.$on("scrollbar_change",this.updateScrollbar),window.addEventListener("resize",this.onResize)},beforeDestroy(){this.$bus.$off("scrollbar_change",this.updateScrollbar),window.removeEventListener("resize",this.onResize)},methods:{setScrollBarWrapSize(){const{width:e}=this.$refs.horizontalScrollbarRef.getBoundingClientRect(),{height:t}=this.$refs.verticalScrollbarRef.getBoundingClientRect();this.mindMap.scrollbar.setScrollBarWrapSize(e,t)},onResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.setScrollBarWrapSize()},300)},updateScrollbar({vertical:e,horizontal:t}){this.verticalScrollbarStyle={top:e.top+"%",height:e.height+"%"},this.horizontalScrollbarStyle={left:t.left+"%",width:t.width+"%"}},onVerticalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"vertical")},onVerticalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"vertical")},onHorizontalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"horizontal")},onHorizontalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"horizontal")}}},yE=bE,wE=(n("3561"),Object(p["a"])(yE,gE,vE,!1,null,"41219b84",null)),xE=wE.exports,kE=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("formulaSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("div",{staticClass:"formulaInputBox"},[t("el-input",{attrs:{rows:4,resize:"none",type:"textarea",placeholder:e.$t("formulaSidebar.placeholder")},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.formulaText,callback:function(t){e.formulaText=t},expression:"formulaText"}}),t("el-button",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{size:"small"},on:{click:e.confirm}},[e._v(e._s(e.$t("formulaSidebar.confirm")))])],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("formulaSidebar.common")))]),t("div",{staticClass:"formulaList"},e._l(e.list,(function(n,r){return t("div",{key:r,staticClass:"formulaItem"},[t("div",{staticClass:"overview",domProps:{innerHTML:e._s(n.overview)}}),t("div",{staticClass:"text",on:{click:function(t){e.formulaText=n.text}}},[e._v(" "+e._s(n.text)+" ")])])})),0)])])},AE=[],CE={name:"FormulaSidebar",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{formulaText:"",list:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark","localConfig"])},watch:{activeSidebar(e){this.$refs.sidebar.show="formulaSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive)},mounted(){this.init()},methods:{...Object(se["c"])(["setActiveSidebar"]),init(){this.list=Up.map(e=>({overview:window.katex.renderToString(e,{throwOnError:!1,output:"mathml"}),text:e}))},handleNodeActive(...e){this.activeNodes=[...e[1]],this.activeNodes.length<=0&&"formulaSidebar"===this.activeSidebar&&this.setActiveSidebar(null)},confirm(){if(!this.localConfig.openNodeRichText)return this.$message.warning(this.$t("formulaSidebar.tip"));let e=this.formulaText.trim();e&&this.mindMap.execCommand("INSERT_FORMULA",e)}}},EE=CE,SE=(n("2c02"),Object(p["a"])(EE,kE,AE,!1,null,"24ccf624",null)),TE=SE.exports;wd.usePlugin(kd).usePlugin(Cd).usePlugin(Wd).usePlugin(Sd).usePlugin(Md).usePlugin(Od).usePlugin(qd).usePlugin(Yd).usePlugin(Bf).usePlugin(Uf).usePlugin(jf).usePlugin(Gf).usePlugin(Vf).usePlugin(Zf).usePlugin(Qf),tm.forEach(e=>{wd.defineTheme(e.value,e.theme)});var NE={name:"Edit",components:{OutlineSidebar:yp,Style:Op,BaseStyle:zp,Theme:om,Structure:hm,Count:bm,NavigatorToolbar:Gm,ShortcutKey:Xm,Contextmenu:ng,RichTextToolbar:lg,NodeNoteContentShow:gg,Navigator:kg,NodeImgPreview:Ng,SidebarTrigger:Ig,Search:Wg,NodeIconSidebar:XC,NodeIconToolbar:rE,OutlineEdit:cE,Scrollbar:xE,FormulaSidebar:TE},data(){return{enableShowLoading:!0,mindMap:null,mindMapData:null,prevImg:"",storeConfigTimer:null}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,openNodeRichText:e=>e.localConfig.openNodeRichText,useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag,isShowScrollbar:e=>e.localConfig.isShowScrollbar})},watch:{openNodeRichText(){this.openNodeRichText?this.addRichTextPlugin():this.removeRichTextPlugin()}},mounted(){hE(),this.getData(),this.init(),this.$bus.$on("execCommand",this.execCommand),this.$bus.$on("paddingChange",this.onPaddingChange),this.$bus.$on("export",this.export),this.$bus.$on("setData",this.setData),this.$bus.$on("startTextEdit",this.handleStartTextEdit),this.$bus.$on("endTextEdit",this.handleEndTextEdit),this.$bus.$on("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$on("startPainter",this.handleStartPainter),this.$bus.$on("node_tree_render_end",this.handleHideLoading),this.$bus.$on("showLoading",this.handleShowLoading),window.addEventListener("resize",this.handleResize)},beforeDestroy(){this.$bus.$off("execCommand",this.execCommand),this.$bus.$off("paddingChange",this.onPaddingChange),this.$bus.$off("export",this.export),this.$bus.$off("setData",this.setData),this.$bus.$off("startTextEdit",this.handleStartTextEdit),this.$bus.$off("endTextEdit",this.handleEndTextEdit),this.$bus.$off("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$off("startPainter",this.handleStartPainter),this.$bus.$off("node_tree_render_end",this.handleHideLoading),this.$bus.$off("showLoading",this.handleShowLoading),window.removeEventListener("resize",this.handleResize),this.mindMap.destroy()},methods:{handleStartTextEdit(){this.mindMap.renderer.startTextEdit()},handleEndTextEdit(){this.mindMap.renderer.endTextEdit()},handleCreateLineFromActiveNode(){this.mindMap.associativeLine.createLineFromActiveNode()},handleStartPainter(){this.mindMap.painter.startPainter()},handleResize(){this.mindMap.resize()},handleShowLoading(){this.enableShowLoading=!0,hE()},handleHideLoading(){this.enableShowLoading&&(this.enableShowLoading=!1,dE())},getData(){let e=Object(Wi["a"])();this.mindMapData=e},bindSaveEvent(){this.$bus.$on("data_change",e=>{Object(Wi["e"])(e)}),this.$bus.$on("view_data_change",e=>{clearTimeout(this.storeConfigTimer),this.storeConfigTimer=setTimeout(()=>{Object(Wi["d"])({view:e})},300)})},manualSave(){let e=this.mindMap.getData(!0);Object(Wi["d"])(e)},init(){let e=this.hasFileURL(),{root:t,layout:n,theme:r,view:i,config:o}=this.mindMapData;e&&(t={data:{text:this.$t("edit.root")},children:[]},n=Gi["a"].layout,r=Gi["a"].theme,i=null),this.mindMap=new wd({el:this.$refs.mindMapContainer,data:t,fit:!1,layout:n,theme:r.template,themeConfig:r.config,viewData:i,nodeTextEditZIndex:1e3,nodeNoteTooltipZIndex:1e3,customNoteContentShow:{show:(e,t,n,r)=>{this.$bus.$emit("showNoteContent",e,t,n,r)},hide:()=>{}},...o||{},iconList:[...H],useLeftKeySelectionRightKeyDrag:this.useLeftKeySelectionRightKeyDrag,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!0,customHandleClipboardText:mE,handleIsSplitByWrapOnPasteCreateNewNode:()=>this.$confirm(this.$t("edit.splitByWrap"),this.$t("edit.tip"),{confirmButtonText:this.$t("edit.yes"),cancelButtonText:this.$t("edit.no"),type:"warning"}),errorHandler:(e,t)=>{switch(console.error(t),e){case"export_error":this.$message.error("导出失败");break;default:break}}}),this.openNodeRichText&&this.addRichTextPlugin(),this.mindMap.keyCommand.addShortcut("Control+s",()=>{this.manualSave()}),["node_active","data_change","view_data_change","back_forward","node_contextmenu","node_click","draw_click","expand_btn_click","svg_mousedown","mouseup","mode_change","node_tree_render_end","rich_text_selection_change","transforming-dom-to-images","generalization_node_contextmenu","painter_start","painter_end","scrollbar_change","scale"].forEach(e=>{this.mindMap.on(e,(...t)=>{this.$bus.$emit(e,...t)})}),this.bindSaveEvent(),this.testDynamicCreateNodes(),window.takeOverApp&&this.$bus.$emit("app_inited",this.mindMap),e&&this.$bus.$emit("handle_file_url"),this.cooperateTest()},hasFileURL(){const e=this.$route.query.fileURL;return!!e&&/\.(smm|json|xmind|md|xlsx)$/.test(e)},setData(e){this.handleShowLoading(),e.root?this.mindMap.setFullData(e):this.mindMap.setData(e),this.mindMap.view.reset(),this.manualSave()},reRender(){this.mindMap.reRender()},execCommand(...e){this.mindMap.execCommand(...e)},async export(...e){try{hE(),await this.mindMap.export(...e),dE()}catch(t){console.log(t),dE()}},onPaddingChange(e){this.mindMap.updateConfig(e)},showNewFeatureInfo(){let e=localStorage.getItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1");e||this.$notify.info({title:this.$t("edit.newFeatureNoticeTitle"),message:this.$t("edit.newFeatureNoticeMessage"),duration:0,onClose:()=>{localStorage.setItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1",!0)}})},addRichTextPlugin(){this.mindMap&&this.mindMap.addPlugin(nf)},removeRichTextPlugin(){this.mindMap.removePlugin(nf)},testDynamicCreateNodes(){setTimeout(()=>{},5e3)},cooperateTest(){this.mindMap.cooperate&&this.$route.query.userName&&(this.mindMap.cooperate.setProvider(null,{roomName:"demo-room",signalingList:["ws://192.168.3.125:4444"]}),this.mindMap.cooperate.setUserInfo({id:Math.random(),name:this.$route.query.userName,color:["#409EFF","#67C23A","#E6A23C","#F56C6C","#909399"][Math.floor(5*Math.random())],avatar:Math.random()>.5?"https://img0.baidu.com/it/u=4270674549,2416627993&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1696006800&t=4d32871d14a7224a4591d0c3c7a97311":""}))}}},ME=NE,LE=(n("15ec"),Object(p["a"])(ME,ro,io,!1,null,"b74ec01c",null)),OE=LE.exports,DE={name:"Index",components:{Toolbar:no,Edit:OE},data(){return{show:!1}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.isDark,activeSidebar:e=>e.activeSidebar})},watch:{isDark(){this.setBodyDark()}},async created(){this.initLocalConfig();const e=this.$loading({lock:!0,text:this.$t("other.loading")});await this.getUserMindMapData(),this.show=!0,e.close(),this.setBodyDark()},methods:{...Object(se["b"])(["getUserMindMapData"]),...Object(se["c"])(["setLocalConfig"]),initLocalConfig(){let e=Object(Wi["c"])();e&&this.setLocalConfig({...this.$store.state.localConfig,...e})},setBodyDark(){this.isDark?document.body.classList.add("isDark"):document.body.classList.remove("isDark")}}},PE=DE,IE=(n("dd87"),Object(p["a"])(PE,i,o,!1,null,null,null));t["default"]=IE.exports},"5fd6":function(e,t,n){e.exports=n.p+"img/DNA.svg"},6005:function(e,t,n){"use strict";var r=n("a578"),i=n("cc50"),o=n("2f2d"),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},"60fc":function(e,t,n){e.exports=n.p+"img/chunjie.svg"},6171:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},"61d3":function(e,t,n){},"61eb":function(e,t,n){"use strict";var r=n("54be"),i=n("6e16");e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},6276:function(e,t,n){e.exports=n.p+"img/skyGreen.jpg"},6277:function(e,t,n){},"63dc":function(e,t,n){},6412:function(e,t,n){e.exports=n.p+"img/tingzhenqi.svg"},6490:function(e,t,n){e.exports=n.p+"img/-_11.svg"},"655f":function(e,t,n){e.exports=n.p+"img/a-shu2.svg"},"65ee":function(e,t,n){e.exports=n.p+"img/ziyuan_14.svg"},6705:function(e,t,n){e.exports=n.p+"img/quqi.svg"},"67dd":function(e,t,n){e.exports=n.p+"img/kafeibei.svg"},"682c":function(e,t,n){"use strict";var r=function(e){return i(e)&&!o(e)};function i(e){return!!e&&"object"===typeof e}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||l(e)}var a="function"===typeof Symbol&&Symbol.for,s=a?Symbol.for("react.element"):60103;function l(e){return e.$$typeof===s}function c(e){return Array.isArray(e)?[]:{}}function u(e,t){var n=t&&!0===t.clone;return n&&r(e)?f(c(e),e,t):e}function h(e,t,n){var i=e.slice();return t.forEach((function(t,o){"undefined"===typeof i[o]?i[o]=u(t,n):r(t)?i[o]=f(e[o],t,n):-1===e.indexOf(t)&&i.push(u(t,n))})),i}function d(e,t,n){var i={};return r(e)&&Object.keys(e).forEach((function(t){i[t]=u(e[t],n)})),Object.keys(t).forEach((function(o){r(t[o])&&e[o]?i[o]=f(e[o],t[o],n):i[o]=u(t[o],n)})),i}function f(e,t,n){var r=Array.isArray(t),i=Array.isArray(e),o=n||{arrayMerge:h},a=r===i;if(a){if(r){var s=o.arrayMerge||h;return s(e,t,n)}return d(e,t,n)}return u(t,n)}f.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return f(e,n,t)}))};var p=f;e.exports=p},"6ad8":function(e,t,n){e.exports=n.p+"img/lateNightOffice.jpg"},"6ade":function(e,t,n){e.exports=n.p+"img/fanyi.svg"},"6ba1":function(e,t,n){"use strict";var r=n("2f2d"),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},"6c12":function(e,t,n){"use strict";var r=n("46ab"),i=Error,o=r("".replace),a=function(e){return String(new i(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)while(t--)e=o(e,s,"");return e}},"6c25":function(e,t,n){e.exports=n.p+"img/ziyuan_18.svg"},"6c83":function(e,t,n){e.exports=n.p+"img/seaBlueLine.jpg"},"6d42":function(e,t,n){e.exports=n.p+"img/naixi.svg"},"6d50":function(e,t,n){e.exports=n.p+"img/ziyuan_9.svg"},"6d75":function(e,t,n){e.exports=n.p+"img/meishi.svg"},"6eac":function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d}));var r=n("9fd6"),i=n("5ab3"),o=n("9a8c"),a=n("9aca"),s=n("ca2d");const l=(e,t)=>{const n=s["b"](e).buffer,r=s["b"](t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(e=>crypto.subtle.deriveKey({name:"PBKDF2",salt:r,iterations:1e5,hash:"SHA-256"},e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},c=(e,t)=>{if(!t)return o["c"](e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(e=>{const t=r["e"]();return r["m"](t,"AES-GCM"),r["o"](t,n),r["o"](t,new Uint8Array(e)),r["f"](t)})},u=(e,t)=>{const n=r["e"]();return r["h"](n,e),c(r["f"](n),t)},h=(e,t)=>{if(!t)return o["c"](e);const n=i["e"](e),r=i["j"](n);"AES-GCM"!==r&&o["b"](a["a"]("Unknown encryption algorithm"));const s=i["l"](n),l=i["l"](n);return crypto.subtle.decrypt({name:"AES-GCM",iv:s},t,l).then(e=>new Uint8Array(e))},d=(e,t)=>h(e,t).then(e=>i["g"](i["e"](new Uint8Array(e))))},"6f27":function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return R})),n.d(t,"DOMParser",(function(){return re})),n.d(t,"DOMSerializer",(function(){return ye})),n.d(t,"Fragment",(function(){return s})),n.d(t,"Mark",(function(){return h})),n.d(t,"MarkType",(function(){return ee})),n.d(t,"Node",(function(){return D})),n.d(t,"NodeRange",(function(){return L})),n.d(t,"NodeType",(function(){return Q})),n.d(t,"ReplaceError",(function(){return d})),n.d(t,"ResolvedPos",(function(){return S})),n.d(t,"Schema",(function(){return te})),n.d(t,"Slice",(function(){return f})),r.prototype={constructor:r,find:function(e){for(var t=0;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var i=r;function o(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=o(i.content,a.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function a(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),l=t.child(--o),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);while(ee&&!1!==n(s,r+a,i||null,o)&&s.content.size){let i=a+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}a=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,s)=>{a.isText?(i+=a.text.slice(Math.max(e,s)-s,t-s),o=!n):a.isLeaf?(r?i+="function"===typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);ie)for(let i=0,o=0;oe&&((ot)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=s}return new s(n,r)}cutByIndex(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,i)}addToStart(e){return new s([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new s(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return s.empty;let t,n=0;for(let r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),t}}h.none=[];class d extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(p(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(s.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new f(e,n,r)}}function p(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(p(o.content,t-i-1,n-i-1)))}function m(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=m(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function g(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function x(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(w(e.nodeAfter,r),o++));for(let s=o;si&&y(e,t,i+1),a=r.depth>i&&y(n,r,i+1),l=[];return x(null,e,i,l),o&&a&&t.index(i)==n.index(i)?(b(o,a),w(k(o,A(e,t,n,r,i+1)),l)):(o&&w(k(o,C(e,t,i+1)),l),x(t,n,i,l),a&&w(k(a,C(n,r,i+1)),l)),x(r,null,i,l),new s(l)}function C(e,t,n){let r=[];if(x(null,e,n,r),e.depth>n){let i=y(e,t,n+1);w(k(i,C(e,t,n+1)),r)}return x(t,null,n,r),new s(r)}function E(e,t){let n=t.depth-e.openStart,r=t.node(n),i=r.copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(s.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}f.empty=new f(s.empty,0,0);class S{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return e=this.resolveDepth(e),0==e?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new L(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:e,offset:t}=o.content.findIndex(i),a=i-t;if(n.push(o,e,r+t),!a)break;if(o=o.child(e),o.isText)break;i=a-1,r+=t+1}return new S(t,n,i)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),I(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=s.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let s=r;se.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=s.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}D.prototype.text=void 0;class P extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):I(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new P(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new P(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function I(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class R{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new F(e,t);if(null==n.next)return R.empty;let r=z(n);n.next&&n.err("Unexpected trailing text");let i=Y(G(r));return Z(i,n),i}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?"*":" ")+" ";for(let i=0;i"+e.indexOf(t.next[i].next);return r}).join("\n")}}R.empty=new R(!0);class F{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function z(e){let t=[];do{t.push(B(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function B(e){let t=[];do{t.push(_(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function _(e){let t=q(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=H(e,t)}return t}function j(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function H(e,t){let n=j(e),r=n;return e.eat(",")&&(r="}"!=e.next?j(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function U(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let e=n[o];e.groups.indexOf(t)>-1&&i.push(e)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}function q(e){if(e.eat("(")){let t=z(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=U(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}function G(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function o(e,t){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(o(n,t)),[]);if("seq"!=e.type){if("star"==e.type){let a=n();return r(t,a),i(o(e.expr,a),a),[r(a)]}if("plus"==e.type){let a=n();return i(o(e.expr,t),a),i(o(e.expr,a),a),[r(a)]}if("opt"==e.type)return[r(t)].concat(o(e.expr,t));if("range"==e.type){let a=t;for(let t=0;t{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})})});let o=t[r.join(",")]=new R(r.indexOf(e.length-1)>-1);for(let e=0;e-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;tn[e]=new Q(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class ${constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class ee{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=J(r.attrs),this.excluded=null;let i=K(this.attrs);this.instance=i?new h(this,i):null}create(e=null){return!e&&this.instance?this.instance:new h(this,X(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new ee(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t-1}}class te{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=i.from(e.nodes),t.marks=i.from(e.marks||{}),this.nodes=Q.compile(this.spec.nodes,this),this.marks=ee.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let e=this.nodes[r],t=e.spec.content||"",i=e.spec.marks;e.contentMatch=n[t]||(n[t]=R.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==i?null:i?ne(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:ne(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new P(n,n.defaultAttrs,e,h.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return D.fromJSON(this,e)}markFromJSON(e){return h.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ne(e,t){let n=[];for(let r=0;r-1)&&n.push(a=r)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class re{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new de(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new de(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;re.length&&(61!=o.charCodeAt(e.length)||o.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r{n(e=ge(e)),e.mark=r})}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach(e=>{n(e=ge(e)),e.node=r})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new re(e,re.schemaRules(e)))}}const ie={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},oe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ae={ol:!0,ul:!0},se=1,le=2,ce=4;function ue(e,t,n){return null!=t?(t?se:0)|("full"===t?le:0):e&&"pre"==e.whitespace?se|le:n&~ce}class he{constructor(e,t,n,r,i,o,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=h.none,this.stashMarks=[],this.match=o||(a&ce?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(s.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&se)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=s.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;tthis.insertNode(e));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,a)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;a>=i;a--)if(o(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!e||e.name!=s&&-1==e.groups.indexOf(s))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=be(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n],i=r.pendingMarks.lastIndexOf(e);if(i>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function fe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ae.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}function pe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function me(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];while(t=n.exec(e))r.push(t[1],t[2].trim());return r}function ge(e){let t={};for(let n in e)t[n]=e[n];return t}function ve(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=e=>{o.push(e);for(let n=0;n{if(i.length||e.marks.length){let n=0,o=0;while(n=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ye.renderSpec(xe(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a=n?e.createElementNS(n,i):e.createElement(i),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s)){l=2;for(let e in s)if(null!=s[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),s[e]):a.setAttribute(e,s[e])}}for(let c=l;cl)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:o}=ye.renderSpec(e,i,n);if(a.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:a,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ye(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=we(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return we(e.marks)}}function we(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function xe(e){return e.document||window.document}},"6f5c":function(e,t,n){e.exports=n.p+"img/xilanhua.svg"},"6ffb":function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return p})),n.d(t,"EditorState",(function(){return S})),n.d(t,"NodeSelection",(function(){return d})),n.d(t,"Plugin",(function(){return N})),n.d(t,"PluginKey",(function(){return O})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return s})),n.d(t,"TextSelection",(function(){return u})),n.d(t,"Transaction",(function(){return x}));var r=n("6f27"),i=n("b923");const o=Object.create(null);class a{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new s(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;i--){let r=t<0?g(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):g(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new p(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new p(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}a.prototype.visible=!0;class s{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console["warn"]("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends a{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return a.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r["Slice"].empty){if(super.replace(e,t),t==r["Slice"].empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=a.findFrom(t,n,!0)||a.findFrom(t,-n,!0);if(!e)return a.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(a.findFrom(e,-n,!0)||a.findFrom(e,n,!0)).$anchor,e.pos0?0:1);i>0?a=0;a+=i){let r=t.child(a);if(r.isAtom){if(!o&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function v(e,t,n){let r=e.steps.length-1;if(r{null==s&&(s=r)}),e.setSelection(a.near(e.doc.resolve(s),n))}const b=1,y=2,w=4;class x extends i["e"]{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=y,this}ensureMarks(e){return r["Mark"].sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&y)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~y,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r["Mark"].none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=w,this}get scrolledIntoView(){return(this.updated&w)>0}}function k(e,t){return t&&e?e.bind(t):e}class A{constructor(e,t,n){this.name=e,this.init=k(t.init,n),this.apply=k(t.apply,n)}}const C=[new A("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new A("selection",{init(e,t){return e.selection||a.atStart(t.doc)},apply(e){return e.selection}}),new A("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new A("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class E{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=C.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new A(e.key,e.spec.state,e))})}}class S{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;ne.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new E(e.schema,e.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r["Node"].fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=a.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let a=n[r],s=a.spec.state;if(a.key==i.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(o[i.name]=s.fromJSON.call(a,e,t[r],o))}o[i.name]=i.init(e,o)}}),o}}function T(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=T(i,t,{})),n[r]=i}return n}class N{constructor(e){this.spec=e,this.props={},e.props&&T(e.props,this,this.props),this.key=e.key?e.key.key:L("plugin")}getState(e){return e[this.key]}}const M=Object.create(null);function L(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class O{constructor(e="key"){this.key=L(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},"6ffb0":function(e,t,n){"use strict";n("d4a0")},"703f":function(e,t,n){"use strict";n.r(t),n.d(t,"Decoration",(function(){return An})),n.d(t,"DecorationSet",(function(){return Sn})),n.d(t,"EditorView",(function(){return ir})),n.d(t,"__endComposition",(function(){return rr})),n.d(t,"__parseFromClipboard",(function(){return nr})),n.d(t,"__serializeForClipboard",(function(){return tr}));var r=n("6ffb"),i=n("6f27"),o=n("b923");const a=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},s=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let l=null;const c=function(e,t,n){let r=l||(l=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},u=function(e,t,n,r){return n&&(d(e,t,n,r,-1)||d(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function d(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||m(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=a(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(e=e.childNodes[t+(i<0?-1:0)],"false"==e.contentEditable)return!1;t=i<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(e,t,n){for(let r=0==t,i=t==f(e);r||i;){if(e==n)return!0;let t=a(e);if(e=e.parentNode,!e)return!1;r=r&&0==t,i=i&&t==f(e)}}function m(e){let t;for(let n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const g=function(e){return e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function v(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function b(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}const y="undefined"!=typeof navigator?navigator:null,w="undefined"!=typeof document?document:null,x=y&&y.userAgent||"",k=/Edge\/(\d+)/.exec(x),A=/MSIE \d/.exec(x),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(x),E=!!(A||C||k),S=A?document.documentMode:C?+C[1]:k?+k[1]:0,T=!E&&/gecko\/(\d+)/i.test(x);T&&(/Firefox\/(\d+)/.exec(x)||[0,0])[1];const N=!E&&/Chrome\/(\d+)/.exec(x),M=!!N,L=N?+N[1]:0,O=!E&&!!y&&/Apple Computer/.test(y.vendor),D=O&&(/Mobile\/\w+/.test(x)||!!y&&y.maxTouchPoints>2),P=D||!!y&&/Mac/.test(y.platform),I=/Android \d/.test(x),R=!!w&&"webkitFontSmoothing"in w.documentElement.style,F=R?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function B(e,t){return"number"==typeof e?e:e[t]}function _(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function j(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let a=n||e.dom;;a=s(a)){if(!a)break;if(1!=a.nodeType)continue;let e=a,n=e==o.body,s=n?z(o):_(e),l=0,c=0;if(t.tops.bottom-B(r,"bottom")&&(c=t.bottom-s.bottom+B(i,"bottom")),t.lefts.right-B(r,"right")&&(l=t.right-s.right+B(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function H(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,a=i+1;a=i-20){t=r,n=s.top;break}}return{refDOM:t,refTop:n,stack:U(e.dom)}}function U(e){let t=[],n=e.ownerDocument;for(let r=e;r;r=s(r))if(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e==n)break;return t}function q({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;G(n,0==r?0:r-t)}function G(e,t){for(let n=0;n=s){a=Math.max(h.bottom,a),s=Math.min(h.top,s);let e=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(o=u+1)}}return n&&3==n.nodeType?Z(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:Y(n,r)}function Z(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}function K(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function X(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}function Q(e,t,n,r){let i=-1;for(let o=t;;){if(o==e.dom)break;let t=e.docView.nearestDesc(o,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right-1?i:e.docView.posFromDOM(t,n,1)}function $(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=Q(e,n,i,t))}null==o&&(o=J(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:o,inside:l?l.posAtStart-l.border:-1}}function te(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const ne=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function re(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),a=R||T;if(3==r.nodeType){if(!a||!ne.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,ie(te(c(r,e,t),1),o<0)}{let e=te(c(r,i,i),n);if(T&&i&&/\s/.test(r.nodeValue[i-1])&&i=0)}if(null==o&&i&&(n<0||i==f(r))){let e=r.childNodes[i-1],t=3==e.nodeType?c(e,f(e)-(a?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return ie(te(t,1),!1)}if(null==o&&i=0)}function ie(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function oe(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ae(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function se(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return ae(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=re(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;ei.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0})}const le=/[\u0590-\u08ac]/;function ce(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,a=i==r.parent.content.size,s=e.domSelection();return le.test(r.parent.textContent)&&s.modify?ae(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:a}=e.domSelectionRange(),l=s.caretBidiLevel;s.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:h}=e.domSelectionRange(),d=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&i==h;try{s.collapse(o,a),t&&(t!=o||i!=a)&&s.extend&&s.extend(t,i)}catch(f){}return null!=l&&(s.caretBidiLevel=l),d}):"left"==n||"backward"==n?o:a}let ue=null,he=null,de=!1;function fe(e,t,n){return ue==t&&he==n?de:(ue=t,he=n,de="up"==n||"down"==n?se(e,t,n):ce(e,t,n))}const pe=0,me=1,ge=2,ve=3;class be{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=pe,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;ta(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;te||t instanceof Ee){i=e-o;break}o=n}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ye&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;;r--,n=!1)if(e=r?this.children[r-1]:null,!e||e.dom.parentNode==this.contentDOM)break;return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?a(e.dom)+1:0}}{let e,n=!0;for(;;r++,n=!1)if(e=r=i&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=a(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||s==this.children.length-1)){t=l;for(let e=s+1;eu&&ot){let e=s;s=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r=n:en){let r=n+i.border,a=o-i.border;if(e>=r&&t<=a)return this.dirty=e==n||t==o?ge:me,void(e!=r||t!=a||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=ve);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?ve:ge}n=o}this.dirty=ge}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?ge:me;t.dirtyi?i.parent?i.parent.posBeforeChild(i):void 0:r)),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==pe&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class we extends be{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class xe extends be{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],a=o&&o(t,r,n);return a&&a.dom||(a=i["DOMSerializer"].renderSpec(document,t.type.spec.toDOM(t,n))),new xe(e,t,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&ve||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return this.dirty!=ve&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=pe){let e=this.parent;while(!e.node)e=e.parent;e.dirty0&&(i=qe(i,0,e,n));for(let a=0;as?s.parent?s.parent.posBeforeChild(s):void 0:a,n,r),u=c&&c.dom,h=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:h}=i["DOMSerializer"].renderSpec(document,t.type.spec.toDOM(t)));h||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let d=u;return u=Pe(u,n,t),c?s=new Se(e,t,n,r,u,h||null,d,c,o,a+1):t.isText?new Ce(e,t,n,r,u,d,o):new ke(e,t,n,r,u,h||null,d,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>i["Fragment"].empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return this.dirty==pe&&e.eq(this.node)&&Ie(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,a=o&&o.pos>-1?o:null,s=o&&o.pos<0,l=new Fe(this,a&&a.node,e);_e(this.node,this.innerDeco,(t,o,a)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&l.syncToMarks(o==this.node.childCount?i["Mark"].none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)},(t,i,a,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,i,a,c)||s&&e.state.selection.from>r&&e.state.selection.to-1&&l.updateNodeAt(t,i,a,u,e)||l.updateNextNode(t,i,a,e,c)||l.addNode(t,i,a,e,r),r+=t.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ge)&&(a&&this.protectLocalComposition(e,a),Te(this.contentDOM,this.children,e),D&&je(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof r["TextSelection"])||nt+this.node.content.size)return null;let o=e.domSelectionRange(),a=He(o.focusNode,o.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let e=a.nodeValue,r=Ue(this.node.content,e,n-t,i-t);return r<0?null:{node:a,pos:r,text:e}}return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new we(this,i,t,r);e.input.compositionNodes.push(o),this.children=qe(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(this.dirty==ve||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=pe}updateOuterDeco(e){if(Ie(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Oe(this.dom,this.nodeDOM,Le(this.outerDeco,this.node,t),Le(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Ae(e,t,n,r,i){return Pe(r,t,e),new ke(void 0,e,t,n,r,r,r,i,0)}class Ce extends ke{constructor(e,t,n,r,i,o,a){super(e,t,n,r,i,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(this.dirty==ve||this.dirty!=pe&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==pe&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=pe,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new Ce(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=ve)}get domAtom(){return!1}}class Ee extends be{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==pe&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Se extends ke{constructor(e,t,n,r,i,o,a,s,l,c){super(e,t,n,r,i,o,a,l,c),this.spec=s}update(e,t,n,r){if(this.dirty==ve)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Te(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o>1,o=Math.min(i,e.length);while(r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=xe.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let a=this.index,s=Math.min(this.top.children.length,a+5);a0){let s;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof xe)){s=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(i-1))break;--i,o.set(s,i),a.push(s)}}return{index:i,matched:o,matches:a.reverse()}}function Be(e,t){return e.type.side-t.type.side}function _e(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;no)s.push(i[a++]);let d=o+u.nodeSize;if(u.isText){let e=d;a!e.inline):s.slice();r(u,f,t.forChild(o,u),h),o=d}}function je(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function He(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=f(e)}else{if(!(1==e.nodeType&&t=n){let e=s=0&&e+t.length+s>=n)return s+e;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function qe(e,t,n,r,i){let o=[];for(let a=0,s=0;a=n||u<=t?o.push(l):(cn&&o.push(l.slice(n-c,l.size,r)))}return o}function Ge(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l,c,u=i.resolve(s);if(g(n)){l=u;while(o&&!o.node)o=o.parent;let e=o.node;if(o&&e.isAtom&&r["NodeSelection"].isSelectable(e)&&o.parent&&(!e.isInline||!p(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;c=new r["NodeSelection"](s==e?u:i.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;l=i.resolve(t)}if(!c){let n="pointer"==t||e.state.selection.head{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{We(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Qe(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,a(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&E&&S<=11&&(r.disabled=!0,r.disabled=!1)}function $e(e,t){if(t instanceof r["NodeSelection"]){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(et(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else et(e)}function et(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function tt(e,t,n,i){return e.someProp("createSelectionBetween",r=>r(e,t,n))||r["TextSelection"].between(t,n,i)}function nt(e){return!(e.editable&&!e.hasFocus())&&rt(e)}function rt(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function it(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return u(t.node,t.offset,n.anchorNode,n.anchorOffset)}function ot(e,t){let{$anchor:n,$head:i}=e.selection,o=t>0?n.max(i):n.min(i),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&r["Selection"].findFrom(a,t)}function at(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function st(e,t,n){let i=e.state.selection;if(!(i instanceof r["TextSelection"])){if(i instanceof r["NodeSelection"]&&i.node.isInline)return at(e,new r["TextSelection"](t>0?i.$to:i.$from));{let n=ot(e.state,t);return!!n&&at(e,n)}}if(!i.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=ot(e.state,t);return!!(n&&n instanceof r["NodeSelection"])&&at(e,n)}if(!(P&&n.indexOf("m")>-1)){let n,o=i.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText)return!1;let s=t<0?o.pos-a.nodeSize:o.pos;return!!(a.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(r["NodeSelection"].isSelectable(a)?at(e,new r["NodeSelection"](t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):!!R&&at(e,new r["TextSelection"](e.state.doc.resolve(t<0?s:s+a.nodeSize))))}}function lt(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ct(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function ut(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(T&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(ct(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(dt(n))break;{let t=n.previousSibling;while(t&&ct(t))i=n.parentNode,o=a(t),t=t.previousSibling;if(t)n=t,r=lt(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?ft(e,n,r):i&&ft(e,i,o)}function ht(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=lt(n);for(;;)if(r{e.state==i&&Ve(e)},50)}function pt(e,t,n){let i=e.state.selection;if(i instanceof r["TextSelection"]&&!i.empty||n.indexOf("s")>-1)return!1;if(P&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=i;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=ot(e.state,t);if(n&&n instanceof r["NodeSelection"])return at(e,n)}if(!o.parent.inlineContent){let n=t<0?o:a,s=i instanceof r["AllSelection"]?r["Selection"].near(n,t):r["Selection"].findFrom(n,t);return!!s&&at(e,s)}return!1}function mt(e,t){if(!(e.state.selection instanceof r["TextSelection"]))return!0;let{$head:n,$anchor:i,empty:o}=e.state.selection;if(!n.sameParent(i))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function gt(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function vt(e){if(!O||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;gt(e,n,"true"),setTimeout(()=>gt(e,n,"false"),20)}return!1}function bt(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function yt(e,t){let n=t.keyCode,r=bt(t);return 8==n||P&&72==n&&"c"==r?mt(e,-1)||ut(e):46==n||P&&68==n&&"c"==r?mt(e,1)||ht(e):13==n||27==n||(37==n||P&&66==n&&"c"==r?st(e,-1,r)||ut(e):39==n||P&&70==n&&"c"==r?st(e,1,r)||ht(e):38==n||P&&80==n&&"c"==r?pt(e,-1,r)||ut(e):40==n||P&&78==n&&"c"==r?vt(e)||pt(e,1,r)||ht(e):r==(P?"m":"c")&&(66==n||73==n||89==n||90==n))}function wt(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:o,openEnd:a}=t;while(o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount){o--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||i["DOMSerializer"].fromSchema(e.state.schema),l=Ot(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));let u,h=c.firstChild,d=0;while(h&&1==h.nodeType&&(u=Mt[h.nodeName.toLowerCase()])){for(let e=u.length-1;e>=0;e--){let t=l.createElement(u[e]);while(c.firstChild)t.appendChild(c.firstChild);c.appendChild(t),d++}h=c.firstChild}h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${o} ${a}${d?" -"+d:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:c,text:f}}function xt(e,t,n,r,o){let a,s,l=o.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",n=>{t=n(t,l||r,e)}),l)return t?new i["Slice"](i["Fragment"].from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):i["Slice"].empty;let n=e.someProp("clipboardTextParser",n=>n(t,o,r,e));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=i["DOMSerializer"].fromSchema(r);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),a=Dt(n),R&&Pt(a);let u=a&&a.querySelector("[data-pm-slice]"),h=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let i=+h[3];i>0;i--){let e=a.firstChild;while(e&&1!=e.nodeType)e=e.nextSibling;if(!e)break;a=e}if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||i["DOMParser"].fromSchema(e.state.schema);s=t.parseSlice(a,{preserveWhitespace:!(!c&&!h),context:o,ruleFromNode(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||kt.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)s=It(Nt(s,+h[1],+h[2]),h[4]);else if(s=i["Slice"].maxOpen(At(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let n=s.content.firstChild;e{s=t(s,e)}),s}const kt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function At(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n),a=o.contentMatchAt(t.index(n)),s=[];if(e.forEach(e=>{if(!s)return;let t,n=a.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&Et(n,r,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=St(s[s.length-1],r.length));let t=Ct(e,n);s.push(t),a=a.matchType(t.type),r=n}}),s)return i["Fragment"].from(s)}return e}function Ct(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,i["Fragment"].from(e));return e}function Et(e,t,n,r,o){if(o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(i["Fragment"].empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function Nt(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=Ot().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);if((n=i&&Mt[i[1].toLowerCase()])&&(e=n.map(e=>"<"+e+">").join("")+e+n.map(e=>"").reverse().join("")),r.innerHTML=e,n)for(let o=0;o=0;c-=2){let e=r.nodes[n[c]];if(!e||e.hasRequiredAttrs())break;o=i["Fragment"].from(e.create(n[c+1],o)),a++,s++}return new i["Slice"](o,a,s)}const Rt={},Ft={},zt={touchstart:!0,touchmove:!0};class Bt{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _t(e){for(let t in Rt){let n=Rt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!Gt(e,t)||qt(e,t)||!e.editable&&t.type in Ft||n(e,t)},zt[t]?{passive:!0}:void 0)}O&&e.dom.addEventListener("input",()=>null),Ut(e)}function jt(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ht(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Ut(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>qt(e,t))})}function qt(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function Gt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Wt(e,t){qt(e,t)||!Rt[t.type]||!e.editable&&t.type in Ft||Rt[t.type](e,t)}function Vt(e){return{left:e.clientX,top:e.clientY}}function Yt(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Zt(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let a=o.depth+1;a>0;a--)if(e.someProp(t,t=>a>o.depth?t(e,n,o.nodeAfter,o.before(a),i,!0):t(e,n,o.node(a),o.before(a),i,!1)))return!0;return!1}function Kt(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Xt(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return!!(i&&i.isAtom&&r["NodeSelection"].isSelectable(i))&&(Kt(e,new r["NodeSelection"](n),"pointer"),!0)}function Jt(e,t){if(-1==t)return!1;let n,i,o=e.state.selection;o instanceof r["NodeSelection"]&&(n=o.node);let a=e.state.doc.resolve(t);for(let s=a.depth+1;s>0;s--){let e=s>a.depth?a.nodeAfter:a.node(s);if(r["NodeSelection"].isSelectable(e)){i=n&&o.$from.depth>0&&s>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(s);break}}return null!=i&&(Kt(e,r["NodeSelection"].create(e.state.doc,i),"pointer"),!0)}function Qt(e,t,n,r,i){return Zt(e,"handleClickOn",t,n,r)||e.someProp("handleClick",n=>n(e,t,r))||(i?Jt(e,n):Xt(e,n))}function $t(e,t,n,r){return Zt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}function en(e,t,n,r){return Zt(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||tn(e,n,r)}function tn(e,t,n){if(0!=n.button)return!1;let i=e.state.doc;if(-1==t)return!!i.inlineContent&&(Kt(e,r["TextSelection"].create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(t);for(let a=o.depth+1;a>0;a--){let t=a>o.depth?o.nodeAfter:o.node(a),n=o.before(a);if(t.inlineContent)Kt(e,r["TextSelection"].create(i,n+1,n+1+t.content.size),"pointer");else{if(!r["NodeSelection"].isSelectable(t))continue;Kt(e,r["NodeSelection"].create(i,n),"pointer")}return!0}}function nn(e){return hn(e)}Ft.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!an(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!I||!M||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!D||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",t=>t(e,n))||yt(e,n)?n.preventDefault():jt(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,v(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},Ft.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Ft.keypress=(e,t)=>{let n=t;if(an(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||P&&n.metaKey)return;if(e.someProp("handleKeyPress",t=>t(e,n)))return void n.preventDefault();let i=e.state.selection;if(!(i instanceof r["TextSelection"])||!i.$from.sameParent(i.$to)){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",n=>n(e,i.$from.pos,i.$to.pos,t))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const rn=P?"metaKey":"ctrlKey";Rt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=nn(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&Yt(n,e.input.lastClick)&&!n[rn]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let a=e.posAtCoords(Vt(n));a&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new on(e,a,n,!!r)):("doubleClick"==o?$t:en)(e,a.pos,a.inside,n)?n.preventDefault():jt(e,"pointer"))};class on{constructor(e,t,n,i){let o,a;if(this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[rn],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,a=n.depth?n.before():0}const s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof r["NodeSelection"]&&c.from<=a&&c.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!T||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),jt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ve(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Vt(e))),this.updateAllowDefault(e),this.allowDefault||!t?jt(this.view,"pointer"):Qt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||O&&this.mightDrag&&!this.mightDrag.node.isAtom||M&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Kt(this.view,r["Selection"].near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):jt(this.view,"pointer")}move(e){this.updateAllowDefault(e),jt(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function an(e,t){return!!e.composing||!!(O&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Rt.touchstart=e=>{e.input.lastTouch=Date.now(),nn(e),jt(e,"pointer")},Rt.touchmove=e=>{e.input.lastTouch=Date.now(),jt(e,"pointer")},Rt.contextmenu=e=>nn(e);const sn=I?5e3:-1;function ln(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>hn(e),t))}function cn(e){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=un());while(e.input.compositionNodes.length>0)e.input.compositionNodes.pop().markParentsDirty()}function un(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function hn(e,t=!1){if(!(I&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),cn(e),t||e.docView&&e.docView.dirty){let t=Ge(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}function dn(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}Ft.compositionstart=Ft.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),hn(e,!0),e.markCursor=null;else if(hn(e),T&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}ln(e,sn)},Ft.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,ln(e,20))};const fn=E&&S<15||D&&F<604;function pn(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}function mn(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?gn(e,r.value,null,t):gn(e,r.textContent,r.innerHTML,t)},50)}function gn(e,t,n,r){let o=xt(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,r,o||i["Slice"].empty)))return!0;if(!o)return!1;let a=pn(o),s=a?e.state.tr.replaceSelectionWith(a,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Rt.copy=Ft.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=fn?null:n.clipboardData,a=r.content(),{dom:s,text:l}=wt(e,a);o?(n.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",l)):dn(e,s),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ft.paste=(e,t)=>{let n=t;if(e.composing&&!I)return;let r=fn?null:n.clipboardData;r&&gn(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():mn(e,n)};class vn{constructor(e,t){this.slice=e,this.move=t}}const bn=P?"altKey":"ctrlKey";Rt.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o=e.state.selection,a=o.empty?null:e.posAtCoords(Vt(n));if(a&&a.pos>=o.from&&a.pos<=(o instanceof r["NodeSelection"]?o.to-1:o.to));else if(i&&i.mightDrag)e.dispatch(e.state.tr.setSelection(r["NodeSelection"].create(e.state.doc,i.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(r["NodeSelection"].create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:l,text:c}=wt(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(fn?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",fn||n.dataTransfer.setData("text/plain",c),e.dragging=new vn(s,!n[bn])},Rt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Ft.dragover=Ft.dragenter=(e,t)=>t.preventDefault(),Ft.drop=(e,t)=>{let n=t,a=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let s=e.posAtCoords(Vt(n));if(!s)return;let l=e.state.doc.resolve(s.pos),c=a&&a.slice;c?e.someProp("transformPasted",t=>{c=t(c,e)}):c=xt(e,n.dataTransfer.getData(fn?"Text":"text/plain"),fn?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!a||n[bn]);if(e.someProp("handleDrop",t=>t(e,n,c||i["Slice"].empty,u)))return void n.preventDefault();if(!c)return;n.preventDefault();let h=c?Object(o["h"])(e.state.doc,l.pos,c):l.pos;null==h&&(h=l.pos);let d=e.state.tr;u&&d.deleteSelection();let f=d.mapping.map(h),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=d.doc;if(p?d.replaceRangeWith(f,f,c.content.firstChild):d.replaceRange(f,f,c),d.doc.eq(m))return;let g=d.doc.resolve(f);if(p&&r["NodeSelection"].isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new r["NodeSelection"](g));else{let t=d.mapping.map(h);d.mapping.maps[d.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),d.setSelection(tt(e,g,d.doc.resolve(t)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))},Rt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ve(e)},20))},Rt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Rt.beforeinput=(e,t)=>{let n=t;if(M&&I&&"deleteContentBackward"==n.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,v(8,"Backspace"))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let dr in Ft)Rt[dr]=Ft[dr];function yn(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class wn{constructor(e,t){this.toDOM=e,this.spec=t||En,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new An(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof wn&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&yn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class xn{constructor(e,t){this.attrs=e,this.spec=t||En}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new An(i,o,this)}valid(e,t){return t.from=e&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let o=0;oe){let a=this.children[o]+1;this.children[o+2].findInner(e-a,t-a,n,r+a,i)}}map(e,t,n){return this==Tn||0==e.maps.length?this:this.mapInner(e,t,0,0,n||En)}mapInner(e,t,n,r,i){let o;for(let a=0;a{let a,s=o+n;if(a=Dn(t,e,s)){r||(r=this.children.slice());while(io&&t.to=e){this.children[a]==e&&(n=this.children[a+2]);break}let i=e+1,o=i+t.content.size;for(let a=0;ai&&e.type instanceof xn){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;tn.map(e,t,En));return Nn.from(n)}forChild(e,t){if(t.isLeaf)return Sn.empty;let n=[];for(let r=0;re instanceof Sn)?e:e.reduce((e,t)=>e.concat(t instanceof Sn?t:t.members),[]))}}}function Mn(e,t,n,r,i,o,a){let s=e.slice();for(let c=0,u=o;c{let a=o-r-(n-t);for(let l=0;lo+u-e)continue;let c=s[l]+u-e;n>=c?s[l+1]=t<=c?-2:-1:r>=i&&a&&(s[l]+=a,s[l+1]+=a)}e+=a}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let h=n.map(e[c+1]+o,-1),d=h-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[c+2].mapInner(n,m,t+1,e[c]+o+1,a);r!=Tn?(s[c]=u,s[c+1]=d,s[c+2]=r):(s[c+1]=-2,l=!0)}else l=!0}if(l){let l=On(s,e,t,n,i,o,a),c=In(l,r,0,a);t=c.local;for(let e=0;en&&o.to{let s=Dn(e,t,a+n);if(s){o=!0;let e=In(s,t,n+a+1,r);e!=Tn&&i.push(a,a+t.nodeSize,e)}});let a=Ln(o?Pn(e):e,-n).sort(Rn);for(let s=0;s0)t++;e.splice(t,0,n)}function Bn(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Tn&&t.push(r)}),e.cursorWrapper&&t.push(Sn.create(e.state.doc,[e.cursorWrapper.deco])),Nn.from(t)}const _n={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jn=E&&S<=11;class Hn{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Un{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Hn,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),jn&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,_n)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nt(this.view)){if(this.suppressingSelectionUpdates)return Ve(this.view);if(E&&S<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let i=e.focusNode;i;i=s(i))n.add(i);for(let i=e.anchorNode;i;i=s(i))if(n.has(i)){t=i;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&nt(e)&&!this.ignoreSelectionChange(n),o=-1,a=-1,s=!1,l=[];if(e.editable)for(let r=0;r1){let e=l.filter(e=>"BR"==e.nodeName);if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch-1||i)&&(o>-1&&(e.docView.markDirty(o,a),Wn(e)),this.handleDOMChange(o,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ve(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;na;i--){let e=o.childNodes[i-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){s=i;break}if(!t||t.size)break}let d=e.state.doc,f=e.someProp("domParser")||i["DOMParser"].fromSchema(e.state.schema),p=d.resolve(l),m=null,v=f.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Zn,context:p});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),m={anchor:e+l,head:t+l}}return{doc:v,sel:m,from:l,to:c}}function Zn(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(O&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||O&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Kn(e,t,n,i,o){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Ge(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l,c,u=e.state.selection,h=Yn(e,t,n),d=e.state.doc,f=d.slice(h.from,h.to);8===e.input.lastKeyCode&&Date.now()-100Date.now()-225||I)&&o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName||"LI"==e.nodeName)&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",t=>t(e,v(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!p){if(!(i&&u instanceof r["TextSelection"]&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let t=Xn(e,e.state.doc,h.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}p={start:u.from,endA:u.to,endB:u.to}}if(M&&e.cursorWrapper&&h.sel&&h.sel.anchor==e.cursorWrapper.deco.from&&h.sel.head==h.sel.anchor){let e=p.endB-p.start;h.sel={anchor:h.sel.anchor+e,head:h.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=h.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),E&&S<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>h.from&&"  "==h.doc.textBetween(p.start-h.from-1,p.start-h.from+1)&&(p.start--,p.endA--,p.endB--);let m,g=h.doc.resolveNoCache(p.start-h.from),b=h.doc.resolveNoCache(p.endB-h.from),y=d.resolve(p.start),w=g.sameParent(b)&&g.parent.inlineContent&&y.end()>=p.endA;if((D&&e.input.lastIOSEnter>Date.now()-225&&(!w||o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!w&&g.post(e,v(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&Qn(d,p.start,p.endA,g,b)&&e.someProp("handleKeyDown",t=>t(e,v(8,"Backspace"))))return void(I&&M&&e.domObserver.suppressSelectionUpdates());M&&I&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),I&&!w&&g.start()!=b.start()&&0==b.parentOffset&&g.depth==b.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==p.endA&&(p.endB-=2,b=h.doc.resolveNoCache(p.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",(function(t){return t(e,v(13,"Enter"))}))},20));let x,k,A,C=p.start,T=p.endA;if(w)if(g.pos==b.pos)E&&S<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ve(e),20)),x=e.state.tr.delete(C,T),k=d.resolve(p.start).marksAcross(d.resolve(p.endA));else if(p.endA==p.endB&&(A=Jn(g.parent.content.cut(g.parentOffset,b.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))x=e.state.tr,"add"==A.type?x.addMark(C,T,A.mark):x.removeMark(C,T,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==b.index()-(b.textOffset?0:1)){let t=g.parent.textBetween(g.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",n=>n(e,C,T,t)))return;x=e.state.tr.insertText(t,C,T)}if(x||(x=e.state.tr.replace(C,T,h.doc.slice(p.start-h.from,p.endB-h.from))),h.sel){let t=Xn(e,x.doc,h.sel);t&&!(M&&I&&e.composing&&t.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:tt(e,t.resolve(n.anchor),t.resolve(n.head))}function Jn(e,t){let n,r,o,a=e.firstChild.marks,s=t.firstChild.marks,l=a,c=s;for(let i=0;ie.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let i=0;in||$n(a,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount))r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));while(t&&!t.isLeaf)t=t.firstChild,i++}return i}function er(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){let e=Math.max(0,o-Math.min(a,s));r-=a+e-o}if(a=a?o-r:0;o-=e,s=o+(s-a),a=o}else if(s=s?o-r:0;o-=e,a=o+(a-s),s=o}return{start:o,endA:a,endB:s}}const tr=wt,nr=xt,rr=hn;class ir{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Bt,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(hr),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=sr(this),ar(this),this.nodeViews=cr(this),this.docView=Ae(this.state.doc,or(this),Bn(this),this.dom,this),this.domObserver=new Un(this,(e,t,n,r)=>Kn(this,e,t,n,r)),this.domObserver.start(),_t(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ut(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(hr),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(cn(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=cr(this);ur(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ut(this),this.editable=sr(this),ar(this);let a=Bn(this),s=or(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,s,a);!c&&e.selection.eq(n.selection)||(i=!0);let u="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&H(this);if(i){this.domObserver.stop();let t=c&&(E||M)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&lr(n.selection,e.selection);if(c){let n=M?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,s,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ae(e.doc,s,a,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&it(this))?Ve(this,t):($e(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():u&&q(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof r["NodeSelection"]){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&j(this,t.getBoundingClientRect(),e)}else j(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;while(e=this.pluginViews.pop())e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return ee(this,e)}coordsAtPos(e,t=1){return re(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return fe(this,t||this.state,e)}destroy(){this.docView&&(Ht(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Bn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return Wt(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return O&&11===this.root.nodeType&&b(this.dom.ownerDocument)==this.dom?Vn(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function or(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),[An.node(0,e.state.doc.content.size,t)]}function ar(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:An.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sr(e){return!e.someProp("editable",t=>!1===t(e.state))}function lr(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function cr(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function ur(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function hr(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},7080:function(e,t,n){e.exports=n.p+"img/vitalityOrange.jpg"},"70b9":function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n("8287"),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{h(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),p=function(e){if("undefined"===typeof window||!f)return h(e);try{return h(e)}catch(t){return!1}};r=function(e){var t=null!==e&&"object"===typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=c&&n;if(s&&e.length>0&&!i.call(e,0))for(var f=0;f0)for(var m=0;m0&&(o=n[0].slice(e-t,e)+o,r=i)}return t.tr.insertText(o,r,i)}}const s=500;function l({rules:e}){let t=new r["Plugin"]({state:{init(){return null},apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,o){return c(n,r,i,o,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&c(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function c(e,t,n,r,i,o){if(e.composing)return!1;let a=e.state,l=a.doc.resolve(t);if(l.parent.type.spec.code)return!1;let c=l.parent.textBetween(Math.max(0,l.parentOffset-s),l.parentOffset,null,"")+r;for(let s=0;s{let n=e.plugins;for(let r=0;r=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(i.text){let t=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else n.delete(i.from,i.to);t(n)}return!0}}return!1},h=new o(/--$/,"—"),d=new o(/\.\.\.$/,"…"),f=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),p=new o(/"$/,"”"),m=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),g=new o(/'$/,"’"),v=[f,p,m,g];function b(e,t,n=null,r){return new o(e,(e,o,a,s)=>{let l=n instanceof Function?n(o):n,c=e.tr.delete(a,s),u=c.doc.resolve(a),h=u.blockRange(),d=h&&Object(i["i"])(h,t,l);if(!d)return null;c.wrap(h,d);let f=c.doc.resolve(a-1).nodeBefore;return f&&f.type==t&&Object(i["f"])(c.doc,a-1)&&(!r||r(o,f))&&c.join(a-1),c})}function y(e,t,n=null){return new o(e,(e,r,i,o)=>{let a=e.doc.resolve(i),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,s):null})}},7694:function(e,t,n){},7718:function(e,t,n){e.exports=n.p+"img/huafei.svg"},"77be":function(e,t,n){"use strict";var r=n("5e8c"),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},"77f4":function(e,t,n){e.exports=n.p+"img/niunai.svg"},"780f":function(e,t,n){"use strict";e.exports=o;var r=n("27bf"),i=Object.create(n("3a7c"));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n("3fb5"),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},7812:function(e,t,n){"use strict";n("eb20")},7992:function(e,t,n){e.exports=n.p+"img/mindMap.png"},"7a10":function(e,t,n){e.exports=n.p+"img/laodongjie.svg"},"7a46":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const r=e=>({[Symbol.iterator](){return this},next:e}),i=(e,t)=>r(()=>{let n;do{n=e.next()}while(!n.done&&!t(n.value));return n}),o=(e,t)=>r(()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}})},"7b13":function(e,t,n){"use strict";n("41ab")},"7b4d":function(e,t,n){},"7bbc":function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return v}));var r=n("1651"),i=n("ca2d"),o=n("0e4d"),a=n("5e9b"),s=n("01fd");const l="undefined"!==typeof e&&e.release&&/node|io\.js/.test(e.release.name),c="undefined"!==typeof window&&"undefined"!==typeof document&&!l;"undefined"!==typeof navigator&&/Mac/.test(navigator.platform);let u;const h=[],d=()=>{if(void 0===u)if(l){u=r["c"]();const t=e.argv;let n=null;for(let e=0;e{if(0!==e.length){const[t,n]=e.split("=");u.set("--"+i["c"](t,"-"),n),u.set("-"+i["c"](t,"-"),n)}})):u=r["c"]();return u},f=e=>d().has(e),p=e=>l?o["a"](Object({NODE_ENV:"production",BASE_URL:window.externalPublicPath})[e.toUpperCase()]):o["a"](a["c"].getItem(e)),m=e=>f("--"+e)||null!==p(e),g=(m("production"),l&&s["d"](Object({NODE_ENV:"production",BASE_URL:"dist/"}).FORCE_COLOR,["true","1","2"])),v=!f("no-colors")&&(!l||e.stdout.isTTY||g)&&(!l||f("color")||g||null!==p("COLORTERM")||(p("TERM")||"").includes("color"))}).call(this,n("4362"))},"7be0":function(e,t,n){e.exports=n.p+"img/a-14-zhutingqi.svg"},"7c97":function(e,t,n){e.exports=n.p+"img/binggun.svg"},"7cb3":function(e,t,n){"use strict";n("dfe7")},"7cc6":function(e,t,n){e.exports=n.p+"img/-.svg"},"7d59":function(e,t,n){e.exports=n.p+"img/baichui.svg"},"7d72":function(e,t,n){"use strict";var r=n("8707").Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){if(!e)return"utf8";var t;while(1)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=h,t=4;break;case"base64":this.text=g,this.end=v,t=3;break;default:return this.write=b,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function c(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�"}}function h(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function g(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return o["c"]((this._observers.get(e)||r["c"]()).values()).forEach(e=>e(...t))}destroy(){this._observers=r["c"]()}}},8287:function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},"82b0":function(e,t,n){e.exports=n.p+"img/a-16-yiyuan.svg"},8484:function(e,t,n){e.exports=n.p+"img/a-shuben2.svg"},"860a":function(e,t,n){"use strict";var r=n("f770"),i=n("6c12"),o=n("7e07"),a=Error.captureStackTrace;e.exports=function(e,t,n,s){o&&(a?a(e,t):r(e,"stack",i(n,s)))}},"86d9":function(e,t,n){e.exports=n.p+"img/classic3.jpg"},8707:function(e,t,n){var r=n("b639"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},8722:function(e,t,n){e.exports=n.p+"img/hanbao.svg"},8763:function(e,t,n){e.exports=n.p+"img/zongheshenpi.svg"},8952:function(e,t,n){"use strict";n("0e5f")},8953:function(e,t,n){"use strict";var r=n("cda9"),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},"899a":function(e,t,n){"use strict";var r=n("b2d1");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},"89c8":function(e,t,n){e.exports=n.p+"img/ziyuan_8.svg"},"8b39":function(e,t,n){e.exports=n.p+"img/a-5-mianqian.svg"},"8b92":function(e,t,n){e.exports=n.p+"img/classicBlue.jpg"},"8cd8":function(e,t,n){e.exports=n.p+"img/a-bitong1.svg"},"8ce6":function(e,t,n){e.exports=n.p+"img/a-xueshimao1.svg"},"8d05":function(e,t,n){},"8f14":function(e,t,n){e.exports=n.p+"img/earthYellow.jpg"},"8f8b":function(e,t,n){e.exports=n.p+"img/citie.svg"},"90d8":function(e,t,n){var r=n("c65b"),i=n("1a2d"),o=n("3a9b"),a=n("ad6d"),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||i(e,"flags")||!o(s,e)?t:r(a,e)}},9152:function(e,t){ +*/const yo={},wo=[];function xo(e,t){if(Array.isArray(e))for(const n of e)xo(n,t);else if("object"!==typeof e)Co(Object.getOwnPropertyNames(t)),yo[e]=Object.assign(yo[e]||{},t);else for(const n in e)xo(n,e[n])}function ko(e){return yo[e]||{}}function Ao(){return[...new Set(wo)]}function Co(e){wo.push(...e)}function Eo(e,t){let n;const r=e.length,i=[];for(n=0;n=0;t--)Jo(e.children[t]);return e.id?(e.id=Xo(e.nodeName),e):e}function Qo(e,t){let n,r;for(e=Array.isArray(e)?e:[e],r=e.length-1;r>=0;r--)for(n in t)e[r].prototype[n]=t[n]}function $o(e){return function(...t){const n=t[t.length-1];return!n||n.constructor!==Object||n instanceof Array?e.apply(this,t):e.apply(this,t.slice(0,-1)).attr(n)}}function ea(){return this.parent().children()}function ta(){return this.parent().index(this)}function na(){return this.siblings()[this.position()+1]}function ra(){return this.siblings()[this.position()-1]}function ia(){const e=this.position(),t=this.parent();return t.add(this.remove(),e+1),this}function oa(){const e=this.position(),t=this.parent();return t.add(this.remove(),e?e-1:0),this}function aa(){const e=this.parent();return e.add(this.remove()),this}function sa(){const e=this.parent();return e.add(this.remove(),0),this}function la(e){e=qo(e),e.remove();const t=this.position();return this.parent().add(e,t),this}function ca(e){e=qo(e),e.remove();const t=this.position();return this.parent().add(e,t+1),this}function ua(e){return e=qo(e),e.before(this),this}function ha(e){return e=qo(e),e.after(this),this}xo("Dom",{siblings:ea,position:ta,next:na,prev:ra,forward:ia,backward:oa,front:aa,back:sa,before:la,after:ca,insertBefore:ua,insertAfter:ha});const da=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,fa=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,pa=/rgb\((\d+),(\d+),(\d+)\)/,ma=/(#[a-z_][a-z0-9\-_]*)/i,ga=/\)\s*,?\s*/,va=/\s/g,ba=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ya=/^rgb\(/,wa=/^(\s+)?$/,xa=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ka=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Aa=/[\s,]+/,Ca=/[MLHVCSQTAZ]/i;function Ea(){const e=this.attr("class");return null==e?[]:e.trim().split(Aa)}function Sa(e){return-1!==this.classes().indexOf(e)}function Ta(e){if(!this.hasClass(e)){const t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this}function Na(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!==e})).join(" ")),this}function Ma(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)}function La(e,t){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(e){return!!e.length})).forEach((function(e){const t=e.split(/\s*:\s*/);n[t[0]]=t[1]})),n;if(arguments.length<2){if(Array.isArray(e)){for(const t of e){const e=No(t);n[t]=this.node.style[e]}return n}if("string"===typeof e)return this.node.style[No(e)];if("object"===typeof e)for(const t in e)this.node.style[No(t)]=null==e[t]||wa.test(e[t])?"":e[t]}return 2===arguments.length&&(this.node.style[No(e)]=null==t||wa.test(t)?"":t),this}function Oa(){return this.css("display","")}function Da(){return this.css("display","none")}function Pa(){return"none"!==this.css("display")}function Ia(e,t,n){if(null==e)return this.data(Eo(So(this.node.attributes,e=>0===e.nodeName.indexOf("data-")),e=>e.nodeName.slice(5)));if(e instanceof Array){const t={};for(const n of e)t[n]=this.data(n);return t}if("object"===typeof e)for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(r){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"===typeof t||"number"===typeof t?t:JSON.stringify(t));return this}function Ra(e,t){if("object"===typeof arguments[0])for(const n in e)this.remember(n,e[n]);else{if(1===arguments.length)return this.memory()[e];this.memory()[e]=t}return this}function Fa(){if(0===arguments.length)this._memory={};else for(let e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this}function za(){return this._memory=this._memory||{}}function Ba(e){return 4===e.length?["#",e.substring(1,2),e.substring(1,2),e.substring(2,3),e.substring(2,3),e.substring(3,4),e.substring(3,4)].join(""):e}function _a(e){const t=Math.round(e),n=Math.max(0,Math.min(255,t)),r=n.toString(16);return 1===r.length?"0"+r:r}function ja(e,t){for(let n=t.length;n--;)if(null==e[t[n]])return!1;return!0}function Ha(e,t){const n=ja(e,"rgb")?{_a:e.r,_b:e.g,_c:e.b,_d:0,space:"rgb"}:ja(e,"xyz")?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:"xyz"}:ja(e,"hsl")?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:"hsl"}:ja(e,"lab")?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:"lab"}:ja(e,"lch")?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:"lch"}:ja(e,"cmyk")?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=t||n.space,n}function Ua(e){return"lab"===e||"xyz"===e||"lch"===e}function qa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}xo("Dom",{classes:Ea,hasClass:Sa,addClass:Ta,removeClass:Na,toggleClass:Ma}),xo("Dom",{css:La,show:Oa,hide:Da,visible:Pa}),xo("Dom",{data:Ia}),xo("Dom",{remember:Ra,forget:Fa,memory:za});class Ga{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ga||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&"number"===typeof e.r&&"number"===typeof e.g&&"number"===typeof e.b}static random(e="vibrant",t,n){const{random:r,round:i,sin:o,PI:a}=Math;if("vibrant"===e){const e=24*r()+57,t=38*r()+45,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("sine"===e){t=null==t?r():t;const e=i(80*o(2*a*t/.5+.01)+150),n=i(50*o(2*a*t/.5+4.6)+200),s=i(100*o(2*a*t/.5+2.3)+150),l=new Ga(e,n,s);return l}if("pastel"===e){const e=8*r()+86,t=17*r()+9,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("dark"===e){const e=10+10*r(),t=50*r()+86,n=360*r(),i=new Ga(e,t,n,"lch");return i}if("rgb"===e){const e=255*r(),t=255*r(),n=255*r(),i=new Ga(e,t,n);return i}if("lab"===e){const e=100*r(),t=256*r()-128,n=256*r()-128,i=new Ga(e,t,n,"lab");return i}if("grey"===e){const e=255*r(),t=new Ga(e,e,e);return t}throw new Error("Unsupported random color mode")}static test(e){return"string"===typeof e&&(ba.test(e)||ya.test(e))}cmyk(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=Math.min(1-r,1-i,1-o);if(1===a)return new Ga(0,0,0,1,"cmyk");const s=(1-r-a)/(1-a),l=(1-i-a)/(1-a),c=(1-o-a)/(1-a),u=new Ga(s,l,c,a,"cmyk");return u}hsl(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=Math.max(r,i,o),s=Math.min(r,i,o),l=(a+s)/2,c=a===s,u=a-s,h=c?0:l>.5?u/(2-a-s):u/(a+s),d=c?0:a===r?((i-o)/u+(iparseInt(e));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!ba.test(e))throw Error("Unsupported string format, can't construct Color");{const t=e=>parseInt(e,16),[,n,r,i]=fa.exec(Ba(e)).map(t);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:o,_b:a,_c:s,_d:l}=this,c="rgb"===this.space?{r:o,g:a,b:s}:"xyz"===this.space?{x:o,y:a,z:s}:"hsl"===this.space?{h:o,s:a,l:s}:"lab"===this.space?{l:o,a:a,b:s}:"lch"===this.space?{l:o,c:a,h:s}:"cmyk"===this.space?{c:o,m:a,y:s,k:l}:{};Object.assign(this,c)}lab(){const{x:e,y:t,z:n}=this.xyz(),r=116*t-16,i=500*(e-t),o=200*(t-n),a=new Ga(r,i,o,"lab");return a}lch(){const{l:e,a:t,b:n}=this.lab(),r=Math.sqrt(t**2+n**2);let i=180*Math.atan2(n,t)/Math.PI;i<0&&(i*=-1,i=360-i);const o=new Ga(e,r,i,"lch");return o}rgb(){if("rgb"===this.space)return this;if(Ua(this.space)){let{x:e,y:t,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:o}=this;if("lch"===this.space){const{c:e,h:t}=this,n=Math.PI/180;i=e*Math.cos(n*t),o=e*Math.sin(n*t)}const a=(r+16)/116,s=i/500+a,l=a-o/200,c=16/116,u=.008856,h=7.787;e=.95047*(s**3>u?s**3:(s-c)/h),t=1*(a**3>u?a**3:(a-c)/h),n=1.08883*(l**3>u?l**3:(l-c)/h)}const r=3.2406*e+-1.5372*t+-.4986*n,i=-.9689*e+1.8758*t+.0415*n,o=.0557*e+-.204*t+1.057*n,a=Math.pow,s=.0031308,l=r>s?1.055*a(r,1/2.4)-.055:12.92*r,c=i>s?1.055*a(i,1/2.4)-.055:12.92*i,u=o>s?1.055*a(o,1/2.4)-.055:12.92*o,h=new Ga(255*l,255*c,255*u);return h}if("hsl"===this.space){let{h:e,s:t,l:n}=this;if(e/=360,t/=100,n/=100,0===t){n*=255;const e=new Ga(n,n,n);return e}const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=255*qa(i,r,e+1/3),a=255*qa(i,r,e),s=255*qa(i,r,e-1/3),l=new Ga(o,a,s);return l}if("cmyk"===this.space){const{c:e,m:t,y:n,k:r}=this,i=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,t*(1-r)+r)),a=255*(1-Math.min(1,n*(1-r)+r)),s=new Ga(i,o,a);return s}return this}toArray(){const{_a:e,_b:t,_c:n,_d:r,space:i}=this;return[e,t,n,r,i]}toHex(){const[e,t,n]=this._clamped().map(_a);return`#${e}${t}${n}`}toRgb(){const[e,t,n]=this._clamped(),r=`rgb(${e},${t},${n})`;return r}toString(){return this.toHex()}xyz(){const{_a:e,_b:t,_c:n}=this.rgb(),[r,i,o]=[e,t,n].map(e=>e/255),a=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=u>.008856?Math.pow(u,1/3):7.787*u+16/116,p=h>.008856?Math.pow(h,1/3):7.787*h+16/116,m=new Ga(d,f,p,"xyz");return m}_clamped(){const{_a:e,_b:t,_c:n}=this.rgb(),{max:r,min:i,round:o}=Math,a=e=>r(0,i(o(e),255));return[e,t,n].map(a)}}class Wa{constructor(...e){this.init(...e)}clone(){return new Wa(this)}init(e,t){const n={x:0,y:0},r=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===typeof e?{x:e.x,y:e.y}:{x:e,y:t};return this.x=null==r.x?n.x:r.x,this.y=null==r.y?n.y:r.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){Za.isMatrixLike(e)||(e=new Za(e));const{x:t,y:n}=this;return this.x=e.a*t+e.c*n+e.e,this.y=e.b*t+e.d*n+e.f,this}}function Va(e,t){return new Wa(e,t).transform(this.screenCTM().inverse())}function Ya(e,t,n){return Math.abs(t-e)<(n||1e-6)}class Za{constructor(...e){this.init(...e)}static formatTransforms(e){const t="both"===e.flip||!0===e.flip,n=e.flip&&(t||"x"===e.flip)?-1:1,r=e.flip&&(t||"y"===e.flip)?-1:1,i=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,o=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleX)?e.scaleX*n:n,s=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,l=e.shear||0,c=e.rotate||e.theta||0,u=new Wa(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=u.x,d=u.y,f=new Wa(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),p=f.x,m=f.y,g=new Wa(e.translate||e.tx||e.translateX,e.ty||e.translateY),v=g.x,b=g.y,y=new Wa(e.relative||e.rx||e.relativeX,e.ry||e.relativeY),w=y.x,x=y.y;return{scaleX:a,scaleY:s,skewX:i,skewY:o,shear:l,theta:c,rx:w,ry:x,tx:v,ty:b,ox:h,oy:d,px:p,py:m}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return null!=e.a||null!=e.b||null!=e.c||null!=e.d||null!=e.e||null!=e.f}static matrixMultiply(e,t,n){const r=e.a*t.a+e.c*t.b,i=e.b*t.a+e.d*t.b,o=e.a*t.c+e.c*t.d,a=e.b*t.c+e.d*t.d,s=e.e+e.a*t.e+e.c*t.f,l=e.f+e.b*t.e+e.d*t.f;return n.a=r,n.b=i,n.c=o,n.d=a,n.e=s,n.f=l,n}around(e,t,n){return this.clone().aroundO(e,t,n)}aroundO(e,t,n){const r=e||0,i=t||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new Za(this)}decompose(e=0,t=0){const n=this.a,r=this.b,i=this.c,o=this.d,a=this.e,s=this.f,l=n*o-r*i,c=l>0?1:-1,u=c*Math.sqrt(n*n+r*r),h=Math.atan2(c*r,c*n),d=180/Math.PI*h,f=Math.cos(h),p=Math.sin(h),m=(n*i+r*o)/l,g=i*u/(m*n-r)||o*u/(m*r+n),v=a-e+e*f*u+t*(m*f*u-p*g),b=s-t+e*p*u+t*(m*p*u+f*g);return{scaleX:u,scaleY:g,shear:m,rotate:d,translateX:v,translateY:b,originX:e,originY:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const t=new Za(e);return Ya(this.a,t.a)&&Ya(this.b,t.b)&&Ya(this.c,t.c)&&Ya(this.d,t.d)&&Ya(this.e,t.e)&&Ya(this.f,t.f)}flip(e,t){return this.clone().flipO(e,t)}flipO(e,t){return"x"===e?this.scaleO(-1,1,t,0):"y"===e?this.scaleO(1,-1,0,t):this.scaleO(-1,-1,e,t||e)}init(e){const t=Za.fromArray([1,0,0,1,0,0]);return e=e instanceof Ns?e.matrixify():"string"===typeof e?Za.fromArray(e.split(Aa).map(parseFloat)):Array.isArray(e)?Za.fromArray(e):"object"===typeof e&&Za.isMatrixLike(e)?e:"object"===typeof e?(new Za).transform(e):6===arguments.length?Za.fromArray([].slice.call(arguments)):t,this.a=null!=e.a?e.a:t.a,this.b=null!=e.b?e.b:t.b,this.c=null!=e.c?e.c:t.c,this.d=null!=e.d?e.d:t.d,this.e=null!=e.e?e.e:t.e,this.f=null!=e.f?e.f:t.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,t=this.b,n=this.c,r=this.d,i=this.e,o=this.f,a=e*r-t*n;if(!a)throw new Error("Cannot invert "+this);const s=r/a,l=-t/a,c=-n/a,u=e/a,h=-(s*i+c*o),d=-(l*i+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=d,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const t=this,n=e instanceof Za?e:new Za(e);return Za.matrixMultiply(n,t,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const t=this,n=e instanceof Za?e:new Za(e);return Za.matrixMultiply(t,n,this)}rotate(e,t,n){return this.clone().rotateO(e,t,n)}rotateO(e,t=0,n=0){e=To(e);const r=Math.cos(e),i=Math.sin(e),{a:o,b:a,c:s,d:l,e:c,f:u}=this;return this.a=o*r-a*i,this.b=a*r+o*i,this.c=s*r-l*i,this.d=l*r+s*i,this.e=c*r-u*i+n*i-t*r+t,this.f=u*r+c*i-t*i-n*r+n,this}scale(e,t,n,r){return this.clone().scaleO(...arguments)}scaleO(e,t=e,n=0,r=0){3===arguments.length&&(r=n,n=t,t=e);const{a:i,b:o,c:a,d:s,e:l,f:c}=this;return this.a=i*e,this.b=o*t,this.c=a*e,this.d=s*t,this.e=l*e-n*e+n,this.f=c*t-r*t+r,this}shear(e,t,n){return this.clone().shearO(e,t,n)}shearO(e,t=0,n=0){const{a:r,b:i,c:o,d:a,e:s,f:l}=this;return this.a=r+i*e,this.c=o+a*e,this.e=s+l*e-n*e,this}skew(e,t,n,r){return this.clone().skewO(...arguments)}skewO(e,t=e,n=0,r=0){3===arguments.length&&(r=n,n=t,t=e),e=To(e),t=To(t);const i=Math.tan(e),o=Math.tan(t),{a:a,b:s,c:l,d:c,e:u,f:h}=this;return this.a=a+s*i,this.b=s+a*o,this.c=l+c*i,this.d=c+l*o,this.e=u+h*i-r*i,this.f=h+u*o-n*o,this}skewX(e,t,n){return this.skew(e,0,t,n)}skewY(e,t,n){return this.skew(0,e,t,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Za.isMatrixLike(e)){const t=new Za(e);return t.multiplyO(this)}const t=Za.formatTransforms(e),n=this,{x:r,y:i}=new Wa(t.ox,t.oy).transform(n),o=(new Za).translateO(t.rx,t.ry).lmultiplyO(n).translateO(-r,-i).scaleO(t.scaleX,t.scaleY).skewO(t.skewX,t.skewY).shearO(t.shear).rotateO(t.theta).translateO(r,i);if(isFinite(t.px)||isFinite(t.py)){const e=new Wa(r,i).transform(o),n=isFinite(t.px)?t.px-e.x:0,a=isFinite(t.py)?t.py-e.y:0;o.translateO(n,a)}return o.translateO(t.tx,t.ty),o}translate(e,t){return this.clone().translateO(e,t)}translateO(e,t){return this.e+=e||0,this.f+=t||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Ka(){return new Za(this.node.getCTM())}function Xa(){if("function"===typeof this.isRoot&&!this.isRoot()){const e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new Za(t)}return new Za(this.node.getScreenCTM())}function Ja(){if(!Ja.nodes){const e=qo().size(2,0);e.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),e.attr("focusable","false"),e.attr("aria-hidden","true");const t=e.path().node;Ja.nodes={svg:e,path:t}}if(!Ja.nodes.svg.node.parentNode){const e=Bo.document.body||Bo.document.documentElement;Ja.nodes.svg.addTo(e)}return Ja.nodes}function Qa(e){return!e.width&&!e.height&&!e.x&&!e.y}function $a(e){return e===Bo.document||(Bo.document.documentElement.contains||function(e){while(e.parentNode)e=e.parentNode;return e===Bo.document}).call(Bo.document.documentElement,e)}Yo(Za,"Matrix");class es{constructor(...e){this.init(...e)}addOffset(){return this.x+=Bo.window.pageXOffset,this.y+=Bo.window.pageYOffset,new es(this)}init(e){const t=[0,0,0,0];return e="string"===typeof e?e.split(Aa).map(parseFloat):Array.isArray(e)?e:"object"===typeof e?[null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height]:4===arguments.length?[].slice.call(arguments):t,this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Qa(this)}merge(e){const t=Math.min(this.x,e.x),n=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width)-t,i=Math.max(this.y+this.height,e.y+e.height)-n;return new es(t,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof Za||(e=new Za(e));let t=1/0,n=-1/0,r=1/0,i=-1/0;const o=[new Wa(this.x,this.y),new Wa(this.x2,this.y),new Wa(this.x,this.y2),new Wa(this.x2,this.y2)];return o.forEach((function(o){o=o.transform(e),t=Math.min(t,o.x),n=Math.max(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)})),new es(t,r,n-t,i-r)}}function ts(e,t,n){let r;try{if(r=t(e.node),Qa(r)&&!$a(e.node))throw new Error("Element not in the dom")}catch(i){r=n(e)}return r}function ns(){const e=e=>e.getBBox(),t=e=>{try{const t=e.clone().addTo(Ja().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${t.toString()}`)}},n=ts(this,e,t),r=new es(n);return r}function rs(e){const t=e=>e.getBoundingClientRect(),n=e=>{throw new Error(`Getting rbox of element "${e.node.nodeName}" is not possible`)},r=ts(this,t,n),i=new es(r);return e?i.transform(e.screenCTM().inverseO()):i.addOffset()}function is(e,t){const n=this.bbox();return e>n.x&&t>n.y&&ee.call(t,t,n,r)):this.map(n=>n[e](...t))},toArray(){return Array.prototype.concat.apply([],this)}});const as=["toArray","constructor","each"];function ss(e,t){return new os(Eo((t||Bo.document).querySelectorAll(e),(function(e){return Wo(e)})))}function ls(e){return ss(e,this.node)}function cs(e){return Wo(this.node.querySelector(e))}os.extend=function(e){e=e.reduce((e,t)=>(as.includes(t)||"_"===t[0]||(e[t]=function(...e){return this.each(t,...e)}),e),{}),Qo([os],e)};let us=0;const hs={};function ds(e){let t=e.getEventHolder();return t===Bo.window&&(t=hs),t.events||(t.events={}),t.events}function fs(e){return e.getEventTarget()}function ps(e){let t=e.getEventHolder();t===Bo.window&&(t=hs),t.events&&(t.events={})}function ms(e,t,n,r,i){const o=n.bind(r||e),a=qo(e),s=ds(a),l=fs(a);t=Array.isArray(t)?t:t.split(Aa),n._svgjsListenerId||(n._svgjsListenerId=++us),t.forEach((function(e){const t=e.split(".")[0],r=e.split(".")[1]||"*";s[t]=s[t]||{},s[t][r]=s[t][r]||{},s[t][r][n._svgjsListenerId]=o,l.addEventListener(t,o,i||!1)}))}function gs(e,t,n,r){const i=qo(e),o=ds(i),a=fs(i);("function"!==typeof n||(n=n._svgjsListenerId,n))&&(t=Array.isArray(t)?t:(t||"").split(Aa),t.forEach((function(e){const t=e&&e.split(".")[0],s=e&&e.split(".")[1];let l,c;if(n)o[t]&&o[t][s||"*"]&&(a.removeEventListener(t,o[t][s||"*"][n],r||!1),delete o[t][s||"*"][n]);else if(t&&s){if(o[t]&&o[t][s]){for(c in o[t][s])gs(a,[t,s].join("."),c);delete o[t][s]}}else if(s)for(e in o)for(l in o[e])s===l&&gs(a,[e,s].join("."));else if(t){if(o[t]){for(l in o[t])gs(a,[t,l].join("."));delete o[t]}}else{for(e in o)gs(a,e);ps(i)}})))}function vs(e,t,n,r){const i=fs(e);return t instanceof Bo.window.Event||(t=new Bo.window.CustomEvent(t,{detail:n,cancelable:!0,...r})),i.dispatchEvent(t),t}class bs extends _o{addEventListener(){}dispatch(e,t,n){return vs(this,e,t,n)}dispatchEvent(e){const t=this.getEventHolder().events;if(!t)return!0;const n=t[e.type];for(const r in n)for(const t in n[r])n[r][t](e);return!e.defaultPrevented}fire(e,t,n){return this.dispatch(e,t,n),this}getEventHolder(){return this}getEventTarget(){return this}off(e,t,n){return gs(this,e,t,n),this}on(e,t,n,r){return ms(this,e,t,n,r),this}removeEventListener(){}}function ys(){}Yo(bs,"EventTarget");const ws={duration:400,ease:">",delay:0},xs={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ks extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return"number"===typeof e||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(Aa).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class As{constructor(...e){this.init(...e)}convert(e){return new As(this.value,e)}divide(e){return e=new As(e),new As(this/e,this.unit||e.unit)}init(e,t){return t=Array.isArray(e)?e[1]:t,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=t||"","number"===typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"===typeof e?(t=e.match(da),t&&(this.value=parseFloat(t[1]),"%"===t[5]?this.value/=100:"s"===t[5]&&(this.value*=1e3),this.unit=t[5])):e instanceof As&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new As(e),new As(this-e,this.unit||e.unit)}plus(e){return e=new As(e),new As(this+e,this.unit||e.unit)}times(e){return e=new As(e),new As(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Cs=[];function Es(e){Cs.push(e)}function Ss(e,t,n){if(null==e){e={},t=this.node.attributes;for(const n of t)e[n.nodeName]=xa.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return e}if(e instanceof Array)return e.reduce((e,t)=>(e[t]=this.attr(t),e),{});if("object"===typeof e&&e.constructor===Object)for(t in e)this.attr(t,e[t]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return t=this.node.getAttribute(e),null==t?xs[e]:xa.test(t)?parseFloat(t):t;t=Cs.reduce((t,n)=>n(e,t,this),t),"number"===typeof t?t=new As(t):Ga.isColor(t)?t=new Ga(t):t.constructor===Array&&(t=new ks(t)),"leading"===e?this.leading&&this.leading(t):"string"===typeof n?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!==e&&"x"!==e||this.rebuild()}return this}class Ts extends bs{constructor(e,t){super(),this.node=e,this.type=e.nodeName,t&&e!==t&&this.attr(t)}add(e,t){return e=qo(e),e.removeNamespace&&this.node instanceof Bo.window.SVGElement&&e.removeNamespace(),null==t?this.node.appendChild(e.node):e.node!==this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this}addTo(e,t){return qo(e).put(this,t)}children(){return new os(Eo(this.node.children,(function(e){return Wo(e)})))}clear(){while(this.node.hasChildNodes())this.node.removeChild(this.node.lastChild);return this}clone(e=!0){return this.writeDataToDom(),new this.constructor(Jo(this.node.cloneNode(e)))}each(e,t){const n=this.children();let r,i;for(r=0,i=n.length;r=0}html(e,t){return this.xml(e,t,Io)}id(e){return"undefined"!==typeof e||this.node.id||(this.node.id=Xo(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Wo(this.node.lastChild)}matches(e){const t=this.node,n=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return n&&n.call(t,e)}parent(e){let t=this;if(!t.node.parentNode)return null;if(t=Wo(t.node.parentNode),!e)return t;do{if("string"===typeof e?t.matches(e):t instanceof e)return t}while(t=Wo(t.node.parentNode));return t}put(e,t){return e=qo(e),this.add(e,t),e}putIn(e,t){return qo(e).add(this,t)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=qo(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,t=null){const n=10**e,r=this.attr(t);for(const i in r)"number"===typeof r[i]&&(r[i]=Math.round(r[i]*n)/n);return this.attr(r),this}svg(e,t){return this.xml(e,t,Po)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const t=this.parent();if(!t)return this.addTo(e);const n=t.index(this);return t.put(e,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(e,t,n){if("boolean"===typeof e&&(n=t,t=e,e=null),null==e||"function"===typeof e){t=null==t||t,this.writeDataToDom();let n=this;if(null!=e){if(n=Wo(n.node.cloneNode(!0)),t){const t=e(n);if(n=t||n,!1===t)return""}n.each((function(){const t=e(this),n=t||this;!1===t?this.remove():t&&this!==n&&this.replace(n)}),!0)}return t?n.node.outerHTML:n.node.innerHTML}t=null!=t&&t;const r=Uo("wrapper",n),i=Bo.document.createDocumentFragment();r.innerHTML=e;for(let a=r.children.length;a--;)i.appendChild(r.firstElementChild);const o=this.parent();return t?this.replace(i)&&o:this.add(i)}}Qo(Ts,{attr:Ss,find:ls,findOne:cs}),Yo(Ts,"Dom");class Ns extends Ts{constructor(e,t){super(e,t),this.dom={},this.node.instance=this,e.hasAttribute("svgjs:data")&&this.setData(JSON.parse(e.getAttribute("svgjs:data"))||{})}center(e,t){return this.cx(e).cy(t)}cx(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)}cy(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)}defs(){const e=this.root();return e&&e.defs()}dmove(e,t){return this.dx(e).dy(t)}dx(e=0){return this.x(new As(e).plus(this.x()))}dy(e=0){return this.y(new As(e).plus(this.y()))}getEventHolder(){return this}height(e){return this.attr("height",e)}move(e,t){return this.x(e).y(t)}parents(e=this.root()){const t="string"===typeof e;t||(e=qo(e));const n=new os;let r=this;while((r=r.parent())&&r.node!==Bo.document&&"#document-fragment"!==r.nodeName){if(n.push(r),!t&&r.node===e.node)break;if(t&&r.matches(e))break;if(r.node===this.root().node)return null}return n}reference(e){if(e=this.attr(e),!e)return null;const t=(e+"").match(ma);return t?qo(t[1]):null}root(){const e=this.parent(Zo(Ho));return e&&e.root()}setData(e){return this.dom=e,this}size(e,t){const n=Oo(this,e,t);return this.width(new As(n.width)).height(new As(n.height))}width(e){return this.attr("width",e)}writeDataToDom(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),super.writeDataToDom()}x(e){return this.attr("x",e)}y(e){return this.attr("y",e)}}Qo(Ns,{bbox:ns,rbox:rs,inside:is,point:Va,ctm:Ka,screenCTM:Xa}),Yo(Ns,"Element");const Ms={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(e,t){return"color"===t?e:e+"-"+t}};["fill","stroke"].forEach((function(e){const t={};let n;t[e]=function(t){if("undefined"===typeof t)return this.attr(e);if("string"===typeof t||t instanceof Ga||Ga.isRgb(t)||t instanceof Ns)this.attr(e,t);else for(n=Ms[e].length-1;n>=0;n--)null!=t[Ms[e][n]]&&this.attr(Ms.prefix(e,Ms[e][n]),t[Ms[e][n]]);return this},xo(["Element","Runner"],t)})),xo(["Element","Runner"],{matrix:function(e,t,n,r,i,o){return null==e?new Za(this):this.attr("transform",new Za(e,t,n,r,i,o))},rotate:function(e,t,n){return this.transform({rotate:e,ox:t,oy:n},!0)},skew:function(e,t,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:e,ox:t,oy:n},!0):this.transform({skew:[e,t],ox:n,oy:r},!0)},shear:function(e,t,n){return this.transform({shear:e,ox:t,oy:n},!0)},scale:function(e,t,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:e,ox:t,oy:n},!0):this.transform({scale:[e,t],ox:n,oy:r},!0)},translate:function(e,t){return this.transform({translate:[e,t]},!0)},relative:function(e,t){return this.transform({relative:[e,t]},!0)},flip:function(e="both",t="center"){return-1==="xybothtrue".indexOf(e)&&(t=e,e="both"),this.transform({flip:e,origin:t},!0)},opacity:function(e){return this.attr("opacity",e)}}),xo("radius",{radius:function(e,t=e){const n=(this._element||this).type;return"radialGradient"===n?this.attr("r",new As(e)):this.rx(e).ry(t)}}),xo("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(e){return new Wa(this.node.getPointAtLength(e))}}),xo(["Element","Runner"],{font:function(e,t){if("object"===typeof e){for(t in e)this.font(t,e[t]);return this}return"leading"===e?this.leading(t):"anchor"===e?this.attr("text-anchor",t):"size"===e||"family"===e||"weight"===e||"stretch"===e||"variant"===e||"style"===e?this.attr("font-"+e,t):this.attr(e,t)}});const Ls=["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce((function(e,t){const n=function(e){return null===e?this.off(t):this.on(t,e),this};return e[t]=n,e}),{});function Os(){return this.attr("transform",null)}function Ds(){const e=(this.attr("transform")||"").split(ga).slice(0,-1).map((function(e){const t=e.trim().split("(");return[t[0],t[1].split(Aa).map((function(e){return parseFloat(e)}))]})).reverse().reduce((function(e,t){return"matrix"===t[0]?e.lmultiply(Za.fromArray(t[1])):e[t[0]].apply(e,t[1])}),new Za);return e}function Ps(e,t){if(this===e)return this;const n=this.screenCTM(),r=e.screenCTM().inverse();return this.addTo(e,t).untransform().transform(r.multiply(n)),this}function Is(e){return this.toParent(this.root(),e)}function Rs(e,t){if(null==e||"string"===typeof e){const t=new Za(this).decompose();return null==e?t:t[e]}Za.isMatrixLike(e)||(e={...e,origin:Do(e,this)});const n=!0===t?this:t||!1,r=new Za(n).transform(e);return this.attr("transform",r)}xo("Element",Ls),xo("Element",{untransform:Os,matrixify:Ds,toParent:Ps,toRoot:Is,transform:Rs});class Fs extends Ns{flatten(e=this,t){return this.each((function(){if(this instanceof Fs)return this.flatten().ungroup()})),this}ungroup(e=this.parent(),t=e.index(this)){return t=-1===t?e.children().length:t,this.each((function(n,r){return r[r.length-n-1].toParent(e,t)})),this.remove()}}Yo(Fs,"Container");class zs extends Fs{constructor(e,t=e){super(Go("defs",e),t)}flatten(){return this}ungroup(){return this}}Yo(zs,"Defs");class Bs extends Ns{}function _s(e){return this.attr("rx",e)}function js(e){return this.attr("ry",e)}function Hs(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())}function Us(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())}function qs(e){return this.attr("cx",e)}function Gs(e){return this.attr("cy",e)}function Ws(e){return null==e?2*this.rx():this.rx(new As(e).divide(2))}function Vs(e){return null==e?2*this.ry():this.ry(new As(e).divide(2))}Yo(Bs,"Shape");var Ys={__proto__:null,rx:_s,ry:js,x:Hs,y:Us,cx:qs,cy:Gs,width:Ws,height:Vs};class Zs extends Bs{constructor(e,t=e){super(Go("ellipse",e),t)}size(e,t){const n=Oo(this,e,t);return this.rx(new As(n.width).divide(2)).ry(new As(n.height).divide(2))}}Qo(Zs,Ys),xo("Container",{ellipse:$o((function(e=0,t=e){return this.put(new Zs).size(e,t).move(0,0)}))}),Yo(Zs,"Ellipse");class Ks extends Ts{constructor(e=Bo.document.createDocumentFragment()){super(e)}xml(e,t,n){if("boolean"===typeof e&&(n=t,t=e,e=null),null==e||"function"===typeof e){const e=new Ts(Uo("wrapper",n));return e.add(this.node.cloneNode(!0)),e.xml(!1,n)}return super.xml(e,!1,n)}}function Xs(e,t){return"radialGradient"===(this._element||this).type?this.attr({fx:new As(e),fy:new As(t)}):this.attr({x1:new As(e),y1:new As(t)})}function Js(e,t){return"radialGradient"===(this._element||this).type?this.attr({cx:new As(e),cy:new As(t)}):this.attr({x2:new As(e),y2:new As(t)})}Yo(Ks,"Fragment");var Qs={__proto__:null,from:Xs,to:Js};class $s extends Fs{constructor(e,t){super(Go(e+"Gradient","string"===typeof e?null:e),t)}attr(e,t,n){return"transform"===e&&(e="gradientTransform"),super.attr(e,t,n)}bbox(){return new es}targets(){return ss('svg [fill*="'+this.id()+'"]')}toString(){return this.url()}update(e){return this.clear(),"function"===typeof e&&e.call(this,this),this}url(){return'url("#'+this.id()+'")'}}Qo($s,Qs),xo({Container:{gradient(...e){return this.defs().gradient(...e)}},Defs:{gradient:$o((function(e,t){return this.put(new $s(e)).update(t)}))}}),Yo($s,"Gradient");class el extends Fs{constructor(e,t=e){super(Go("pattern",e),t)}attr(e,t,n){return"transform"===e&&(e="patternTransform"),super.attr(e,t,n)}bbox(){return new es}targets(){return ss('svg [fill*="'+this.id()+'"]')}toString(){return this.url()}update(e){return this.clear(),"function"===typeof e&&e.call(this,this),this}url(){return'url("#'+this.id()+'")'}}xo({Container:{pattern(...e){return this.defs().pattern(...e)}},Defs:{pattern:$o((function(e,t,n){return this.put(new el).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}))}}),Yo(el,"Pattern");class tl extends Bs{constructor(e,t=e){super(Go("image",e),t)}load(e,t){if(!e)return this;const n=new Bo.window.Image;return ms(n,"load",(function(e){const r=this.parent(el);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof el&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"===typeof t&&t.call(this,e)}),this),ms(n,"load error",(function(){gs(n)})),this.attr("href",n.src=e,Fo)}}Es((function(e,t,n){return"fill"!==e&&"stroke"!==e||ka.test(t)&&(t=n.root().defs().image(t)),t instanceof tl&&(t=n.root().defs().pattern(0,0,e=>{e.add(t)})),t})),xo({Container:{image:$o((function(e,t){return this.put(new tl).size(0,0).load(e,t)}))}}),Yo(tl,"Image");class nl extends ks{bbox(){let e=-1/0,t=-1/0,n=1/0,r=1/0;return this.forEach((function(i){e=Math.max(i[0],e),t=Math.max(i[1],t),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new es(n,r,e-n,t-r)}move(e,t){const n=this.bbox();if(e-=n.x,t-=n.y,!isNaN(e)&&!isNaN(t))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+e,this[r][1]+t];return this}parse(e=[0,0]){const t=[];e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Aa).map(parseFloat),e.length%2!==0&&e.pop();for(let n=0,r=e.length;n=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*e/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*t/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let t=0,n=this.length;t":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)},bezier:function(e,t,n,r){return function(i){return i<0?e>0?t/e*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):e<1?(1-t)/(1-e)*i+(t-e)/(1-e):1:3*i*(1-i)**2*t+3*i**2*(1-i)*r+i**3}},steps:function(e,t="end"){t=t.split("-").reverse()[0];let n=e;return"none"===t?--n:"both"===t&&++n,(r,i=!1)=>{let o=Math.floor(r*e);const a=r*o%1===0;return"start"!==t&&"both"!==t||++o,i&&a&&--o,r>=0&&o<0&&(o=0),r<=1&&o>n&&(o=n),o/n}}};class fl{done(){return!1}}class pl extends fl{constructor(e=ws.ease){super(),this.ease=dl[e]||e}step(e,t,n){return"number"!==typeof e?n<1?e:t:e+(t-e)*this.ease(n)}}class ml extends fl{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,t,n,r){return this.stepper(e,t,n,r)}}function gl(){const e=(this._duration||500)/1e3,t=this._overshoot||0,n=1e-10,r=Math.PI,i=Math.log(t/100+n),o=-i/Math.sqrt(r*r+i*i),a=3.9/(o*e);this.d=2*o*a,this.k=a*a}class vl extends ml{constructor(e=500,t=0){super(),this.duration(e).overshoot(t)}step(e,t,n,r){if("string"===typeof e)return e;if(r.done=n===1/0,n===1/0)return t;if(0===n)return e;n>100&&(n=16),n/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(e-t),a=e+i*n+o*n*n/2;return r.velocity=i+o*n,r.done=Math.abs(t-a)+Math.abs(i)<.002,r.done?t:a}}Qo(vl,{duration:hl("_duration",gl),overshoot:hl("_overshoot",gl)});class bl extends ml{constructor(e=.1,t=.01,n=0,r=1e3){super(),this.p(e).i(t).d(n).windup(r)}step(e,t,n,r){if("string"===typeof e)return e;if(r.done=n===1/0,n===1/0)return t;if(0===n)return e;const i=t-e;let o=(r.integral||0)+i*n;const a=(i-(r.error||0))/n,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?t:e+(this.P*i+this.I*o+this.D*a)}}Qo(bl,{windup:hl("_windup"),p:hl("P"),i:hl("I"),d:hl("D")});const yl={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},wl={M:function(e,t,n){return t.x=n.x=e[0],t.y=n.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},S:function(e,t){return t.x=e[2],t.y=e[3],["S",e[0],e[1],e[2],e[3]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},T:function(e,t){return t.x=e[0],t.y=e[1],["T",e[0],e[1]]},Z:function(e,t,n){return t.x=n.x,t.y=n.y,["Z"]},A:function(e,t){return t.x=e[5],t.y=e[6],["A",e[0],e[1],e[2],e[3],e[4],e[5],e[6]]}},xl="mlhvqtcsaz".split("");for(let RE=0,FE=xl.length;RE=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=e,this[i][2]+=t):"H"===r?this[i][1]+=e:"V"===r?this[i][1]+=t:"C"===r||"S"===r||"Q"===r?(this[i][1]+=e,this[i][2]+=t,this[i][3]+=e,this[i][4]+=t,"C"===r&&(this[i][5]+=e,this[i][6]+=t)):"A"===r&&(this[i][6]+=e,this[i][7]+=t);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),Ml(e)}size(e,t){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*e/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*t/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*e/n.width+n.x,this[r][2]=(this[r][2]-n.y)*t/n.height+n.y,this[r][3]=(this[r][3]-n.x)*e/n.width+n.x,this[r][4]=(this[r][4]-n.y)*t/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*e/n.width+n.x,this[r][6]=(this[r][6]-n.y)*t/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*e/n.width,this[r][2]=this[r][2]*t/n.height,this[r][6]=(this[r][6]-n.x)*e/n.width+n.x,this[r][7]=(this[r][7]-n.y)*t/n.height+n.y);return this}toString(){return Ll(this)}}const Dl=e=>{const t=typeof e;return"number"===t?As:"string"===t?Ga.isColor(e)?Ga:Aa.test(e)?Ca.test(e)?Ol:ks:da.test(e)?As:Il:Bl.indexOf(e.constructor)>-1?e.constructor:Array.isArray(e)?ks:"object"===t?zl:Il};class Pl{constructor(e){this._stepper=e||new pl("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){const e=this._context.map(this._stepper.done).reduce((function(e,t){return e&&t}),!0);return e}from(e){return null==e?this._from:(this._from=this._set(e),this)}stepper(e){return null==e?this._stepper:(this._stepper=e,this)}to(e){return null==e?this._to:(this._to=this._set(e),this)}type(e){return null==e?this._type:(this._type=e,this)}_set(e){this._type||this.type(Dl(e));let t=new this._type(e);return this._type===Ga&&(t=this._to?t[this._to[4]]():this._from?t[this._from[4]]():t),this._type===zl&&(t=this._to?t.align(this._to):this._from?t.align(this._from):t),t=t.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(t.length)).map(Object).map((function(e){return e.done=!0,e})),t}}class Il{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Rl{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Rl.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Rl.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Fl=(e,t)=>e[0]t[0]?1:0;class zl{constructor(...e){this.init(...e)}align(e){const t=this.values;for(let n=0,r=t.length;ne.concat(t),[]),this}toArray(){return this.values}valueOf(){const e={},t=this.values;while(t.length){const n=t.shift(),r=t.shift(),i=t.shift(),o=t.splice(0,i);e[n]=new r(o)}return e}}const Bl=[Il,Rl,zl];function _l(e=[]){Bl.push(...[].concat(e))}function jl(){Qo(Bl,{to(e){return(new Pl).type(this.constructor).from(this.toArray()).to(e)},fromArray(e){return this.init(e),this},toConsumable(){return this.toArray()},morph(e,t,n,r,i){const o=function(e,o){return r.step(e,t[o],n,i[o],i)};return this.fromArray(e.map(o))}})}class Hl extends Bs{constructor(e,t=e){super(Go("path",e),t)}array(){return this._array||(this._array=new Ol(this.attr("d")))}clear(){return delete this._array,this}height(e){return null==e?this.bbox().height:this.size(this.bbox().width,e)}move(e,t){return this.attr("d",this.array().move(e,t))}plot(e){return null==e?this.array():this.clear().attr("d","string"===typeof e?e:this._array=new Ol(e))}size(e,t){const n=Oo(this,e,t);return this.attr("d",this.array().size(n.width,n.height))}width(e){return null==e?this.bbox().width:this.size(e,this.bbox().height)}x(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)}y(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)}}function Ul(){return this._array||(this._array=new nl(this.attr("points")))}function ql(){return delete this._array,this}function Gl(e,t){return this.attr("points",this.array().move(e,t))}function Wl(e){return null==e?this.array():this.clear().attr("points","string"===typeof e?e:this._array=new nl(e))}function Vl(e,t){const n=Oo(this,e,t);return this.attr("points",this.array().size(n.width,n.height))}Hl.prototype.MorphArray=Ol,xo({Container:{path:$o((function(e){return this.put(new Hl).plot(e||new Ol)}))}}),Yo(Hl,"Path");var Yl={__proto__:null,array:Ul,clear:ql,move:Gl,plot:Wl,size:Vl};class Zl extends Bs{constructor(e,t=e){super(Go("polygon",e),t)}}xo({Container:{polygon:$o((function(e){return this.put(new Zl).plot(e||new nl)}))}}),Qo(Zl,ll),Qo(Zl,Yl),Yo(Zl,"Polygon");class Kl extends Bs{constructor(e,t=e){super(Go("polyline",e),t)}}xo({Container:{polyline:$o((function(e){return this.put(new Kl).plot(e||new nl)}))}}),Qo(Kl,ll),Qo(Kl,Yl),Yo(Kl,"Polyline");class Xl extends Bs{constructor(e,t=e){super(Go("rect",e),t)}}Qo(Xl,{rx:_s,ry:js}),xo({Container:{rect:$o((function(e,t){return this.put(new Xl).size(e,t)}))}}),Yo(Xl,"Rect");class Jl{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const t="undefined"!==typeof e.next?e:{value:e,next:null,prev:null};return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._last=t,this._first=t),t}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Ql={nextDraw:null,frames:new Jl,timeouts:new Jl,immediates:new Jl,timer:()=>Bo.window.performance||Bo.window.Date,transforms:[],frame(e){const t=Ql.frames.push({run:e});return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),t},timeout(e,t){t=t||0;const n=Ql.timer().now()+t,r=Ql.timeouts.push({run:e,time:n});return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),r},immediate(e){const t=Ql.immediates.push(e);return null===Ql.nextDraw&&(Ql.nextDraw=Bo.window.requestAnimationFrame(Ql._draw)),t},cancelFrame(e){null!=e&&Ql.frames.remove(e)},clearTimeout(e){null!=e&&Ql.timeouts.remove(e)},cancelImmediate(e){null!=e&&Ql.immediates.remove(e)},_draw(e){let t=null;const n=Ql.timeouts.last();while(t=Ql.timeouts.shift())if(e>=t.time?t.run():Ql.timeouts.push(t),t===n)break;let r=null;const i=Ql.frames.last();while(r!==i&&(r=Ql.frames.shift()))r.run(e);let o=null;while(o=Ql.immediates.shift())o();Ql.nextDraw=Ql.timeouts.first()||Ql.frames.first()?Bo.window.requestAnimationFrame(Ql._draw):null}},$l=function(e){const t=e.start,n=e.runner.duration(),r=t+n;return{start:t,duration:n,end:r,runner:e.runner}},ec=function(){const e=Bo.window;return(e.performance||e.Date).now()};class tc extends bs{constructor(e=ec){super(),this._timeSource=e,this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),t=e?e.runner.duration():0,n=e?e.start:this._time;return n+t}getEndTimeOfTimeline(){const e=this._runners.map(e=>e.start+e.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return null==e?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const t=this.speed();if(null==e)return this.speed(-t);const n=Math.abs(t);return this.speed(e?-n:n)}schedule(e,t,n){if(null==e)return this._runners.map($l);let r=0;const i=this.getEndTime();if(t=t||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=t,t=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(e.id);n&&(r=n.start+t,t=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const e=this.getLastRunnerInfo(),t=e?e.start:this._time;r=t}}e.unschedule(),e.timeline(this);const o=e.persist(),a={persist:null===o?this._persist:o,start:r+t,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((e,t)=>e.start-t.start),this._runnerIds=this._runners.map(e=>e.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return null==e?this._timeSource:(this._timeSource=e,this)}speed(e){return null==e?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return null==e?this._time:(this._time=e,this._continue(!0))}unschedule(e){const t=this._runnerIds.indexOf(e.id);return t<0||(this._runners.splice(t,1),this._runnerIds.splice(t,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Ql.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Ql.frame(this._step)),this)}_stepFn(e=!1){const t=this._timeSource();let n=t-this._lastSourceTime;e&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=t,e||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const e=this._runners[o],t=e.runner,n=this._time-e.start;n<=0&&t.reset()}let i=!1;for(let o=0,a=this._runners.length;o0?this._continue():(this.pause(),this.fire("finished")),this}}xo({Element:{timeline:function(e){return null==e?(this._timeline=this._timeline||new tc,this._timeline):(this._timeline=e,this)}}});class nc extends bs{constructor(e){super(),this.id=nc.id++,e=null==e?ws.duration:e,e="function"===typeof e?new ml(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"===typeof e&&e,this._isDeclarative=e instanceof ml,this._stepper=this._isDeclarative?e:new pl,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Za,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,t,n){let r=1,i=!1,o=0;return e=e||ws.duration,t=t||ws.delay,n=n||"last","object"!==typeof e||e instanceof fl||(t=e.delay||t,n=e.when||n,i=e.swing||i,r=e.times||r,o=e.wait||o,e=e.duration||ws.duration),{duration:e,delay:t,swing:i,times:r,wait:o,when:n}}active(e){return null==e?this.enabled:(this.enabled=e,this)}addTransform(e,t){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,t,n){const r=nc.sanitise(e,t,n),i=new nc(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Za,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new pl(e),this}element(e){return null==e?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,t,n){return"object"===typeof e&&(t=e.swing,n=e.wait,e=e.times),this._times=e||1/0,this._swing=t||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(e){const t=this._duration+this._wait;if(null==e){const e=Math.floor(this._time/t),n=this._time-e*t,r=n/this._duration;return Math.min(e+r,this._times)}const n=Math.floor(e),r=e%1,i=t*n+this._duration*r;return this.time(i)}persist(e){return null==e?this._persist:(this._persist=e,this)}position(e){const t=this._time,n=this._duration,r=this._wait,i=this._times,o=this._swing,a=this._reverse;let s;if(null==e){const e=function(e){const t=o*Math.floor(e%(2*(r+n))/(r+n)),i=t&&!a||!t&&a,s=Math.pow(-1,i)*(e%(r+n))/n+i,l=Math.max(Math.min(s,1),0);return l},l=i*(r+n)-r;return s=t<=0?Math.round(e(1e-5)):t=0;this._lastPosition=t;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime=r;this._lastTime=this._time,i&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!o&&this._time>=r,this._reseted=!1;let s=!1;return(n||a)&&(this._initialise(n),this.transforms=new Za,s=this._run(a?e:t),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}time(e){if(null==e)return this._time;const t=e-this._time;return this.step(t),this}timeline(e){return"undefined"===typeof e?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let t=0,n=this._queue.length;te.lmultiplyO(t),oc=e=>e.transforms;function ac(){const e=this._transformationRunners.runners,t=e.map(oc).reduce(ic,new Za);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class sc{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const t=e.id+1;return this.runners.push(e),this.ids.push(t),this}clearBefore(e){const t=this.ids.indexOf(e+1)||1;return this.ids.splice(0,t,0),this.runners.splice(0,t,new rc).forEach(e=>e.clearTransformsFromQueue()),this}edit(e,t){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1,e+1),this.runners.splice(n,1,t),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let t=0;tt.id<=e.id).map(oc).reduce(ic,new Za)},_addRunner(e){this._transformationRunners.add(e),Ql.cancelImmediate(this._frameId),this._frameId=Ql.immediate(ac.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new sc).add(new rc(new Za(this))))}}});const lc=(e,t)=>e.filter(e=>!t.includes(e));Qo(nc,{attr(e,t){return this.styleAttr("attr",e,t)},css(e,t){return this.styleAttr("css",e,t)},styleAttr(e,t,n){if("string"===typeof t)return this.styleAttr(e,{[t]:n});let r=t;if(this._tryRetarget(e,r))return this;let i=new Pl(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[e](o))}),(function(t){return this.element()[e](i.at(t).valueOf()),i.done()}),(function(t){const n=Object.keys(t),a=lc(n,o);if(a.length){const t=this.element()[e](a),n=new zl(i.from()).valueOf();Object.assign(n,t),i.from(n)}const s=new zl(i.to()).valueOf();Object.assign(s,t),i.to(s),o=n,r=t})),this._rememberMorpher(e,i),this},zoom(e,t){if(this._tryRetarget("zoom",e,t))return this;let n=new Pl(this._stepper).to(new As(e));return this.queue((function(){n=n.from(this.element().zoom())}),(function(e){return this.element().zoom(n.at(e),t),n.done()}),(function(e,r){t=r,n.to(e)})),this._rememberMorpher("zoom",n),this},transform(e,t,n){if(t=e.relative||t,this._isDeclarative&&!t&&this._tryRetarget("transform",e))return this;const r=Za.isMatrixLike(e);n=null!=e.affine?e.affine:null!=n?n:!r;const i=new Pl(this._stepper).type(n?Rl:Za);let o,a,s,l,c;function u(){a=a||this.element(),o=o||Do(e,a),c=new Za(t?void 0:a),a._addRunner(this),t||a._clearTransformRunnersBefore(this)}function h(u){t||this.clearTransform();const{x:h,y:d}=new Wa(o).transform(a._currentTransform(this));let f=new Za({...e,origin:[h,d]}),p=this._isDeclarative&&s?s:c;if(n){f=f.decompose(h,d),p=p.decompose(h,d);const e=f.rotate,t=p.rotate,n=[e-360,e,e+360],r=n.map(e=>Math.abs(e-t)),i=Math.min(...r),o=r.indexOf(i);f.rotate=n[o]}t&&(r||(f.rotate=e.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),i.from(p),i.to(f);const m=i.at(u);return l=m.rotate,s=new Za(m),this.addTransform(s),a._addRunner(this),i.done()}function d(t){(t.origin||"center").toString()!==(e.origin||"center").toString()&&(o=Do(t,a)),e={...t,origin:o}}return this.queue(u,h,d,!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(e,t){return this._queueNumber("x",e)},y(e){return this._queueNumber("y",e)},dx(e=0){return this._queueNumberDelta("x",e)},dy(e=0){return this._queueNumberDelta("y",e)},dmove(e,t){return this.dx(e).dy(t)},_queueNumberDelta(e,t){if(t=new As(t),this._tryRetarget(e,t))return this;const n=new Pl(this._stepper).to(t);let r=null;return this.queue((function(){r=this.element()[e](),n.from(r),n.to(r+t)}),(function(t){return this.element()[e](n.at(t)),n.done()}),(function(e){n.to(r+new As(e))})),this._rememberMorpher(e,n),this},_queueObject(e,t){if(this._tryRetarget(e,t))return this;const n=new Pl(this._stepper).to(t);return this.queue((function(){n.from(this.element()[e]())}),(function(t){return this.element()[e](n.at(t)),n.done()})),this._rememberMorpher(e,n),this},_queueNumber(e,t){return this._queueObject(e,new As(t))},cx(e){return this._queueNumber("cx",e)},cy(e){return this._queueNumber("cy",e)},move(e,t){return this.x(e).y(t)},center(e,t){return this.cx(e).cy(t)},size(e,t){let n;return e&&t||(n=this._element.bbox()),e||(e=n.width/n.height*t),t||(t=n.height/n.width*e),this.width(e).height(t)},width(e){return this._queueNumber("width",e)},height(e){return this._queueNumber("height",e)},plot(e,t,n,r){if(4===arguments.length)return this.plot([e,t,n,r]);if(this._tryRetarget("plot",e))return this;const i=new Pl(this._stepper).type(this._element.MorphArray).to(e);return this.queue((function(){i.from(this._element.array())}),(function(e){return this._element.plot(i.at(e)),i.done()})),this._rememberMorpher("plot",i),this},leading(e){return this._queueNumber("leading",e)},viewbox(e,t,n,r){return this._queueObject("viewbox",new es(e,t,n,r))},update(e){return"object"!==typeof e?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",e.offset),this)}}),Qo(nc,{rx:_s,ry:js,from:Xs,to:Js}),Yo(nc,"Runner");class cc extends Fs{constructor(e,t=e){super(Go("svg",e),t),this.namespace()}defs(){return this.isRoot()?Wo(this.node.querySelector("defs"))||this.put(new zs):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Bo.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Po,version:"1.1"}).attr("xmlns:xlink",Fo,Ro).attr("xmlns:svgjs",zo,Ro):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ro).attr("xmlns:svgjs",null,Ro)}root(){return this.isRoot()?this:super.root()}}xo({Container:{nested:$o((function(){return this.put(new cc)}))}}),Yo(cc,"Svg",!0);class uc extends Fs{constructor(e,t=e){super(Go("symbol",e),t)}}function hc(e){return!1===this._build&&this.clear(),this.node.appendChild(Bo.document.createTextNode(e)),this}function dc(){return this.node.getComputedTextLength()}function fc(e,t=this.bbox()){return null==e?t.x:this.attr("x",this.attr("x")+e-t.x)}function pc(e,t=this.bbox()){return null==e?t.y:this.attr("y",this.attr("y")+e-t.y)}function mc(e,t,n=this.bbox()){return this.x(e,n).y(t,n)}function gc(e,t=this.bbox()){return null==e?t.cx:this.attr("x",this.attr("x")+e-t.cx)}function vc(e,t=this.bbox()){return null==e?t.cy:this.attr("y",this.attr("y")+e-t.cy)}function bc(e,t,n=this.bbox()){return this.cx(e,n).cy(t,n)}function yc(e){return this.attr("x",e)}function wc(e){return this.attr("y",e)}function xc(e,t){return this.ax(e).ay(t)}function kc(e){return this._build=!!e,this}xo({Container:{symbol:$o((function(){return this.put(new uc)}))}}),Yo(uc,"Symbol");var Ac={__proto__:null,plain:hc,length:dc,x:fc,y:pc,move:mc,cx:gc,cy:vc,center:bc,ax:yc,ay:wc,amove:xc,build:kc};class Cc extends Bs{constructor(e,t=e){super(Go("text",e),t),this.dom.leading=new As(1.3),this._rebuild=!0,this._build=!1}leading(e){return null==e?this.dom.leading:(this.dom.leading=new As(e),this.rebuild())}rebuild(e){if("boolean"===typeof e&&(this._rebuild=e),this._rebuild){const e=this;let t=0;const n=this.dom.leading;this.each((function(r){const i=Bo.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=n*new As(i);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?t+=o:(this.attr("dy",r?o+t:0),t=0))})),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new As(e.leading||1.3),this}text(e){if(void 0===e){const t=this.node.childNodes;let n=0;e="";for(let r=0,i=t.length;r{let i;try{i=n.bbox()}catch(l){return}const o=new Za(n),a=o.translate(e,t).transform(o.inverse()),s=new Wa(i.x,i.y).transform(a);n.move(s.x,s.y)}),this}function Lc(e){return this.dmove(e,0)}function Oc(e){return this.dmove(0,e)}function Dc(e,t=this.bbox()){return null==e?t.height:this.size(t.width,e,t)}function Pc(e=0,t=0,n=this.bbox()){const r=e-n.x,i=t-n.y;return this.dmove(r,i)}function Ic(e,t,n=this.bbox()){const r=Oo(this,e,t,n),i=r.width/n.width,o=r.height/n.height;return this.children().forEach((e,t)=>{const r=new Wa(n).transform(new Za(e).inverse());e.scale(i,o,r.x,r.y)}),this}function Rc(e,t=this.bbox()){return null==e?t.width:this.size(e,t.height,t)}function Fc(e,t=this.bbox()){return null==e?t.x:this.move(e,t.y,t)}function zc(e,t=this.bbox()){return null==e?t.y:this.move(t.x,e,t)}xo({Container:{foreignObject:$o((function(e,t){return this.put(new Nc).size(e,t)}))}}),Yo(Nc,"ForeignObject");var Bc={__proto__:null,dmove:Mc,dx:Lc,dy:Oc,height:Dc,move:Pc,size:Ic,width:Rc,x:Fc,y:zc};class _c extends Fs{constructor(e,t=e){super(Go("g",e),t)}}Qo(_c,Bc),xo({Container:{group:$o((function(){return this.put(new _c)}))}}),Yo(_c,"G");class jc extends Fs{constructor(e,t=e){super(Go("a",e),t)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Fo)}}Qo(jc,Bc),xo({Container:{link:$o((function(e){return this.put(new jc).to(e)}))},Element:{unlink(){const e=this.linker();if(!e)return this;const t=e.parent();if(!t)return this.remove();const n=t.index(e);return t.add(this,n),e.remove(),this},linkTo(e){let t=this.linker();return t||(t=new jc,this.wrap(t)),"function"===typeof e?e.call(t,t):t.to(e),this},linker(){const e=this.parent();return e&&"a"===e.node.nodeName.toLowerCase()?e:null}}}),Yo(jc,"A");class Hc extends Fs{constructor(e,t=e){super(Go("mask",e),t)}remove(){return this.targets().forEach((function(e){e.unmask()})),super.remove()}targets(){return ss('svg [mask*="'+this.id()+'"]')}}xo({Container:{mask:$o((function(){return this.defs().put(new Hc)}))},Element:{masker(){return this.reference("mask")},maskWith(e){const t=e instanceof Hc?e:this.parent().mask().add(e);return this.attr("mask",'url("#'+t.id()+'")')},unmask(){return this.attr("mask",null)}}}),Yo(Hc,"Mask");class Uc extends Ns{constructor(e,t=e){super(Go("stop",e),t)}update(e){return("number"===typeof e||e instanceof As)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new As(e.offset)),this}}function qc(e,t){if(!e)return"";if(!t)return e;let n=e+"{";for(const r in t)n+=Mo(r)+":"+t[r]+";";return n+="}",n}xo({Gradient:{stop:function(e,t,n){return this.put(new Uc).update(e,t,n)}}}),Yo(Uc,"Stop");class Gc extends Ns{constructor(e,t=e){super(Go("style",e),t)}addText(e=""){return this.node.textContent+=e,this}font(e,t,n={}){return this.rule("@font-face",{fontFamily:e,src:t,...n})}rule(e,t){return this.addText(qc(e,t))}}xo("Dom",{style(e,t){return this.put(new Gc).rule(e,t)},fontface(e,t,n){return this.put(new Gc).font(e,t,n)}}),Yo(Gc,"Style");class Wc extends Cc{constructor(e,t=e){super(Go("textPath",e),t)}array(){const e=this.track();return e?e.array():null}plot(e){const t=this.track();let n=null;return t&&(n=t.plot(e)),null==e?n:this}track(){return this.reference("href")}}xo({Container:{textPath:$o((function(e,t){return e instanceof Cc||(e=this.text(e)),e.path(t)}))},Text:{path:$o((function(e,t=!0){const n=new Wc;let r;if(e instanceof Hl||(e=this.defs().path(e)),n.attr("href","#"+e,Fo),t)while(r=this.node.firstChild)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:$o((function(e){return e instanceof Cc||(e=(new Cc).addTo(this.parent()).text(e)),e.path(this)})),targets(){return ss("svg textPath").filter(e=>(e.attr("href")||"").includes(this.id()))}}}),Wc.prototype.MorphArray=Ol,Yo(Wc,"TextPath");class Vc extends Bs{constructor(e,t=e){super(Go("use",e),t)}use(e,t){return this.attr("href",(t||"")+"#"+e,Fo)}}xo({Container:{use:$o((function(e,t){return this.put(new Vc).use(e,t)}))}}),Yo(Vc,"Use");const Yc=qo;Qo([cc,uc,tl,el,ul],ko("viewbox")),Qo([cl,Kl,Zl,Hl],ko("marker")),Qo(Cc,ko("Text")),Qo(Hl,ko("Path")),Qo(zs,ko("Defs")),Qo([Cc,Ec],ko("Tspan")),Qo([Xl,Zs,$s,nc],ko("radius")),Qo(bs,ko("EventTarget")),Qo(Ts,ko("Dom")),Qo(Ns,ko("Element")),Qo(Bs,ko("Shape")),Qo([Fs,Ks],ko("Container")),Qo($s,ko("Gradient")),Qo(nc,ko("Runner")),os.extend(Ao()),_l([As,Ga,es,Za,ks,nl,Ol,Wa]),jl();class Zc{constructor(e){this.node=e}getShapePadding(e,t,n,r){const i=this.node.getShape(),o=15,a=5,s=e+2*n,l=t+2*r,c=Math.abs(s-l);switch(i){case oo["a"].SHAPE.ROUNDED_RECTANGLE:return{paddingX:t>e?(t-e)/2:0,paddingY:0};case oo["a"].SHAPE.DIAMOND:return{paddingX:e/2,paddingY:t/2};case oo["a"].SHAPE.PARALLELOGRAM:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.OUTER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.INNER_TRIANGULAR_RECTANGLE:return{paddingX:n<=0?o:0,paddingY:0};case oo["a"].SHAPE.ELLIPSE:return{paddingX:n<=0?o:0,paddingY:r<=0?a:0};case oo["a"].SHAPE.CIRCLE:return{paddingX:l>s?c/2:0,paddingY:l0}function Qc(){const e=this.formatGetGeneralization();return!!e.find(e=>!e.range||e.range.length<=0)}function $c(e){return this._generalizationList.findIndex(t=>t.generalizationNode.uid===e.uid)}function eu(){if(this.isGeneralization||!this.checkHasGeneralization())return;let e=0,t=0;const n=this.formatGetGeneralization();n.forEach((n,r)=>{let i=this._generalizationList[r];i||(i=this._generalizationList[r]={}),i.node=this,i.range=n.range,i.generalizationLine||(i.generalizationLine=this.lineDraw.path()),i.generalizationNode||(i.generalizationNode=new ah({data:{data:n},uid:Object(v["m"])(),renderer:this.renderer,mindMap:this.mindMap,isGeneralization:!0})),i.generalizationNode.generalizationBelongNode=this,i.generalizationNode.width>e&&(e=i.generalizationNode.width),i.generalizationNode.height>t&&(t=i.generalizationNode.height),n.isActive&&this.renderer.addNodeToActiveList(i.generalizationNode)}),this._generalizationNodeWidth=e,this._generalizationNodeHeight=t}function tu(){this.isGeneralization||(this.removeGeneralization(),this.createGeneralizationNode())}function nu(){if(this.isGeneralization)return;this.updateGeneralizationData();const e=this.formatGetGeneralization();e.length<=0||!1===this.getData("expand")?this.removeGeneralization():(e.length!==this._generalizationList.length&&this.removeGeneralization(),this.createGeneralizationNode(),this.renderer.layout.renderGeneralization(this._generalizationList),this._generalizationList.forEach(e=>{this.style.generalizationLine(e.generalizationLine),e.generalizationNode.render()}))}function ru(){const e=this.children.length,t=this.formatGetGeneralization(),n=[];t.forEach(t=>{t.range?t.range.length>0&&t.range[0]<=e-1&&t.range[1]<=e-1&&n.push(t):n.push(t)}),n.length!==t.length&&this.setData({generalization:n})}function iu(){this.isGeneralization||(this._generalizationList.forEach(e=>{e.generalizationLine&&(e.generalizationLine.remove(),e.generalizationLine=null),e.generalizationNode&&(this.renderer.removeNodeFromActiveList(e.generalizationNode),e.generalizationNode.remove(),e.generalizationNode=null)}),this._generalizationList=[],this.generalizationBelongNode&&this.nodeDraw.find(".generalization_"+this.generalizationBelongNode.uid).remove())}function ou(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.hide(),e.generalizationNode&&e.generalizationNode.hide()})}function au(){this.isGeneralization||this._generalizationList.forEach(e=>{e.generalizationLine&&e.generalizationLine.show(),e.generalizationNode&&e.generalizationNode.show()})}function su(e){this._generalizationList.forEach(t=>{t.generalizationLine.opacity(e),t.generalizationNode.group.opacity(e)})}function lu(){const e=this.generalizationBelongNode,t=e.formatGetGeneralization(),n=e.getGeneralizationNodeIndex(this),r=t[n];Array.isArray(r.range)&&r.range.length>0?this.mindMap.renderer.highlightNode(e,r.range):this.mindMap.renderer.highlightNode(e)}function cu(){this.mindMap.renderer.closeHighlightNode()}var uu={formatGetGeneralization:Xc,checkHasGeneralization:Jc,checkHasSelfGeneralization:Qc,getGeneralizationNodeIndex:$c,createGeneralizationNode:eu,updateGeneralization:tu,updateGeneralizationData:ru,renderGeneralization:nu,removeGeneralization:iu,hideGeneralization:ou,showGeneralization:au,setGeneralizationOpacity:su,handleGeneralizationMouseenter:lu,handleGeneralizationMouseleave:cu};const hu='',du='',fu='',pu='';var mu={open:hu,close:du,remove:fu,imgAdjust:pu};function gu(){if(this._openExpandNode)return;let{close:e,open:t}=this.mindMap.opt.expandBtnIcon||{};this.mindMap.opt.isShowExpandNum?(this._openExpandNode=Yc().text().size(this.expandBtnSize,this.expandBtnSize),this._openExpandNode.attr({"text-anchor":"middle","dominant-baseline":"middle",x:this.expandBtnSize/2,y:2})):(this._openExpandNode=Yc(t||mu.open).size(this.expandBtnSize,this.expandBtnSize),this._openExpandNode.x(0).y(-this.expandBtnSize/2)),this._closeExpandNode=Yc(e||mu.close).size(this.expandBtnSize,this.expandBtnSize),this._closeExpandNode.x(0).y(-this.expandBtnSize/2),this._fillExpandNode=(new Sc).size(this.expandBtnSize),this._fillExpandNode.x(0).y(-this.expandBtnSize/2),this.style.iconBtn(this._openExpandNode,this._closeExpandNode,this._fillExpandNode)}function vu(e=[]){return e.reduce((e,t)=>e+this.sumNode(t.children||[]),e.length)}function bu(){let e,{expand:t}=this.getData();if(t!==this._lastExpandBtnType&&(this._expandBtn&&this._expandBtn.clear(),this.createExpandNodeContent(),!1===t?(e=this._openExpandNode,this._lastExpandBtnType=!1):(e=this._closeExpandNode,this._lastExpandBtnType=!0),this._expandBtn)){let{isShowExpandNum:n,expandBtnStyle:r,expandBtnNumHandler:i}=this.mindMap.opt;if(n)if(t)this._fillExpandNode.stroke("none");else{this._fillExpandNode.stroke({color:r.strokeColor});let t=this.sumNode(this.nodeData.children);t=i(t),e.text(t)}this._expandBtn.add(this._fillExpandNode).add(e)}}function yu(){this._expandBtn&&this.renderer.layout.renderExpandBtn(this,this._expandBtn)}function wu(){!this.nodeData.children||this.nodeData.children.length<=0||this.isRoot||(this._expandBtn||(this._expandBtn=new _c,this._expandBtn.on("mouseover",e=>{e.stopPropagation(),this._expandBtn.css({cursor:"pointer"})}),this._expandBtn.on("mouseout",e=>{e.stopPropagation(),this._expandBtn.css({cursor:"auto"})}),this._expandBtn.on("click",e=>{e.stopPropagation(),this.mindMap.execCommand("SET_NODE_EXPAND",this,!this.getData("expand")),this.mindMap.emit("expand_btn_click",this)}),this._expandBtn.on("dblclick",e=>{e.stopPropagation()}),this._expandBtn.addClass("smm-expand-btn")),this.group.add(this._expandBtn),this._showExpandBtn=!0,this.updateExpandBtnNode(),this.updateExpandBtnPos())}function xu(){this._expandBtn&&this._showExpandBtn&&(this._expandBtn.remove(),this._showExpandBtn=!1)}function ku(){this.mindMap.opt.alwaysShowExpandBtn||setTimeout(()=>{this.renderExpandBtn()},0)}function Au(){if(this.mindMap.opt.alwaysShowExpandBtn||this._isMouseenter)return;let{isActive:e,expand:t}=this.getData();!e&&t&&setTimeout(()=>{this.removeExpandBtn()},0)}var Cu={createExpandNodeContent:gu,updateExpandBtnNode:bu,updateExpandBtnPos:yu,renderExpandBtn:wu,removeExpandBtn:xu,showExpandBtn:ku,hideExpandBtn:Au,sumNode:vu};function Eu(e={}){this.mindMap.execCommand("SET_NODE_DATA",this,e)}function Su(e,t,n){this.mindMap.execCommand("SET_NODE_TEXT",this,e,t,n)}function Tu(e){this.mindMap.execCommand("SET_NODE_IMAGE",this,e)}function Nu(e){this.mindMap.execCommand("SET_NODE_ICON",this,e)}function Mu(e,t){this.mindMap.execCommand("SET_NODE_HYPERLINK",this,e,t)}function Lu(e){this.mindMap.execCommand("SET_NODE_NOTE",this,e)}function Ou(e){this.mindMap.execCommand("SET_NODE_TAG",this,e)}function Du(e){this.mindMap.execCommand("SET_NODE_SHAPE",this,e)}function Pu(e,t){this.mindMap.execCommand("SET_NODE_STYLE",this,e,t)}function Iu(e){this.mindMap.execCommand("SET_NODE_STYLES",this,e)}var Ru={setData:Eu,setText:Su,setImage:Tu,setIcon:Nu,setHyperlink:Mu,setNote:Lu,setTag:Ou,setShape:Du,setStyle:Pu,setStyles:Iu};function Fu(){let e=this.getData("image");if(!e)return;let t=this.getImgShowSize(),n=(new tl).load(e).size(...t);return this.getData("imageTitle")&&n.attr("title",this.getData("imageTitle")),n.on("dblclick",e=>{this.mindMap.emit("node_img_dblclick",this,e)}),n.on("mouseenter",e=>{this.mindMap.emit("node_img_mouseenter",this,n,e)}),n.on("mouseleave",e=>{this.mindMap.emit("node_img_mouseleave",this,n,e)}),n.on("mousemove",e=>{this.mindMap.emit("node_img_mousemove",this,n,e)}),{node:n,width:t[0],height:t[1]}}function zu(){const{custom:e,width:t,height:n}=this.getData("imageSize");return e?[t,n]:Object(v["W"])(t,n,this.mindMap.themeConfig.imgMaxWidth,this.mindMap.themeConfig.imgMaxHeight)}function Bu(){let e=this.getData();if(!e.icon||e.icon.length<=0)return[];let t=this.mindMap.themeConfig.iconSize;return e.icon.map(e=>{let n=I.getNodeIconListIcon(e,this.mindMap.opt.iconList||[]),r=null;return r=/^{this.mindMap.emit("node_icon_click",this,e,t)}),{node:r,width:t,height:t}})}function _u(){const{textAutoWrapWidth:e}=this.mindMap.opt;let t=new _c,n=!1;if(this.getData("resetRichText")&&(delete this.nodeData.data.resetRichText,n=!0),[oo["a"].CHANGE_THEME].includes(this.mindMap.renderer.renderSource)&&(this.hasCustomStyle()||(n=!0)),n){let e=this.getData("text"),t=Object(v["g"])(e),n=this.style.createStyleText();t?(e=Object(v["U"])(e),e=Object(v["b"])(e,"span",n)):e=`

${e}

`,this.setData({text:e})}let r=`
${this.getData("text")}
`;oo["d"].measureRichtextNodeTextSizeEl||(oo["d"].measureRichtextNodeTextSizeEl=document.createElement("div"),oo["d"].measureRichtextNodeTextSizeEl.style.position="fixed",oo["d"].measureRichtextNodeTextSizeEl.style.left="-999999px",this.mindMap.el.appendChild(oo["d"].measureRichtextNodeTextSizeEl));let i=oo["d"].measureRichtextNodeTextSizeEl;i.innerHTML=r;let o=i.children[0];o.classList.add("smm-richtext-node-wrap"),o.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),o.style.maxWidth=e+"px";let{width:a,height:s}=o.getBoundingClientRect();if(s<=0){i.innerHTML="

abc123我和你

";let e=i.children[0];e.classList.add("smm-richtext-node-wrap"),s=e.getBoundingClientRect().height}a=Math.ceil(a)+1,s=Math.ceil(s),t.attr("data-width",a),t.attr("data-height",s);let l=new Nc;return l.width(a),l.height(s),l.add(i.children[0]),t.add(l),{node:t,width:a,height:s}}function ju(){if(this.getData("richText"))return this.createRichTextNode();let e=new _c,t=this.getStyle("fontSize",!1),n=this.getStyle("lineHeight",!1),r=this.style.getTextFontStyle(),i=[];Object(v["I"])(this.getData("text"))||(i=String(this.getData("text")).split(/\n/gim));let o=this.mindMap.opt.textAutoWrapWidth,a=!1;i.forEach((e,t)=>{let n=e.split(""),s=[],l=[];while(n.length){let e=n.shift(),t=[...l,e].join("");Object(v["L"])(t,r).width<=o?l.push(e):(s.push(l.join("")),l=[e])}l.length>0&&s.push(l.join("")),s.length>1&&(a=!0),i[t]=s.join("\n")}),i=i.join("\n").split(/\n/gim),i.forEach((r,i)=>{let o=(new Cc).text(r);this.style.text(o),o.y(t*n*i),e.add(o)});let{width:s,height:l}=e.bbox();return s=Math.ceil(s),l=Math.ceil(l),e.attr("data-width",s),e.attr("data-height",l),e.attr("data-ismultiLine",a||i.length>1),{node:e,width:s,height:l}}function Hu(){let{hyperlink:e,hyperlinkTitle:t}=this.getData();if(!e)return;let n=this.mindMap.themeConfig.iconSize,r=new Yc,i=(new jc).to(e).target("_blank");i.node.addEventListener("click",e=>{e.stopPropagation()}),t&&i.attr("title",t),i.rect(n,n).fill({color:"transparent"});let o=Yc(I.hyperlink).size(n,n);return this.style.iconNode(o),i.add(o),r.add(i),{node:r,width:n,height:n}}function Uu(){let e=this.getData("tag");if(!e||e.length<=0)return[];let t=[];return e.slice(0,this.mindMap.opt.maxTag).forEach((e,n)=>{let r=new _c,i=(new Cc).text(e).x(8).cy(8);this.style.tagText(i,n);let{width:o}=i.bbox(),a=(new Xl).size(o+16,20);const s=this.mindMap.opt.tagsColorMap||{},l=s[i.node.textContent];this.style.tagRect(a,i,l),r.add(a).add(i),t.push({node:r,width:o+16,height:20})}),t}function qu(){if(!this.getData("note"))return null;let e=this.mindMap.themeConfig.iconSize,t=(new Yc).attr("cursor","pointer");t.add((new Xl).size(e,e).fill({color:"transparent"}));let n=Yc(I.note).size(e,e);if(this.style.iconNode(n),t.add(n),!this.mindMap.opt.customNoteContentShow){if(!this.noteEl){this.noteEl=document.createElement("div"),this.noteEl.style.cssText=`\n position: fixed;\n padding: 10px;\n border-radius: 5px;\n box-shadow: 0 2px 5px rgb(0 0 0 / 10%);\n display: none;\n background-color: #fff;\n z-index: ${this.mindMap.opt.nodeNoteTooltipZIndex}\n `;const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.noteEl)}this.noteEl.innerText=this.getData("note")}return t.on("mouseover",()=>{const{left:e,top:t}=this.getNoteContentPosition();this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.show(this.getData("note"),e,t,this):(this.noteEl.style.left=e+"px",this.noteEl.style.top=t+"px",this.noteEl.style.display="block")}),t.on("mouseout",()=>{this.mindMap.opt.customNoteContentShow?this.mindMap.opt.customNoteContentShow.hide():this.noteEl.style.display="none"}),{node:t,width:e,height:e}}function Gu(){const e=this.mindMap.themeConfig.iconSize,{scaleY:t}=this.mindMap.view.getTransformData().transform,n=e*t;let{left:r,top:i}=this._noteData.node.node.getBoundingClientRect();return i+=n,{left:r,top:i}}function Wu(e){oo["d"].measureCustomNodeContentSizeEl||(oo["d"].measureCustomNodeContentSizeEl=document.createElement("div"),oo["d"].measureCustomNodeContentSizeEl.style.cssText="\n position: fixed;\n left: -99999px;\n top: -99999px;\n ",this.mindMap.el.appendChild(oo["d"].measureCustomNodeContentSizeEl)),oo["d"].measureCustomNodeContentSizeEl.innerHTML="",oo["d"].measureCustomNodeContentSizeEl.appendChild(e);let t=oo["d"].measureCustomNodeContentSizeEl.getBoundingClientRect();return{width:t.width,height:t.height}}function Vu(){return!!this._customNodeContent}var Yu={createImgNode:Fu,getImgShowSize:zu,createIconNode:Bu,createRichTextNode:_u,createTextNode:ju,createHyperlinkNode:Hu,createTagNode:Uu,createNoteNode:qu,getNoteContentPosition:Gu,measureCustomNodeContentSize:Wu,isUseCustomNodeContent:Vu};function Zu(){if(!(!this.nodeData.children||this.nodeData.children.length<=0||this.isRoot)&&!this.mindMap.opt.alwaysShowExpandBtn){let{width:e,height:t}=this;this._unVisibleRectRegionNode||(this._unVisibleRectRegionNode=new Xl,this._unVisibleRectRegionNode.fill({color:"transparent"})),this.group.add(this._unVisibleRectRegionNode),this.renderer.layout.renderExpandBtnRect(this._unVisibleRectRegionNode,this.expandBtnSize,e,t,this)}}function Ku(){this._unVisibleRectRegionNode&&(this._unVisibleRectRegionNode.remove(),this._unVisibleRectRegionNode=null)}function Xu(){this.needRerenderExpandBtnPlaceholderRect&&(this.needRerenderExpandBtnPlaceholderRect=!1,this.renderExpandBtnPlaceholderRect()),this.nodeData.children&&this.nodeData.children.length>0?this._unVisibleRectRegionNode||this.renderExpandBtnPlaceholderRect():this._unVisibleRectRegionNode&&this.clearExpandBtnPlaceholderRect()}var Ju={renderExpandBtnPlaceholderRect:Zu,clearExpandBtnPlaceholderRect:Ku,updateExpandBtnPlaceholderRect:Xu};function Qu(){this.mindMap.cooperate&&(this._userListGroup=new _c,this.group.add(this._userListGroup))}function $u(e){const{avatarSize:t,fontSize:n}=this.mindMap.opt.cooperateStyle,r=new _c,i=e.isMore?e.name:String(e.name)[0],o=(new Sc).size(t,t);o.fill({color:e.color||Object(v["s"])(i)});const a=(new Cc).text(i).fill({color:"#fff"}).css({"font-size":n}).dx(-n/2).dy((t-n)/2);return r.add(o).add(a),r}function eh(e){const{avatarSize:t}=this.mindMap.opt.cooperateStyle;return(new tl).load(e.avatar).size(t,t)}function th(){if(!this._userListGroup)return;const{avatarSize:e}=this.mindMap.opt.cooperateStyle;this._userListGroup.clear();const t=this.userList.length,n=Math.floor(this.width/e),r=[];t>n?r.push(...this.userList.slice(0,n-1),{isMore:!0,name:"+"+(t-n+1)}):r.push(...this.userList),r.forEach((t,n)=>{let r=null;r=t.avatar?this.createImageAvatar(t):this.createTextAvatar(t),r.x(n*e).cy(-e/2),this._userListGroup.add(r)})}function nh(e){this.userList.find(t=>t.id==e.id)||(this.userList.push(e),this.updateUserListNode())}function rh(e){const t=this.userList.findIndex(t=>t.id==e.id);-1!==t&&(this.userList.splice(t,1),this.updateUserListNode())}var ih={createUserListNode:Qu,updateUserListNode:th,createTextAvatar:$u,createImageAvatar:eh,addUser:nh,removeUser:rh};class oh{constructor(e={}){this.nodeData=this.handleData(e.data||{}),this.uid=e.uid,this.mindMap=e.mindMap,this.renderer=e.renderer,this.draw=this.mindMap.draw,this.nodeDraw=this.mindMap.nodeDraw,this.lineDraw=this.mindMap.lineDraw,this.style=new bo(this),this.shapeInstance=new Zc(this),this.shapePadding={paddingX:0,paddingY:0},this.isRoot=void 0!==e.isRoot&&e.isRoot,this.isGeneralization=void 0!==e.isGeneralization&&e.isGeneralization,this.generalizationBelongNode=null,this.layerIndex=void 0===e.layerIndex?0:e.layerIndex,this.width=e.width||0,this.height=e.height||0,this._left=e.left||0,this._top=e.top||0,this.customLeft=e.data.data.customLeft||void 0,this.customTop=e.data.data.customTop||void 0,this.isDrag=!1,this.parent=e.parent||null,this.children=e.children||[],this.userList=[],this.group=null,this.shapeNode=null,this.hoverNode=null,this._customNodeContent=null,this._imgData=null,this._iconData=null,this._textData=null,this._hyperlinkData=null,this._tagData=null,this._noteData=null,this.noteEl=null,this.noteContentIsShow=!1,this._expandBtn=null,this._lastExpandBtnType=null,this._showExpandBtn=!1,this._openExpandNode=null,this._closeExpandNode=null,this._fillExpandNode=null,this._userListGroup=null,this._lines=[],this._generalizationList=[],this._unVisibleRectRegionNode=null,this._isMouseenter=!1,this._rectInfo={imgContentWidth:0,imgContentHeight:0,textContentWidth:0,textContentHeight:0},this._generalizationNodeWidth=0,this._generalizationNodeHeight=0,this.textContentItemMargin=this.mindMap.opt.textContentMargin,this.blockContentMargin=this.mindMap.opt.imgTextMargin,this.expandBtnSize=this.mindMap.opt.expandBtnSize,this.isMultipleChoice=!1,this.needLayout=!1,this.isHide=!1,Object.keys(uu).forEach(e=>{this[e]=uu[e].bind(this)}),Object.keys(Cu).forEach(e=>{this[e]=Cu[e].bind(this)}),Object.keys(Ju).forEach(e=>{this[e]=Ju[e].bind(this)}),Object.keys(Ru).forEach(e=>{this[e]=Ru[e].bind(this)}),Object.keys(Yu).forEach(e=>{this[e]=Yu[e].bind(this)}),this.mindMap.cooperate&&Object.keys(ih).forEach(e=>{this[e]=ih[e].bind(this)}),this.getSize()}get left(){return this.customLeft||this._left}set left(e){this._left=e}get top(){return this.customTop||this._top}set top(e){this._top=e}reset(){this.children=[],this.parent=null,this.isRoot=!1,this.layerIndex=0,this.left=0,this.top=0}handleData(e){return e.data.expand=!1!==e.data.expand,e.data.isActive=!0===e.data.isActive,e.children=e.children||[],e}createNodeData(){let{isUseCustomNodeContent:e,customCreateNodeContent:t}=this.mindMap.opt;e&&t&&(this._customNodeContent=t(this)),this._customNodeContent?this._customNodeContent.setAttribute("xmlns","http://www.w3.org/1999/xhtml"):(this._imgData=this.createImgNode(),this._iconData=this.createIconNode(),this._textData=this.createTextNode(),this._hyperlinkData=this.createHyperlinkNode(),this._tagData=this.createTagNode(),this._noteData=this.createNoteNode())}getSize(){this.updateGeneralization(),this.createNodeData();let{width:e,height:t}=this.getNodeRect(),n=this.width!==e||this.height!==t;return this.width=e,this.height=t,n}getNodeRect(){if(this.isUseCustomNodeContent()){let e=this.measureCustomNodeContentSize(this._customNodeContent);return{width:e.width,height:e.height}}let e=0,t=0,n=0,r=0;this._imgData&&(this._rectInfo.imgContentWidth=e=this._imgData.width,this._rectInfo.imgContentHeight=t=this._imgData.height),this._iconData.length>0&&(n+=this._iconData.reduce((e,t)=>(r=Math.max(r,t.height),e+(t.width+this.textContentItemMargin)),0)),this._textData&&(n+=this._textData.width,r=Math.max(r,this._textData.height)),this._hyperlinkData&&(n+=this._hyperlinkData.width,r=Math.max(r,this._hyperlinkData.height)),this._tagData.length>0&&(n+=this._tagData.reduce((e,t)=>(r=Math.max(r,t.height),e+(t.width+this.textContentItemMargin)),0)),this._noteData&&(n+=this._noteData.width,r=Math.max(r,this._noteData.height)),this._rectInfo.textContentWidth=n,this._rectInfo.textContentHeight=r;let i=t>0&&r>0?this.blockContentMargin:0,{paddingX:o,paddingY:a}=this.getPaddingVale(),s=Math.max(e,n),l=t+r,{paddingX:c,paddingY:u}=this.shapeInstance.getShapePadding(s,l,o,a);this.shapePadding.paddingX=c,this.shapePadding.paddingY=u;const h=this.getBorderWidth();return{width:s+2*o+2*c+h,height:l+2*a+i+2*u+h}}layout(){this.group.clear();const{hoverRectPadding:e}=this.mindMap.opt;let{width:t,height:n,textContentItemMargin:r}=this,{paddingY:i}=this.getPaddingVale();const o=this.getBorderWidth()/2;i+=this.shapePadding.paddingY+o,this.shapeNode=this.shapeInstance.createShape(),this.shapeNode.addClass("smm-node-shape"),this.shapeNode.translate(o,o),this.style.shape(this.shapeNode),this.group.add(this.shapeNode),this.renderExpandBtnPlaceholderRect(),this.createUserListNode&&this.createUserListNode(),this.isGeneralization&&this.generalizationBelongNode&&this.group.addClass("generalization_"+this.generalizationBelongNode.uid);const a=()=>{this.hoverNode=(new Xl).size(t+2*e,n+2*e).x(-e).y(-e),this.hoverNode.addClass("smm-hover-node"),this.style.hoverNode(this.hoverNode,t,n),this.group.add(this.hoverNode)};if(this.isUseCustomNodeContent()){let e=new Nc;return e.width(t),e.height(n),e.add(this._customNodeContent),this.group.add(e),void a()}let s=0;this._imgData&&(s=this._imgData.height,this.group.add(this._imgData.node),this._imgData.node.cx(t/2).y(i));let l=new _c,c=0,u=new _c;if(this._iconData&&this._iconData.length>0){let e=0;this._iconData.forEach(t=>{t.node.x(c+e).y((this._rectInfo.textContentHeight-t.height)/2),u.add(t.node),e+=t.width+r}),l.add(u),c+=e}this._textData&&(this._textData.node.attr("data-offsetx",c),this._textData.node.x(c).y(0),l.add(this._textData.node),c+=this._textData.width+r),this._hyperlinkData&&(this._hyperlinkData.node.x(c).y((this._rectInfo.textContentHeight-this._hyperlinkData.height)/2),l.add(this._hyperlinkData.node),c+=this._hyperlinkData.width+r);let h=new _c;if(this._tagData&&this._tagData.length>0){let e=0;this._tagData.forEach(t=>{t.node.x(c+e).y((this._rectInfo.textContentHeight-t.height)/2),h.add(t.node),e+=t.width+r}),l.add(h),c+=e}this._noteData&&(this._noteData.node.x(c).y((this._rectInfo.textContentHeight-this._noteData.height)/2),l.add(this._noteData.node),c+=this._noteData.width),l.translate(t/2-l.bbox().width/2,s+i+(s>0&&this._rectInfo.textContentHeight>0?this.blockContentMargin:0)),this.group.add(l),a()}bindGroupEvent(){this.group.on("click",e=>{if(this.mindMap.emit("node_click",this,e),this.isMultipleChoice)return e.stopPropagation(),void(this.isMultipleChoice=!1);this.active(e)}),this.group.on("mousedown",e=>{const{readonly:t,enableCtrlKeyNodeSelection:n,useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if(t||(this.isRoot?3!==e.which||r||e.stopPropagation():2!==e.which&&e.stopPropagation()),e.ctrlKey&&n){this.isMultipleChoice=!0;let e=this.getData("isActive");e||this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.mindMap.renderer[e?"removeNodeFromActiveList":"addNodeToActiveList"](this),this.renderer.emitNodeActiveEvent(e?null:this)}this.mindMap.emit("node_mousedown",this,e)}),this.group.on("mouseup",e=>{this.isRoot||2===e.which||this.mindMap.opt.readonly||e.stopPropagation(),this.mindMap.emit("node_mouseup",this,e)}),this.group.on("mouseenter",e=>{this.isDrag||(this._isMouseenter=!0,this.showExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseenter(),this.mindMap.emit("node_mouseenter",this,e))}),this.group.on("mouseleave",e=>{this._isMouseenter&&(this._isMouseenter=!1,this.hideExpandBtn(),this.isGeneralization&&this.handleGeneralizationMouseleave(),this.mindMap.emit("node_mouseleave",this,e))}),this.group.on("dblclick",e=>{this.mindMap.opt.readonly||e.ctrlKey||(e.stopPropagation(),this.mindMap.emit("node_dblclick",this,e))}),this.group.on("contextmenu",e=>{const{readonly:t,useLeftKeySelectionRightKeyDrag:n}=this.mindMap.opt;t||e.ctrlKey||(e.stopPropagation(),e.preventDefault(),this.mindMap.select&&!n&&this.mindMap.select.hasSelectRange()||(this.getData("isActive")&&1===this.renderer.activeNodeList.length||(this.renderer.clearActiveNodeList(),this.active(e)),this.mindMap.emit("node_contextmenu",e,this)))})}active(e){this.mindMap.opt.readonly||(e&&e.stopPropagation(),this.getData("isActive")||(this.mindMap.emit("before_node_active",this,this.renderer.activeNodeList),this.renderer.clearActiveNodeList(),this.renderer.addNodeToActiveList(this),this.renderer.emitNodeActiveEvent(this)))}update(){if(!this.group)return;this.updateNodeActiveClass();let{alwaysShowExpandBtn:e}=this.mindMap.opt;if(e)this._expandBtn&&this.nodeData.children.length<=0?this.removeExpandBtn():this.renderExpandBtn();else{let{isActive:e,expand:t}=this.getData();!t||e||this._isMouseenter?this.showExpandBtn():this.hideExpandBtn()}this.renderGeneralization(),this.updateUserListNode&&this.updateUserListNode();let t=this.group.transform();this.left===t.translateX&&this.top===t.translateY||this.group.translate(this.left-t.translateX,this.top-t.translateY)}getNodePosInClient(e,t){let n=this.mindMap.draw.transform(),{scaleX:r,scaleY:i,translateX:o,translateY:a}=n,s=e*r+o,l=t*i+a;return{left:s,top:l}}reRender(){let e=this.getSize();return this.layout(),this.update(),e}updateNodeActiveClass(){if(!this.group)return;const e=this.getData("isActive");this.group[e?"addClass":"removeClass"]("active")}updateNodeByActive(e){this.group&&(e?this.showExpandBtn():this.hideExpandBtn(),this.updateNodeActiveClass())}render(e=(()=>{})){if(this.renderLine(),this.group?(this.nodeDraw.add(this.group),this.needLayout&&(this.needLayout=!1,this.layout()),this.updateExpandBtnPlaceholderRect(),this.update()):(this.group=new _c,this.group.addClass("smm-node"),this.group.css({cursor:"default"}),this.bindGroupEvent(),this.nodeDraw.add(this.group),this.layout(),this.update()),this.children&&this.children.length&&!1!==this.getData("expand")){let t=0;this.children.forEach(n=>{n.render(()=>{t++,t>=this.children.length&&e()})})}else e();this.nodeData.inserting&&(delete this.nodeData.inserting,this.active(),setTimeout(()=>{this.mindMap.emit("node_dblclick",this,null,!0)},0))}remove(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.children&&this.children.length&&this.children.forEach(e=>{e.remove()}))}destroy(){this.group&&(this.group.remove(),this.removeGeneralization(),this.removeLine(),this.group=null,this.parent&&this.parent.removeLine())}hide(){if(this.group.hide(),this.hideGeneralization(),this.parent){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].hide(),this._lines.forEach(e=>{e.hide()})}this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}show(){if(this.group){if(this.group.show(),this.showGeneralization(),this.parent){let e=this.parent.children.indexOf(this);this.parent._lines[e]&&this.parent._lines[e].show(),this._lines.forEach(e=>{e.show()})}this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}}setOpacity(e){this.group.opacity(e),this._lines.forEach(t=>{t.opacity(e)}),this.children.forEach(t=>{t.setOpacity(e)}),this.setGeneralizationOpacity(e)}hideChildren(){this._lines.forEach(e=>{e.hide()}),this.children&&this.children.length&&this.children.forEach(e=>{e.hide()})}showChildren(){this._lines.forEach(e=>{e.show()}),this.children&&this.children.length&&this.children.forEach(e=>{e.show()})}startDrag(){this.isDrag=!0,this.group.addClass("smm-node-dragging")}endDrag(){this.isDrag=!1,this.group.removeClass("smm-node-dragging")}renderLine(e=!1){if(!1===this.getData("expand"))return;let t=this.nodeData.children.length;this.mindMap.opt.layout!==oo["a"].LAYOUT.FISHBONE||!this.isRoot&&1!==this.layerIndex||(t=0),t>this._lines.length?new Array(t-this._lines.length).fill(0).forEach(()=>{this._lines.push(this.lineDraw.path())}):t{e.remove()}),this._lines=this._lines.slice(0,t)),this.renderer.layout.renderLine(this,this._lines,(e,t)=>{this.styleLine(e,t)},this.style.getStyle("lineStyle",!0)),e&&this.children&&this.children.length>0&&this.children.forEach(t=>{t.renderLine(e)})}getShape(){return this.mindMap.themeConfig.nodeUseLineStyle?oo["a"].SHAPE.RECTANGLE:this.style.getStyle("shape",!1,!1)}hasCustomPosition(){return void 0!==this.customLeft&&void 0!==this.customTop}ancestorHasCustomPosition(){let e=this;while(e){if(e.hasCustomPosition())return!0;e=e.parent}return!1}ancestorHasGeneralization(){let e=this.parent;while(e){if(e.checkHasGeneralization())return!0;e=e.parent}return!1}addChildren(e){this.children.push(e)}styleLine(e,t){let n=t.getSelfInhertStyle("lineWidth")||t.getStyle("lineWidth",!0),r=t.getSelfInhertStyle("lineColor")||t.getStyle("lineColor",!0),i=t.getSelfInhertStyle("lineDasharray")||t.getStyle("lineDasharray",!0);this.style.line(e,{width:n,color:r,dasharray:i})}removeLine(){this._lines.forEach(e=>{e.remove()}),this._lines=[]}isAncestor(e){if(this.uid===e.uid)return!1;let t=e.parent;while(t){if(this.uid===t.uid)return!0;t=t.parent}return!1}isParent(e){if(this.uid===e.uid)return!1;const t=e.parent;return!(!t||this.uid!==t.uid)}isBrother(e){return!(!this.parent||this.uid===e.uid)&&this.parent.children.find(t=>t.uid===e.uid)}getIndexInBrothers(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.uid===this.uid):-1}getPaddingVale(){let{isActive:e}=this.getData();return{paddingX:this.getStyle("paddingX",!0,e),paddingY:this.getStyle("paddingY",!0,e)}}getStyle(e,t){let n=this.style.merge(e,t);return void 0===n?"":n}getSelfStyle(e){return this.style.getSelfStyle(e)}getParentSelfStyle(e){return this.parent?this.parent.getSelfStyle(e)||this.parent.getParentSelfStyle(e):null}getSelfInhertStyle(e){return this.getSelfStyle(e)||this.getParentSelfStyle(e)}getBorderWidth(){return this.style.merge("borderWidth",!1)||0}getData(e){return e?this.nodeData.data[e]:this.nodeData.data}getPureData(e=!0,t=!1){return Object(v["k"])({},this,e,t)}hasCustomStyle(){return this.style.hasCustomStyle()}getRect(){return this.group.rbox()}getRectInSvg(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),{left:i,top:o,width:a,height:s}=this,l=(i+a)*e+n,c=(o+s)*t+r;return i=i*e+n,o=o*t+r,{left:i,right:l,top:o,bottom:c,width:a*e,height:s*t}}}var ah=oh;class sh{constructor(e){this.max=e||1e3,this.size=0,this.pool=new Map}add(e,t){if(this.delete(e),this.pool.set(e,t),this.size++,this.size>this.max){let e=this.pool.keys(),t=e.next();this.delete(t.value)}}delete(e){this.pool.has(e)&&(this.pool.delete(e),this.size--)}has(e){return this.pool.has(e)}get(e){if(this.pool.has(e))return this.pool.get(e)}}class lh{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.draw=this.mindMap.draw,this.lineDraw=this.mindMap.lineDraw,this.root=null,this.lru=new sh(this.mindMap.opt.maxNodeCacheCount)}doLayout(){throw new Error("【computed】方法为必要方法,需要子类进行重写!")}renderLine(){throw new Error("【renderLine】方法为必要方法,需要子类进行重写!")}renderExpandBtn(){throw new Error("【renderExpandBtn】方法为必要方法,需要子类进行重写!")}renderGeneralization(){}cacheNode(e,t){this.renderer.nodeCache[e]=t,this.lru.add(e,t)}checkIsNeedResizeSources(){return[oo["a"].CHANGE_THEME,oo["a"].TRANSFORM_TO_NORMAL_NODE].includes(this.renderer.renderSource)}checkIsLayerTypeChange(e,t){return!(e>=2&&t>=2)&&(e>=2&&t<2||(e<2&&t>=2||void 0))}checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(e){this.renderer.renderSource===oo["a"].CHANGE_LAYOUT&&(e.needRerenderExpandBtnPlaceholderRect=!0)}createNode(e,t,n,r){let i=null;if(e&&e._node&&!this.renderer.reRender){i=e._node;let t=this.checkIsLayerTypeChange(i.layerIndex,r);i.reset(),i.layerIndex=r,this.cacheNode(e._node.uid,i),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(i),(this.checkIsNeedResizeSources()||t)&&(i.getSize(),i.needLayout=!0)}else if(this.lru.has(e.data.uid)&&!this.renderer.reRender){i=this.lru.get(e.data.uid);let t=JSON.stringify(i.getData()),n=this.checkIsLayerTypeChange(i.layerIndex,r);i.reset(),i.nodeData=i.handleData(e||{}),i.layerIndex=r,this.cacheNode(e.data.uid,i),this.checkIsLayoutChangeRerenderExpandBtnPlaceholderRect(i),e._node=i;let o=this.checkIsNeedResizeSources(),a=t!==JSON.stringify(e.data);(o||a||n)&&(i.getSize(),i.needLayout=!0)}else{let t=e.data.uid||Object(v["m"])();i=new ah({data:e,uid:t,renderer:this.renderer,mindMap:this.mindMap,draw:this.draw,layerIndex:r}),e.data.uid=t,this.cacheNode(t,i),e._node=i,e.data.isActive&&this.renderer.addNodeToActiveList(i)}return-1!==this.mindMap.renderer.findActiveNodeIndex(i)&&i.setData({isActive:!0}),n?(i.isRoot=!0,this.root=i):(i.parent=t._node,t._node.addChildren(i)),i}formatPosition(e,t,n){return"number"===typeof e?e:void 0!==oo["f"][e]?t*oo["f"][e]:/^\d\d*%$/.test(e)?Number.parseFloat(e)/100*t:(t-n)/2}setNodeCenter(e){let{initRootNodePosition:t}=this.mindMap.opt,{CENTER:n}=oo["a"].INIT_ROOT_NODE_POSITION;(!t||!Array.isArray(t)||t.length<2)&&(t=[n,n]),e.left=this.formatPosition(t[0],this.mindMap.width,e.width),e.top=this.formatPosition(t[1],this.mindMap.height,e.height)}updateChildren(e,t,n){e.forEach(e=>{e[t]+=n,e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildren(e.children,t,n)})}updateChildrenPro(e,t){e.forEach(e=>{Object.keys(t).forEach(n=>{e[n]+=t[n]}),e.children&&e.children.length&&!e.hasCustomPosition()&&this.updateChildrenPro(e.children,t)})}getNodeAreaWidth(e,t=!1){let n=[],r=0,i=(e,o)=>{t&&e.checkHasGeneralization()&&(r+=e._generalizationNodeWidth),e.children.length?(o+=e.width/2,e.children.forEach(e=>{i(e,o)})):(o+=e.width,n.push(o))};return i(e,0),Math.max(...n)+r}quadraticCurvePath(e,t,n,r){let i=e+.2*(n-e),o=t+.8*(r-t);return`M ${e},${t} Q ${i},${o} ${n},${r}`}cubicBezierPath(e,t,n,r){let i=e+(n-e)/2,o=t,a=i,s=r;return`M ${e},${t} C ${i},${o} ${a},${s} ${n},${r}`}getMarginX(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,o=2*n.hoverRectPadding;return 1===e?r.marginX+o:i.marginX+o}getMarginY(e){const{themeConfig:t,opt:n}=this.mindMap,{second:r,node:i}=t,o=2*n.hoverRectPadding;return 1===e?r.marginY+o:i.marginY+o}getNodeWidthWithGeneralization(e){return Math.max(e.width,e.checkHasGeneralization()?e._generalizationNodeWidth:0)}getNodeHeightWithGeneralization(e){return Math.max(e.height,e.checkHasGeneralization()?e._generalizationNodeHeight:0)}getNodeBoundaries(e,t){let{generalizationLineMargin:n,generalizationNodeMargin:r}=this.mindMap.themeConfig,i=e=>{let n=1/0,o=-1/0,a=1/0,s=-1/0;e.children&&e.children.length>0&&e.children.forEach(e=>{let{left:l,right:c,top:u,bottom:h}=i(e),d=e.checkHasGeneralization()&&e.getData("expand")?e._generalizationNodeWidth+r:0,f=e.checkHasGeneralization()&&e.getData("expand")?e._generalizationNodeHeight+r:0;l-("h"===t?d:0)o&&(o=c+("h"===t?d:0)),us&&(s=h+("v"===t?f:0))});let l={left:e.left,right:e.left+e.width,top:e.top,bottom:e.top+e.height};return{left:l.lefto?l.right:o,top:l.tops?l.bottom:s}},{left:o,right:a,top:s,bottom:l}=i(e);return{left:o,right:a,top:s,bottom:l,generalizationLineMargin:n,generalizationNodeMargin:r}}getChildrenBoundaries(e,t,n=0,r){let{generalizationLineMargin:i,generalizationNodeMargin:o}=this.mindMap.themeConfig;const a=e.children.slice(n,r+1);let s=1/0,l=-1/0,c=1/0,u=-1/0;return a.forEach(e=>{const n=this.getNodeBoundaries(e,t);s=n.leftl?n.right:l,c=n.topu?n.bottom:u}),{left:s,right:l,top:c,bottom:u,generalizationLineMargin:i,generalizationNodeMargin:o}}getNodeGeneralizationRenderBoundaries(e,t){let n=null;return n=e.range?this.getChildrenBoundaries(e.node,t,e.range[0],e.range[1]):this.getNodeBoundaries(e.node,t),n}getNodeActChildrenLength(e){return e.nodeData.children&&e.nodeData.children.length}}var ch=lh;class uh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):i.left=t._node.left+t._node.width+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0;let o=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.childrenAreaHeight2=Math.max(e._node.childrenAreaHeight,o)},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2-e.childrenAreaHeight/2,i=n+t;e.children.forEach(e=>{e.top=i,i+=e.height+t})}},null,!0)}adjustTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=e.childrenAreaHeight2-2*this.getMarginY(r+1)-e.height;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((n,i)=>{if(n.uid===e.uid||n.hasCustomPosition())return;let o=0;ir&&(o=t),n.top+=o,n.children&&n.children.length&&this.updateChildren(n.children,"top",o)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.getMarginX(e.layerIndex+1),c=.6*(l-s),u=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((l,h)=>{let d=0===e.layerIndex?r+o:r+o+s,f=i+a/2,p=l.left,m=l.top+l.height/2,g=u?l.width:0;f=u&&!e.isRoot?f+a/2:f,m=u?m+l.height/2:m;let v=`M ${d},${f} L ${d+c},${f} L ${d+c},${m} L ${p+g},${m}`;t[h].plot(v),n&&n(t[h],l)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:r+o+s,d=i+a/2,f=c.left,p=c.top+c.height/2;d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let m=l?` L ${c.left+c.width},${p}`:"",g=`M ${h},${d} L ${f},${p}`+m;t[u].plot(g),n&&n(t[u],c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:r+o+s,d=i+a/2,f=c.left,p=c.top+c.height/2,m="";d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let g=l?` L ${c.left+c.width},${p}`:"";m=e.isRoot&&!this.mindMap.themeConfig.rootLineKeepSameInCurve?this.quadraticCurvePath(h,d,f,p)+g:this.cubicBezierPath(h,d,f,p)+g,t[u].plot(m),n&&n(t[u],c)})}renderExpandBtn(e,t){let{width:n,height:r}=e,{translateX:i,translateY:o}=t.transform(),a=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,s=n,l=r/2+a;s===i&&l===o||t.translate(s-i,l-o)}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(t,r).x(n).y(0)}}var hh=uh;class dh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.RIGHT:oo["a"].LAYOUT_GROW_DIR.LEFT,o.left=o.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(!e.data.expand)return e._node.leftChildrenAreaHeight=0,void(e._node.rightChildrenAreaHeight=0);let i=0,o=0,a=0,s=0;e._node.children.forEach(e=>{e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(i++,a+=e.height):(o++,s+=e.height)}),e._node.leftChildrenAreaHeight=a+(i+1)*this.getMarginY(r+1),e._node.rightChildrenAreaHeight=s+(o+1)*this.getMarginY(r+1);let l=e._node.checkHasGeneralization()?e._node._generalizationNodeHeight+this.getMarginY(r+1):0;e._node.leftChildrenAreaHeight2=Math.max(e._node.leftChildrenAreaHeight,l),e._node.rightChildrenAreaHeight2=Math.max(e._node.rightChildrenAreaHeight,l)},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.top+e.height/2+t,i=n-e.leftChildrenAreaHeight/2,o=n-e.rightChildrenAreaHeight/2;e.children.forEach(e=>{e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(e.top=i,i+=e.height+t):(e.top=o,o+=e.height+t)})}},null,!0)}adjustTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=2*this.getMarginY(r+1)+e.height,o=e.leftChildrenAreaHeight2-i,a=e.rightChildrenAreaHeight2-i;(o>0||a>0)&&this.updateBrothers(e,o/2,a/2)},null,!0)}updateBrothers(e,t,n){if(e.parent){let r=e.parent.children.filter(t=>t.dir===e.dir),i=Object(v["w"])(e,r);r.forEach((e,r)=>{if(e.hasCustomPosition())return;let o=0,a=e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?t:n;ri&&(o=a),e.top+=o,e.children&&e.children.length&&this.updateChildren(e.children,"top",o)}),this.updateBrothers(e.parent,t,n)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.getMarginX(e.layerIndex+1),c=.6*(l-s),u=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((l,h)=>{let d=0,f=0,p=u?l.width:0;l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?(f=-c,d=0===e.layerIndex?r:r-s,p=-p):(f=c,d=0===e.layerIndex?r+o:r+o+s);let m=i+a/2,g=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,v=l.top+l.height/2;m=u&&!e.isRoot?m+a/2:m,v=u?v+l.height/2:v;let b=`M ${d},${m} L ${d+f},${m} L ${d+f},${v} L ${g+p},${v}`;t[h].plot(b),n&&n(t[h],l)})}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,d=i+a/2,f=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,p=c.top+c.height/2;d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let m="";l&&(m=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?` L ${c.left},${p}`:` L ${c.left+c.width},${p}`);let g=`M ${h},${d} L ${f},${p}`+m;t[u].plot(g),n&&n(t[u],c)})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=this.mindMap.themeConfig.nodeUseLineStyle;e.children.forEach((c,u)=>{let h=0===e.layerIndex?r+o/2:c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,d=i+a/2,f=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?c.left+c.width:c.left,p=c.top+c.height/2,m="";d=l&&!e.isRoot?d+a/2:d,p=l?p+c.height/2:p;let g="";this.mindMap.themeConfig.nodeUseLineStyle&&(g=c.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?` L ${c.left},${p}`:` L ${c.left+c.width},${p}`),m=e.isRoot&&!this.mindMap.themeConfig.rootLineKeepSameInCurve?this.quadraticCurvePath(h,d,f,p)+g:this.cubicBezierPath(h,d,f,p)+g,t[u].plot(m),n&&n(t[u],c)})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:o,translateY:a}=t.transform(),s=this.mindMap.themeConfig.nodeUseLineStyle?r/2:0,l=e.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?0-i:n,c=r/2+s;if(l===o&&c===a)return;let u=l-o,h=c-a;t.translate(u,h)}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===oo["a"].LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:o,generalizationLineMargin:a,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,"h"),l=t?i-a:o+a,c=l,u=n,h=l,d=r,f=c+(t?-20:20),p=u+(d-u)/2,m=`M ${c},${u} Q ${f},${p} ${h},${d}`;e.generalizationLine.plot(m),e.generalizationNode.left=l+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}var fh=dh;class ph extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):t._node.isRoot&&(i.top=t._node.top+t._node.height+this.getMarginX(r)),!e.data.expand)return!0},(e,t,n,r)=>{if(n){let t=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaWidth=t?e._node.children.reduce((e,t)=>e+t.width,0)+(t+1)*this.getMarginX(r+1):0}},!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width/2-e.childrenAreaWidth/2,r=n+t;e.children.forEach(e=>{e.left=r,r+=e.width+t})}else{let t=e.top+this.getNodeHeightWithGeneralization(e)+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+.5*e.width,n.top=t,t+=this.getNodeHeightWithGeneralization(n)+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(t&&t.isRoot){let t=this.getNodeAreaWidth(e,!0),n=t-e.width;n>0&&this.updateBrothersLeft(e,n)}let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+this.getNodeHeightWithGeneralization(t)+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n)=>{if(n){let{right:t,left:n}=this.getNodeBoundaries(e,"h"),r=t-n,i=e.left-n-(r-e.width)/2;this.updateChildren(e.children,"left",i)}},!0)}updateBrothersLeft(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{e.hasCustomPosition()||n<=r||(e.left+=t,e.children&&e.children.length&&this.updateChildren(e.children,"left",t))}),this.updateBrothersLeft(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=e.children.length,c=this.getMarginX(e.layerIndex+1);if(e.isRoot){let s=r+o/2,u=i+a,h=.7*c,d=1/0,f=-1/0;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=e.top;if&&(f=i);let a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",s=`M ${i},${u+h} L ${i},${u+h>o?o+e.height:o}`+a;t[r].plot(s),n&&n(t[r],e)}),d=Math.min(d,s),f=Math.max(f,s);let p=this.lineDraw.path();if(e.style.line(p),p.plot(`M ${s},${u} L ${s},${u+h}`),e._lines.push(p),n&&n(p,e),l>0){let t=this.lineDraw.path();e.style.line(t),t.plot(`M ${d},${u+h} L ${f},${u+h}`),e._lines.push(t),n&&n(t,e)}}else{let r=i+a,o=-1/0,c=e.left+.3*e.width;if(e.children.forEach((a,s)=>{let l=a.top+a.height/2;l>o&&(o=l);let u="",h=a.left,d=a.left+a.widthc&&(f=!0,l=a.top,o=l),l>i&&l0){let t=this.lineDraw.path();s=l>0?s:0,e.style.line(t),o{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}var mh=ph;class gh extends ch{constructor(e={}){super(e)}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftValue()},()=>{this.adjustLeftValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r)=>{let i=this.createNode(e,t,n,r);if(n?this.setNodeCenter(i):i.top=t._node.top+t._node.height+this.getMarginX(r),!e.data.expand)return!0},(e,t,n,r)=>{let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaWidth=i?e._node.children.reduce((e,t)=>e+t.width,0)+(i+1)*this.getMarginY(r+1):0;let o=e._node.checkHasGeneralization()?e._node._generalizationNodeWidth+this.getMarginY(r+1):0;e._node.childrenAreaWidth2=Math.max(e._node.childrenAreaWidth,o)},!0,0)}computedLeftValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1),n=e.left+e.width/2-e.childrenAreaWidth/2,i=n+t;e.children.forEach(e=>{e.left=i,i+=e.width+t})}},null,!0)}adjustLeftValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i=e.childrenAreaWidth2-2*this.getMarginY(r+1)-e.width;i>0&&this.updateBrothers(e,i/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;nr&&(i=t),e.left+=i,e.children&&e.children.length&&this.updateChildren(e.children,"left",i)}),this.updateBrothers(e.parent,t)}}renderLine(e,t,n,r){"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a}=e,s=r+o/2,l=i+a;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=e.top,a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",c=`M ${s},${l} L ${i},${o}`+a;t[r].plot(c),n&&n(t[r],e)})}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s,isRoot:l}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let c=r+o/2,u=i+a,h=this.getMarginX(e.layerIndex+1),d=.7*h,f=1/0,p=-1/0,m=e.children.length;e.children.forEach((e,r)=>{let i=e.left+e.width/2,o=u+d>e.top?e.top+e.height:e.top;ip&&(p=i);let a=this.mindMap.themeConfig.nodeUseLineStyle?` L ${e.left},${o} L ${e.left+e.width},${o}`:"",s=`M ${i},${u+d} L ${i},${o}`+a;t[r].plot(s),n&&n(t[r],e)}),f=Math.min(c,f),p=Math.max(c,p);let g=this.lineDraw.path();if(e.style.line(g),s=m>0&&!l?s:0,g.plot(`M ${c},${u+s} L ${c},${u+d}`),e._lines.push(g),n&&n(g,e),m>0){let t=this.lineDraw.path();e.style.line(t),t.plot(`M ${f},${u+d} L ${p},${u+d}`),e._lines.push(t),n&&n(t,e)}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i}=e,{translateX:o,translateY:a}=t.transform();t.translate(n/2-i/2-o,r+i/2-a)}renderGeneralization(e){e.forEach(e=>{let{bottom:t,left:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"v"),a=n,s=t+i,l=r,c=t+i,u=a+(l-a)/2,h=s+20,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.top=t+o,e.generalizationNode.left=n+(r-n-e.generalizationNode.width)/2})}renderExpandBtnRect(e,t,n,r,i){e.size(n,t).x(0).y(r)}}var vh=gh;class bh extends ch{constructor(e={},t){super(e),this.layout=t}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(this.layout===oo["a"].LAYOUT.TIMELINE2?t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.BOTTOM:oo["a"].LAYOUT_GROW_DIR.TOP:o.dir="",t._node.isRoot&&(o.top=t._node.top+(e._node.height>t._node.height?-(e._node.height-t._node.height)/2:(t._node.height-e._node.height)/2))),!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r,i)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginX(r+1),i=this.getMarginY(r+1);if(n){let n=e.left+e.width,r=n+t;e.children.forEach(e=>{e.left=r,r+=e.width+t})}else{let t=e.top+e.height+i+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0);e.children.forEach(n=>{n.left=e.left+.5*e.width,n.top=t,t+=n.height+i+(this.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;e.isRoot&&this.updateBrothersLeft(e);let i=e.children.length;if(t&&!t.isRoot&&i>0){let t=this.getMarginY(r+1),n=e.children.reduce((e,t)=>e+t.height+(this.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),0)+i*t;this.updateBrothersTop(e,n)}},(e,t,n,r)=>{t&&t.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP&&e.children.forEach(t=>{let n=this.getNodeAreaHeight(t),r=t.top;t.top=e.top-(t.top-e.top)-n+e.height,this.updateChildren(t.children,"top",t.top-r)})},!0)}getNodeAreaHeight(e){let t=0,n=e=>{t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+this.getMarginY(e.layerIndex),e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h"),i=r-t,o=i-e.width;o>0&&(n+=o)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0);let l=e.children.length;if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.left+r.width,s=i.left,l=e.top+e.height/2,c=`M ${a},${l} L ${s},${l}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let r=-1/0,o=1/0,c=e.left+.3*e.width;if(e.children.forEach((e,i)=>{let a=e.top+e.height/2;a>r&&(r=a),a0){let t=this.lineDraw.path();s=l>0?s:0,e.parent&&e.parent.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP?t.plot(`M ${c},${i} L ${c},${o}`):t.plot(`M ${c},${i+a+s} L ${c},${r}`),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform();e.parent&&e.parent.isRoot&&e.dir===oo["a"].LAYOUT_GROW_DIR.TOP?t.translate(.3*n-i/2-o,-i/2-a):t.translate(.3*n-i/2-o,r+i/2-a)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){if(this.layout===oo["a"].LAYOUT.TIMELINE)e.size(n,t).x(0).y(r);else{let o="";o=i.dir===oo["a"].LAYOUT_GROW_DIR.TOP&&1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM,o===oo["a"].LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}}var yh=bh;class wh extends ch{constructor(e={},t){super(e),this.layout=t}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n?this.setNodeCenter(o):(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.RIGHT:oo["a"].LAYOUT_GROW_DIR.LEFT,t._node.isRoot?o.left=t._node.left+(e._node.width>t._node.width?-(e._node.width-t._node.width)/2:(t._node.width-e._node.width)/2):o.left=o.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t._node.left+t._node.width+this.getMarginX(r):t._node.left-this.getMarginX(r)-o.width),!e.data.expand)return!0},(e,t,n,r)=>{if(n)return;let i=!1===e.data.expand?0:e._node.children.length;e._node.childrenAreaHeight=i?e._node.children.reduce((e,t)=>e+t.height,0)+(i+1)*this.getMarginY(r+1):0},!0,0)}computedTopValue(){Object(v["db"])(this.root,null,(e,t,n,r,i)=>{if(e.getData("expand")&&e.children&&e.children.length){let t=this.getMarginY(r+1);if(n){let n=e.top+e.height,r=n+t;e.children.forEach(e=>{e.top=r,r+=e.height+t})}else{let t=this.getMarginY(r+1),n=e.top+e.height/2+t,i=n-e.childrenAreaHeight/2;e.children.forEach(e=>{e.top=i,i+=e.height+t})}}},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;if(n)return;let i=2*this.getMarginY(r+1)+e.height,o=e.childrenAreaHeight-i;o>0&&this.updateBrothers(e,o/2)},null,!0)}updateBrothers(e,t){if(e.parent){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((n,i)=>{if(n.hasCustomPosition())return;if(!e.parent.isRoot&&n.uid===e.uid)return;let o=0;e.parent.isRoot?o=ir?2*t:t:ir&&(o=t),n.top+=o,n.children&&n.children.length&&this.updateChildren(n.children,"top",o)}),this.updateBrothers(e.parent,t)}}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.updateBrothersTop(e.parent,t)}}renderLine(e,t,n,r){"curve"===r?this.renderLineCurve(e,t,n):"direct"===r?this.renderLineDirect(e,t,n):this.renderLineStraight(e,t,n)}renderLineStraight(e,t,n){if(e.children.length<=0)return[];let{expandBtnSize:r}=e;if(this.mindMap.opt.alwaysShowExpandBtn||(r=0),e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else if(e.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT){let i=e.left+e.width,o=e.top+e.height/2,a=this.getMarginX(e.layerIndex+1),s=.6*(a-r);e.children.forEach((e,r)=>{let a=e.left,l=e.top+e.height/2,c=`\n M ${i},${o} \n L ${i+s},${o} \n L ${i+s},${l} \n L ${a},${l}`;t[r].plot(c),n&&n(t[r],e)})}else{let i=e.left,o=e.top+e.height/2,a=this.getMarginX(e.layerIndex+1),s=.6*(a-r);e.children.forEach((e,r)=>{let a=e.left+e.width,l=e.top+e.height/2,c=`\n M ${i},${o} \n L ${i-s},${o} \n L ${i-s},${l} \n L ${a},${l}`;t[r].plot(c),n&&n(t[r],e)})}}renderLineDirect(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0),e.children.forEach((l,c)=>{if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let e=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,u=i+a/2,h=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,d=l.top+l.height/2,f=`M ${e},${u} L ${h},${d}`;t[c].plot(f),n&&n(t[c],l)}})}renderLineCurve(e,t,n){if(e.children.length<=0)return[];let{left:r,top:i,width:o,height:a,expandBtnSize:s}=e;this.mindMap.opt.alwaysShowExpandBtn||(s=0),e.children.forEach((l,c)=>{if(e.isRoot){let r=e;e.children.forEach((i,o)=>{let a=r.top+r.height,s=i.top,l=e.left+e.width/2,c=`M ${l},${a} L ${l},${s}`;t[o].plot(c),n&&n(t[o],i),r=i})}else{let e=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?r-s:r+o+s,u=i+a/2,h=l.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?l.left+l.width:l.left,d=l.top+l.height/2,f=this.cubicBezierPath(e,u,h,d);t[c].plot(f),n&&n(t[c],l)}})}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform();e.dir===oo["a"].LAYOUT_GROW_DIR.RIGHT?t.translate(n-o,r/2-a):t.translate(-i-o,r/2-a)}}renderGeneralization(e){e.forEach(e=>{let t=e.node.dir===oo["a"].LAYOUT_GROW_DIR.LEFT,{top:n,bottom:r,left:i,right:o,generalizationLineMargin:a,generalizationNodeMargin:s}=this.getNodeGeneralizationRenderBoundaries(e,"h"),l=t?i-a:o+a,c=l,u=n,h=l,d=r,f=c+(t?-20:20),p=u+(d-u)/2,m=`M ${c},${u} Q ${f},${p} ${h},${d}`;e.generalizationLine.plot(m),e.generalizationNode.left=l+(t?-s:s)-(t?e.generalizationNode.width:0),e.generalizationNode.top=n+(r-n-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){i.dir===oo["a"].LAYOUT_GROW_DIR.LEFT?e.size(t,r).x(-t).y(0):e.size(t,r).x(n).y(0)}}var xh=wh,kh={top:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:o,height:a}){e.parent&&e.parent.isRoot?t.translate(.3*o-n/2-r,-n/2-i):t.translate(.3*o-n/2-r,a+n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:o,expandBtnSize:a,maxy:s,ctx:l}){e.parent&&e.parent.isRoot?t.plot(`M ${r},${n} L ${r+i},${n-Math.tan(Object(v["o"])(l.mindMap.opt.fishboneDeg))*i}`):t.plot(`M ${r},${n+o+a} L ${r},${s}`)},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){if(e>=1&&t.children){let r=n.getMarginY(e+1),i=t.left+t.width*n.childIndent,o=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(e=>{e.left=i,e.top+=o,o+=e.height+(n.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,parent:t,ctx:n,layerIndex:r}){let i=e.children.length,o=n.getMarginY(r+1);if(t&&!t.isRoot&&i>0){let t=e.children.reduce((e,t)=>e+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+o,0);n.updateBrothersTop(e,t)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=t.expandBtnSize+e;t.children.forEach(e=>{let i=n.getNodeAreaHeight(e),o=e.top,a=e.left;e.top=t.top-(e.top-t.top)-i+t.height,e.left=t.left+t.width*n.indent+(i+r)/Math.tan(Object(v["o"])(n.mindMap.opt.fishboneDeg)),r+=i,n.updateChildrenPro(e.children,{top:e.top-o,left:e.left-a})})}}},bottom:{renderExpandBtn({node:e,btn:t,expandBtnSize:n,translateX:r,translateY:i,width:o,height:a}){e.parent&&e.parent.isRoot?t.translate(.3*o-n/2-r,a+n/2-i):t.translate(.3*o-n/2-r,-n/2-i)},renderLine({node:e,line:t,top:n,x:r,lineLength:i,height:o,miny:a,ctx:s}){e.parent&&e.parent.isRoot?t.plot(`M ${r},${n+o} L ${r+i},${n+o+Math.tan(Object(v["o"])(s.mindMap.opt.fishboneDeg))*i}`):t.plot(`M ${r},${n} L ${r},${a}`)},computedLeftTopValue({layerIndex:e,node:t,ctx:n}){let r=n.getMarginY(e+1);if(1===e&&t.children){let e=t.left+t.width*n.childIndent,i=t.top+t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r;t.children.forEach(t=>{t.left=e,t.top=i+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0),i+=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}if(e>1&&t.children){let e=t.left+t.width*n.childIndent,i=t.top-(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)-r;t.children.forEach(t=>{t.left=e,t.top=i-t.height,i-=t.height+(n.getNodeActChildrenLength(t)>0?t.expandBtnSize:0)+r})}},adjustLeftTopValueBefore({node:e,ctx:t,layerIndex:n}){let r=t.getMarginY(n+1),i=e.children.length;if(n>2&&i>0){let n=e.children.reduce((e,n)=>e+n.height+(t.getNodeActChildrenLength(n)>0?n.expandBtnSize:0)+r,0);t.updateBrothersTop(e,-n)}},adjustLeftTopValueAfter({parent:e,node:t,ctx:n}){if(e&&e.isRoot){let e=n.getMarginY(t.layerIndex+1),r=0,i=t.expandBtnSize;t.children.forEach(o=>{let a=n.getNodeActChildrenLength(o)>0,s=n.getNodeAreaHeight(o),l=a?s-o.height-(a?o.expandBtnSize:0):0;l-=a?e:0;let c=r+l,u=o.left;o.top+=c,o.left=t.left+t.width*n.indent+(s+i)/Math.tan(Object(v["o"])(n.mindMap.opt.fishboneDeg)),r+=l,i+=s,n.updateChildrenPro(o.children,{top:c,left:o.left-u})})}}}};class Ah extends ch{constructor(e={}){super(e),this.indent=.3,this.childIndent=.5}doLayout(e){let t=[()=>{this.computedBaseValue()},()=>{this.computedLeftTopValue()},()=>{this.adjustLeftTopValue()},()=>{e(this.root)}];Object(v["c"])(t)}computedBaseValue(){Object(v["db"])(this.renderer.renderTree,null,(e,t,n,r,i)=>{let o=this.createNode(e,t,n,r);if(n)this.setNodeCenter(o);else if(t._node.dir?o.dir=t._node.dir:o.dir=i%2===0?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM,t._node.isRoot){let e=this.getMarginY(r);this.checkIsTop(o)?o.top=t._node.top-o.height-e:o.top=t._node.top+t._node.height+e}if(!e.data.expand)return!0},null,!0,0)}computedLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(e.isRoot){let t=this.getMarginX(r+1),n=e.left+e.width+e.height+t,i=e.left+e.width+e.height+t;e.children.forEach(e=>{this.checkIsTop(e)?(e.left=n,n+=e.width+t):(e.left=i+20,i+=e.width+t)})}let i={layerIndex:r,node:e,ctx:this};this.checkIsTop(e)?kh.top.computedLeftTopValue(i):kh.bottom.computedLeftTopValue(i)},null,!0)}adjustLeftTopValue(){Object(v["db"])(this.root,null,(e,t,n,r)=>{if(!e.getData("expand"))return;let i={node:e,parent:t,layerIndex:r,ctx:this};this.checkIsTop(e)?kh.top.adjustLeftTopValueBefore(i):kh.bottom.adjustLeftTopValueBefore(i)},(e,t)=>{let n={parent:t,node:e,ctx:this};if(this.checkIsTop(e)?kh.top.adjustLeftTopValueAfter(n):kh.bottom.adjustLeftTopValueAfter(n),e.isRoot){let t=0,n=0;e.children.forEach(e=>{if(this.checkIsTop(e)){e.left+=t,this.updateChildren(e.children,"left",t);let{left:n,right:r}=this.getNodeBoundaries(e,"h");t+=r-n}else{e.left+=n,this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h");n+=r-t}})}},!0)}getNodeAreaHeight(e){let t=0,n=e=>{let r=this.getMarginY(e.layerIndex);t+=e.height+(this.getNodeActChildrenLength(e)>0?e.expandBtnSize:0)+r,e.children.length&&e.children.forEach(e=>{n(e)})};return n(e),t}updateBrothersLeft(e){let t=e.children,n=0;t.forEach(e=>{e.left+=n,e.children&&e.children.length&&this.updateChildren(e.children,"left",n);let{left:t,right:r}=this.getNodeBoundaries(e,"h"),i=r-t,o=i-e.width;o>0&&(n+=o)})}updateBrothersTop(e,t){if(e.parent&&!e.parent.isRoot){let n=e.parent.children,r=Object(v["w"])(e,n);n.forEach((e,n)=>{if(e.hasCustomPosition())return;let i=0;n>r&&(i=t),e.top+=i,e.children&&e.children.length&&this.updateChildren(e.children,"top",i)}),this.checkIsTop(e)?this.updateBrothersTop(e.parent,t):this.updateBrothersTop(e.parent,3===e.layerIndex?0:t)}}checkIsTop(e){return e.dir===oo["a"].LAYOUT_GROW_DIR.TOP}renderLine(e,t,n){if(1!==e.layerIndex&&e.children.length<=0)return[];let{top:r,height:i,expandBtnSize:o}=e;this.mindMap.opt.alwaysShowExpandBtn||(o=0);let a=e.children.length;if(e.isRoot){let t=-1/0;e.children.forEach(r=>{r.left>t&&(t=r.left);let i=this.getMarginY(r.layerIndex),o=r.left,a=e.height/2+i,s=a/Math.tan(Object(v["o"])(this.mindMap.opt.fishboneDeg)),l=this.lineDraw.path();this.checkIsTop(r)?l.plot(`M ${o-s},${r.top+r.height+a} L ${r.left},${r.top+r.height}`):l.plot(`M ${o-s},${r.top-a} L ${o},${r.top}`),e.style.line(l),e._lines.push(l),n&&n(l,e)});let r=e.top+e.height/2,i=e.height/2+this.getMarginY(e.layerIndex+1),o=this.lineDraw.path();o.plot(`M ${e.left+e.width},${r} L ${t-i/Math.tan(Object(v["o"])(this.mindMap.opt.fishboneDeg))},${r}`),e.style.line(o),e._lines.push(o),n&&n(o,e)}else{let s=-1/0,l=1/0,c=-1/0,u=e.left+e.width*this.indent;if(e.children.forEach((r,i)=>{r.left>c&&(c=r.left);let o=r.top+r.height/2;if(o>s&&(s=o),o1){let e=`M ${u},${o} L ${r.left},${o}`;t[i].plot(e),n&&n(t[i],r)}}),a>=0){let t=this.lineDraw.path();o=a>0?o:0;let h=c-e.left-e.width*this.indent;h=Math.max(h,0);let d={node:e,line:t,top:r,x:u,lineLength:h,height:i,expandBtnSize:o,maxy:s,miny:l,ctx:this};this.checkIsTop(e)?kh.top.renderLine(d):kh.bottom.renderLine(d),e.style.line(t),e._lines.push(t),n&&n(t,e)}}}renderExpandBtn(e,t){let{width:n,height:r,expandBtnSize:i,isRoot:o}=e;if(!o){let{translateX:o,translateY:a}=t.transform(),s={node:e,btn:t,expandBtnSize:i,translateX:o,translateY:a,width:n,height:r};this.checkIsTop(e)?kh.top.renderExpandBtn(s):kh.bottom.renderExpandBtn(s)}}renderGeneralization(e){e.forEach(e=>{let{top:t,bottom:n,right:r,generalizationLineMargin:i,generalizationNodeMargin:o}=this.getNodeGeneralizationRenderBoundaries(e,"h"),a=r+i,s=t,l=r+i,c=n,u=a+20,h=s+(c-s)/2,d=`M ${a},${s} Q ${u},${h} ${l},${c}`;e.generalizationLine.plot(d),e.generalizationNode.left=r+o,e.generalizationNode.top=t+(n-t-e.generalizationNode.height)/2})}renderExpandBtnRect(e,t,n,r,i){let o="";o=i.dir===oo["a"].LAYOUT_GROW_DIR.TOP?1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.TOP:oo["a"].LAYOUT_GROW_DIR.BOTTOM:1===i.layerIndex?oo["a"].LAYOUT_GROW_DIR.BOTTOM:oo["a"].LAYOUT_GROW_DIR.TOP,o===oo["a"].LAYOUT_GROW_DIR.TOP?e.size(n,t).x(0).y(-t):e.size(n,t).x(0).y(r)}}var Ch=Ah;class Eh{constructor(e){this.renderer=e,this.mindMap=e.mindMap,this.currentNode=null,this.textEditNode=null,this.showTextEdit=!1,this.cacheEditingText="",this.bindEvent()}bindEvent(){this.show=this.show.bind(this),this.onScale=this.onScale.bind(this),this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("node_dblclick",(e,t,n)=>{this.show({node:e,e:t,isInserting:n})}),this.mindMap.on("draw_click",()=>{this.hideEditTextBox()}),this.mindMap.on("body_click",()=>{this.mindMap.opt.isEndNodeTextEditOnClickOuter&&this.hideEditTextBox()}),this.mindMap.on("svg_mousedown",()=>{this.hideEditTextBox()}),this.mindMap.on("expand_btn_click",()=>{this.hideEditTextBox()}),this.mindMap.on("before_node_active",()=>{this.hideEditTextBox()}),this.mindMap.on("mousewheel",()=>{this.mindMap.opt.mousewheelAction===oo["a"].MOUSE_WHEEL_ACTION.MOVE&&this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("F2",()=>{this.renderer.activeNodeList.length<=0||this.show({node:this.renderer.activeNodeList[0]})}),this.mindMap.on("scale",this.onScale),this.mindMap.opt.enableAutoEnterTextEditWhenKeydown&&window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){const t=this.mindMap.renderer.activeNodeList;if(t.length<=0||t.length>1)return;const n=t[0];n&&this.checkIsAutoEnterTextEditKey(e)&&this.show({node:n,e:e,isInserting:!1,isFromKeyDown:!0})}checkIsAutoEnterTextEditKey(e){const t=e.keyCode;return(229===t||t>=65&&t<=90||t>=48&&t<=57)&&!this.mindMap.keyCommand.hasCombinationKey(e)}registerTmpShortcut(){this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),this.mindMap.keyCommand.addShortcut("Tab",()=>{this.hideEditTextBox()})}async show({node:e,isInserting:t=!1,isFromKeyDown:n=!1,isFromScale:r=!1}){if(e.isUseCustomNodeContent())return;const{beforeTextEdit:i}=this.mindMap.opt;if("function"===typeof i){let n=!1;try{n=await i(e,t)}catch(c){n=!1,this.mindMap.opt.errorHandler(oo["b"].BEFORE_TEXT_EDIT_ERROR,c)}if(!n)return}this.currentNode=e;const{offsetLeft:o,offsetTop:a}=Object(v["i"])(this.mindMap,e);this.mindMap.view.translateXY(o,a);const s=e._textData.node.node.getBoundingClientRect(),l={node:e,rect:s,isInserting:t,isFromKeyDown:n,isFromScale:r};this.mindMap.richText?this.mindMap.richText.showEditText(l):this.showEditTextBox(l)}onScale(){this.currentNode&&(this.mindMap.richText?(this.mindMap.richText.cacheEditingText=this.mindMap.richText.getEditText(),this.mindMap.richText.showTextEdit=!1):(this.cacheEditingText=this.getEditText(),this.showTextEdit=!1),this.show({node:this.currentNode,isFromScale:!0}))}showEditTextBox({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:i}){if(this.showTextEdit)return;const{nodeTextEditZIndex:o,textAutoWrapWidth:a,selectTextOnEnterEditText:s}=this.mindMap.opt;if(i||this.mindMap.emit("before_show_text_edit"),this.registerTmpShortcut(),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.style.cssText="position:fixed;box-sizing: border-box;background-color:#fff;box-shadow: 0 0 20px rgba(0,0,0,.5);padding: 3px 5px;margin-left: -5px;margin-top: -3px;outline: none; word-break: break-all;",this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("click",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("mousedown",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("keydown",e=>{this.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()});const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.textEditNode)}let l=this.mindMap.view.scale,c=e.style.merge("lineHeight"),u=e.style.merge("fontSize"),h=(this.cacheEditingText||e.getData("text")).split(/\n/gim).map(e=>Object(v["E"])(e)),d="true"===e._textData.node.attr("data-ismultiLine");e.style.domText(this.textEditNode,l,d),this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=h.join("
"),this.textEditNode.style.minWidth=t.width+10+"px",this.textEditNode.style.minHeight=t.height+6+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=a*l+"px",d&&1!==c&&(this.textEditNode.style.transform=`translateY(${-(c*u-u)/2*l}px)`),this.showTextEdit=!0,n||s&&!r?Object(v["Y"])(this.textEditNode):Object(v["q"])(this.textEditNode),this.cacheEditingText=""}getEditText(){return Object(v["y"])(this.textEditNode.innerHTML)}hideEditTextBox(){if(this.currentNode=null,this.mindMap.richText)return this.mindMap.richText.hideEditText();this.showTextEdit&&(this.renderer.activeNodeList.forEach(e=>{let t=this.getEditText();this.mindMap.execCommand("SET_NODE_TEXT",e,t),e.isGeneralization&&e.generalizationBelongNode.updateGeneralization(),this.mindMap.render()}),this.mindMap.emit("hide_text_edit",this.textEditNode,this.renderer.activeNodeList),this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.textEditNode.style.fontFamily="inherit",this.textEditNode.style.fontSize="inherit",this.textEditNode.style.fontWeight="normal",this.textEditNode.style.transform="translateY(0)",this.showTextEdit=!1)}}var Sh={paddingX:15,paddingY:5,imgMaxWidth:100,imgMaxHeight:100,iconSize:20,lineWidth:1,lineColor:"#549688",lineDasharray:"none",lineStyle:"straight",rootLineKeepSameInCurve:!0,generalizationLineWidth:1,generalizationLineColor:"#549688",generalizationLineMargin:0,generalizationNodeMargin:20,associativeLineWidth:2,associativeLineColor:"rgb(51, 51, 51)",associativeLineActiveWidth:8,associativeLineActiveColor:"rgba(2, 167, 240, 1)",associativeLineTextColor:"rgb(51, 51, 51)",associativeLineTextFontSize:14,associativeLineTextLineHeight:1.2,associativeLineTextFontFamily:"微软雅黑, Microsoft YaHei",backgroundColor:"#fafafa",backgroundImage:"none",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover",nodeUseLineStyle:!1,root:{shape:"rectangle",fillColor:"#549688",fontFamily:"微软雅黑, Microsoft YaHei",color:"#fff",fontSize:16,fontWeight:"bold",fontStyle:"normal",lineHeight:1.5,borderColor:"transparent",borderWidth:0,borderDasharray:"none",borderRadius:5,textDecoration:"none"},second:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none"},node:{shape:"rectangle",marginX:50,marginY:0,fillColor:"transparent",fontFamily:"微软雅黑, Microsoft YaHei",color:"#6a6d6c",fontSize:14,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"transparent",borderWidth:0,borderRadius:5,borderDasharray:"none",textDecoration:"none"},generalization:{shape:"rectangle",marginX:100,marginY:40,fillColor:"#fff",fontFamily:"微软雅黑, Microsoft YaHei",color:"#565656",fontSize:16,fontWeight:"noraml",fontStyle:"normal",lineHeight:1.5,borderColor:"#549688",borderWidth:1,borderDasharray:"none",borderRadius:5,textDecoration:"none"}};const Th=["lineWidth","lineColor","lineDasharray","lineStyle","generalizationLineWidth","generalizationLineColor","associativeLineWidth","associativeLineColor","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextColor","associativeLineTextFontSize","associativeLineTextLineHeight","associativeLineTextFontFamily","backgroundColor","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","rootLineKeepSameInCurve"],Nh=e=>{let t=Object.keys(e);for(let n=0;ne===t[n]))return!1;return!0},Mh=["lineColor","lineDasharray","lineWidth"],Lh={[oo["a"].LAYOUT.LOGICAL_STRUCTURE]:hh,[oo["a"].LAYOUT.MIND_MAP]:fh,[oo["a"].LAYOUT.CATALOG_ORGANIZATION]:mh,[oo["a"].LAYOUT.ORGANIZATION_STRUCTURE]:vh,[oo["a"].LAYOUT.TIMELINE]:yh,[oo["a"].LAYOUT.TIMELINE2]:yh,[oo["a"].LAYOUT.VERTICAL_TIMELINE]:xh,[oo["a"].LAYOUT.FISHBONE]:Ch};class Oh{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.themeConfig=this.mindMap.themeConfig,this.renderTree=po()({},this.mindMap.opt.data||{}),this.reRender=!1,this.isRendering=!1,this.hasWaitRendering=!1,this.waitRenderingParams=[],this.nodeCache={},this.lastNodeCache={},this.renderSource="",this.activeNodeList=[],this.root=null,this.textEdit=new Eh(this),this.lastBeingCopyData=null,this.beingCopyData=null,this.beingPasteText="",this.beingPasteImgSize=0,this.currentBeingPasteType="",this.highlightBoxNode=null,this.lastActiveNode=null,this.lastActiveNodeList=[],this.setLayout(),this.bindEvent(),this.registerCommands(),this.registerShortcutKeys()}setLayout(){this.layout=new(Lh[this.mindMap.opt.layout]?Lh[this.mindMap.opt.layout]:Lh[oo["a"].LAYOUT.LOGICAL_STRUCTURE])(this,this.mindMap.opt.layout)}setData(e){this.mindMap.richText?this.renderTree=this.mindMap.richText.handleSetData(e):this.renderTree=e}bindEvent(){this.mindMap.on("draw_click",e=>{this.clearActiveNodeListOnDrawClick(e,"click")}),this.mindMap.on("contextmenu",e=>{this.clearActiveNodeListOnDrawClick(e,"contextmenu")}),this.mindMap.svg.on("dblclick",()=>{this.mindMap.opt.enableDblclickBackToRootNode&&this.setRootNodeCenter()})}registerCommands(){this.selectAll=this.selectAll.bind(this),this.mindMap.command.add("SELECT_ALL",this.selectAll),this.back=this.back.bind(this),this.mindMap.command.add("BACK",this.back),this.forward=this.forward.bind(this),this.mindMap.command.add("FORWARD",this.forward),this.insertNode=this.insertNode.bind(this),this.mindMap.command.add("INSERT_NODE",this.insertNode),this.insertMultiNode=this.insertMultiNode.bind(this),this.mindMap.command.add("INSERT_MULTI_NODE",this.insertMultiNode),this.insertChildNode=this.insertChildNode.bind(this),this.mindMap.command.add("INSERT_CHILD_NODE",this.insertChildNode),this.insertMultiChildNode=this.insertMultiChildNode.bind(this),this.mindMap.command.add("INSERT_MULTI_CHILD_NODE",this.insertMultiChildNode),this.insertParentNode=this.insertParentNode.bind(this),this.mindMap.command.add("INSERT_PARENT_NODE",this.insertParentNode),this.upNode=this.upNode.bind(this),this.mindMap.command.add("UP_NODE",this.upNode),this.downNode=this.downNode.bind(this),this.mindMap.command.add("DOWN_NODE",this.downNode),this.insertAfter=this.insertAfter.bind(this),this.mindMap.command.add("INSERT_AFTER",this.insertAfter),this.insertBefore=this.insertBefore.bind(this),this.mindMap.command.add("INSERT_BEFORE",this.insertBefore),this.moveNodeTo=this.moveNodeTo.bind(this),this.mindMap.command.add("MOVE_NODE_TO",this.moveNodeTo),this.removeNode=this.removeNode.bind(this),this.mindMap.command.add("REMOVE_NODE",this.removeNode),this.removeCurrentNode=this.removeCurrentNode.bind(this),this.mindMap.command.add("REMOVE_CURRENT_NODE",this.removeCurrentNode),this.pasteNode=this.pasteNode.bind(this),this.mindMap.command.add("PASTE_NODE",this.pasteNode),this.cutNode=this.cutNode.bind(this),this.mindMap.command.add("CUT_NODE",this.cutNode),this.setNodeStyle=this.setNodeStyle.bind(this),this.mindMap.command.add("SET_NODE_STYLE",this.setNodeStyle),this.setNodeStyles=this.setNodeStyles.bind(this),this.mindMap.command.add("SET_NODE_STYLES",this.setNodeStyles),this.setNodeActive=this.setNodeActive.bind(this),this.mindMap.command.add("SET_NODE_ACTIVE",this.setNodeActive),this.clearActiveNode=this.clearActiveNode.bind(this),this.mindMap.command.add("CLEAR_ACTIVE_NODE",this.clearActiveNode),this.setNodeExpand=this.setNodeExpand.bind(this),this.mindMap.command.add("SET_NODE_EXPAND",this.setNodeExpand),this.expandAllNode=this.expandAllNode.bind(this),this.mindMap.command.add("EXPAND_ALL",this.expandAllNode),this.unexpandAllNode=this.unexpandAllNode.bind(this),this.mindMap.command.add("UNEXPAND_ALL",this.unexpandAllNode),this.expandToLevel=this.expandToLevel.bind(this),this.mindMap.command.add("UNEXPAND_TO_LEVEL",this.expandToLevel),this.setNodeData=this.setNodeData.bind(this),this.mindMap.command.add("SET_NODE_DATA",this.setNodeData),this.setNodeText=this.setNodeText.bind(this),this.mindMap.command.add("SET_NODE_TEXT",this.setNodeText),this.setNodeImage=this.setNodeImage.bind(this),this.mindMap.command.add("SET_NODE_IMAGE",this.setNodeImage),this.setNodeIcon=this.setNodeIcon.bind(this),this.mindMap.command.add("SET_NODE_ICON",this.setNodeIcon),this.setNodeHyperlink=this.setNodeHyperlink.bind(this),this.mindMap.command.add("SET_NODE_HYPERLINK",this.setNodeHyperlink),this.setNodeNote=this.setNodeNote.bind(this),this.mindMap.command.add("SET_NODE_NOTE",this.setNodeNote),this.setNodeTag=this.setNodeTag.bind(this),this.mindMap.command.add("SET_NODE_TAG",this.setNodeTag),this.insertFormula=this.insertFormula.bind(this),this.mindMap.command.add("INSERT_FORMULA",this.insertFormula),this.addGeneralization=this.addGeneralization.bind(this),this.mindMap.command.add("ADD_GENERALIZATION",this.addGeneralization),this.removeGeneralization=this.removeGeneralization.bind(this),this.mindMap.command.add("REMOVE_GENERALIZATION",this.removeGeneralization),this.setNodeCustomPosition=this.setNodeCustomPosition.bind(this),this.mindMap.command.add("SET_NODE_CUSTOM_POSITION",this.setNodeCustomPosition),this.resetLayout=this.resetLayout.bind(this),this.mindMap.command.add("RESET_LAYOUT",this.resetLayout),this.setNodeShape=this.setNodeShape.bind(this),this.mindMap.command.add("SET_NODE_SHAPE",this.setNodeShape),this.goTargetNode=this.goTargetNode.bind(this),this.mindMap.command.add("GO_TARGET_NODE",this.goTargetNode)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Tab",()=>{this.mindMap.execCommand("INSERT_CHILD_NODE")}),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.textEdit.showTextEdit||this.mindMap.execCommand("INSERT_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Tab",()=>{this.mindMap.execCommand("INSERT_PARENT_NODE")}),this.mindMap.keyCommand.addShortcut("Control+g",()=>{this.mindMap.execCommand("ADD_GENERALIZATION")}),this.toggleActiveExpand=this.toggleActiveExpand.bind(this),this.mindMap.keyCommand.addShortcut("/",this.toggleActiveExpand),this.mindMap.keyCommand.addShortcut("Del|Backspace",()=>{this.mindMap.execCommand("REMOVE_NODE")}),this.mindMap.keyCommand.addShortcut("Shift+Backspace",()=>{this.mindMap.execCommand("REMOVE_CURRENT_NODE")}),this.mindMap.on("before_show_text_edit",()=>{this.startTextEdit()}),this.mindMap.on("hide_text_edit",()=>{this.endTextEdit()}),this.mindMap.keyCommand.addShortcut("Control+a",()=>{this.mindMap.execCommand("SELECT_ALL")}),this.mindMap.keyCommand.addShortcut("Control+l",()=>{this.mindMap.execCommand("RESET_LAYOUT",this.resetLayout)}),this.mindMap.keyCommand.addShortcut("Control+Up",()=>{this.mindMap.execCommand("UP_NODE")}),this.mindMap.keyCommand.addShortcut("Control+Down",()=>{this.mindMap.execCommand("DOWN_NODE")}),this.mindMap.keyCommand.addShortcut("Control+c",()=>{this.copy()}),this.mindMap.keyCommand.addShortcut("Control+v",()=>{this.onPaste()}),this.mindMap.keyCommand.addShortcut("Control+x",()=>{this.cut()}),this.mindMap.keyCommand.addShortcut("Control+Enter",()=>{this.setRootNodeCenter()})}emitNodeActiveEvent(e=null,t=[...this.activeNodeList]){let n=!1;n=this.lastActiveNode!==e,n||(n=!Object(v["h"])(this.lastActiveNodeList,t)),n&&(this.lastActiveNode=e,this.lastActiveNodeList=[...t],this.mindMap.batchExecution.push("emitNodeActiveEvent",()=>{this.mindMap.emit("node_active",e,t)}))}clearActiveNodeListOnDrawClick(e,t){if(this.activeNodeList.length<=0)return;let n=!0;const{useLeftKeySelectionRightKeyDrag:r}=this.mindMap.opt;if("contextmenu"===t?!r:r){const t=this.mindMap.event.mousedownPos;n=Math.abs(e.clientX-t.x)<=5&&Math.abs(e.clientY-t.y)<=5}n&&this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}startTextEdit(){this.mindMap.keyCommand.save()}endTextEdit(){this.mindMap.keyCommand.restore()}render(e=(()=>{}),t){if(this.isRendering)return this.hasWaitRendering=!0,void(this.waitRenderingParams=[e,t]);this.isRendering=!0,this.renderSource=t,this.lastNodeCache=this.nodeCache,this.nodeCache={},this.reRender&&this.clearActiveNodeList(),this.layout.doLayout(n=>{Object.keys(this.lastNodeCache).forEach(e=>{this.nodeCache[e]||(this.removeNodeFromActiveList(this.lastNodeCache[e]),this.emitNodeActiveEvent(),this.lastNodeCache[e].destroy())}),this.root=n,this.root.render(()=>{if(this.isRendering=!1,this.mindMap.emit("node_tree_render_end"),e&&e(),this.hasWaitRendering){const e=this.waitRenderingParams;this.hasWaitRendering=!1,this.waitRenderingParams=[],this.render(...e)}else this.mindMap.richText&&[oo["a"].CHANGE_THEME,oo["a"].SET_DATA].includes(t)&&this.mindMap.command.addHistory()})}),this.emitNodeActiveEvent()}clearActiveNode(){this.activeNodeList.length<=0||(this.clearActiveNodeList(),this.emitNodeActiveEvent(null,[]))}clearActiveNodeList(){this.activeNodeList.forEach(e=>{this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1)}),this.activeNodeList=[]}addNodeToActiveList(e){const t=this.findActiveNodeIndex(e);-1===t&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!0),this.activeNodeList.push(e))}removeNodeFromActiveList(e){let t=this.findActiveNodeIndex(e);-1!==t&&(this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),this.activeNodeList.splice(t,1))}findActiveNodeIndex(e){return Object(v["w"])(e,this.activeNodeList)}selectAll(){this.mindMap.opt.readonly||(Object(v["db"])(this.root,null,e=>{e.getData("isActive")||this.addNodeToActiveList(e)},null,!0,0,0),this.emitNodeActiveEvent())}back(e){this.backForward("back",e)}forward(e){this.backForward("forward",e)}backForward(e,t){this.mindMap.execCommand("CLEAR_ACTIVE_NODE");const n=this.mindMap.command[e](t);n&&(this.renderTree=n,this.mindMap.render())}getNewNodeBehavior(e=!1,t=!1){const{createNewNodeBehavior:n}=this.mindMap.opt;let r=!1,i=!1;switch(n){case oo["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT:r=t||!e,i=!t&&e;break;case oo["a"].CREATE_NEW_NODE_BEHAVIOR.NOT_ACTIVE:r=!1,i=!1;break;case oo["a"].CREATE_NEW_NODE_BEHAVIOR.ACTIVE_ONLY:r=!0,i=!1;break;default:break}return{focusNewNode:r,inserting:i}}insertNode(e=!0,t=[],n=null,r=[]){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,s=a.length>1,l=!!this.mindMap.richText,{focusNewNode:c,inserting:u}=this.getNewNodeBehavior(e,s),h={expand:!0,richText:l,resetRichText:l,isActive:c};r=Object(v["a"])(r,{...h}),a.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const t=e.parent,a=1===e.layerIndex,s=a?i:o,l=Object(v["v"])(e),c={inserting:u,data:{text:s,...h,uid:Object(v["m"])(),...n||{}},children:[...Object(v["n"])(r,!0)]};t.nodeData.children.splice(l+1,0,c)}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiNode(e,t){if(!t||t.length<=0)return;if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=!!this.mindMap.richText,{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:r,resetRichText:r,isActive:i};t=Object(v["a"])(t,o),n.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const n=e.parent,r=Object(v["v"])(e),i=Object(v["n"])(Object(v["ab"])(t),!0);n.nodeData.children.splice(r+1,0,...i)}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertChildNode(e=!0,t=[],n=null,r=[]){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:i,defaultInsertBelowSecondLevelNodeText:o}=this.mindMap.opt,a=t.length>0?t:this.activeNodeList,s=a.length>1,l=!!this.mindMap.richText,{focusNewNode:c,inserting:u}=this.getNewNodeBehavior(e,s),h={expand:!0,richText:l,resetRichText:l,isActive:c};r=Object(v["a"])(r,{...h}),a.forEach(e=>{if(e.isGeneralization)return;e.nodeData.children||(e.nodeData.children=[]);const t=e.isRoot?i:o,a={inserting:u,data:{text:t,uid:Object(v["m"])(),...h,...n||{}},children:[...Object(v["n"])(r,!0)]};e.nodeData.children.push(a),e.setData({expand:!0})}),c&&this.clearActiveNodeList(),this.mindMap.render()}insertMultiChildNode(e,t){if(!t||t.length<=0)return;if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;this.textEdit.hideEditTextBox();const n=e.length>0?e:this.activeNodeList,r=!!this.mindMap.richText,{focusNewNode:i}=this.getNewNodeBehavior(!1,!0),o={expand:!0,richText:r,resetRichText:r,isActive:i};t=Object(v["a"])(t,o),n.forEach(e=>{e.isGeneralization||(e.nodeData.children||(e.nodeData.children=[]),t=Object(v["n"])(t,!0),e.nodeData.children.push(...t),e.setData({expand:!0}))}),i&&this.clearActiveNodeList(),this.mindMap.render()}insertParentNode(e=!0,t,n){if(t=Object(v["r"])(t),this.activeNodeList.length<=0&&t.length<=0)return;this.textEdit.hideEditTextBox();const{defaultInsertSecondLevelNodeText:r,defaultInsertBelowSecondLevelNodeText:i}=this.mindMap.opt,o=t.length>0?t:this.activeNodeList,a=o.length>1,s=!!this.mindMap.richText,{focusNewNode:l,inserting:c}=this.getNewNodeBehavior(e,a),u={expand:!0,richText:s,resetRichText:s,isActive:l};o.forEach(e=>{if(e.isGeneralization||e.isRoot)return;const t=1===e.layerIndex?r:i,o={inserting:c,data:{text:t,uid:Object(v["m"])(),...u,...n||{}},children:[e.nodeData]},a=e.parent,s=Object(v["v"])(e);a.nodeData.children.splice(s,1,o)}),l&&this.clearActiveNodeList(),this.mindMap.render()}upNode(){if(this.activeNodeList.length<=0)return;let e=this.activeNodeList[0];if(e.isRoot)return;let t=e.parent,n=t.children,r=Object(v["w"])(e,n);if(-1===r||0===r)return;let i=r-1;n.splice(r,1),n.splice(i,0,e),t.nodeData.children.splice(r,1),t.nodeData.children.splice(i,0,e.nodeData),this.mindMap.render()}downNode(){if(this.activeNodeList.length<=0)return;let e=this.activeNodeList[0];if(e.isRoot)return;let t=e.parent,n=t.children,r=Object(v["w"])(e,n);if(-1===r||r===n.length-1)return;let i=r+1;n.splice(r,1),n.splice(i,0,e),t.nodeData.children.splice(r,1),t.nodeData.children.splice(i,0,e.nodeData),this.mindMap.render()}copy(){this.beingCopyData=this.copyNode(),Object(v["Z"])({simpleMindMap:!0,data:this.beingCopyData})}cut(){this.mindMap.execCommand("CUT_NODE",e=>{this.beingCopyData=e,Object(v["Z"])({simpleMindMap:!0,data:e})})}paste(){this.beingCopyData&&this.mindMap.execCommand("PASTE_NODE",this.beingCopyData)}async onPaste(){const{errorHandler:e,handleIsSplitByWrapOnPasteCreateNewNode:t}=this.mindMap.opt;let n=null,r=null;try{const e=await Object(v["t"])();n=e.text,r=e.img}catch(o){e(oo["b"].READ_CLIPBOARD_ERROR,o)}const i=r?r.size:0;if(this.beingPasteText===n&&this.beingPasteImgSize===i||(this.currentBeingPasteType=oo["a"].PASTE_TYPE.CLIP_BOARD,this.beingPasteText=n,this.beingPasteImgSize=i),this.lastBeingCopyData!==this.beingCopyData&&(this.lastBeingCopyData=this.beingCopyData,this.currentBeingPasteType=oo["a"].PASTE_TYPE.CANVAS),this.currentBeingPasteType===oo["a"].PASTE_TYPE.CLIP_BOARD){if(n){let r=null,i=!0;if(this.mindMap.opt.customHandleClipboardText)try{const e=await this.mindMap.opt.customHandleClipboardText(n);Object(v["I"])(e)||(i=!1,"object"===typeof e&&e.simpleMindMap?r=e.data:n=String(e))}catch(o){e(oo["b"].CUSTOM_HANDLE_CLIPBOARD_TEXT_ERROR,o)}if(i)try{const e=JSON.parse(n);e&&e.simpleMindMap&&(r=e.data)}catch(o){e(oo["b"].PARSE_PASTE_DATA_ERROR,o)}if(r)this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],Array.isArray(r)?r:[r]);else{n=Object(v["E"])(n);const e=n.split(new RegExp("\r?\n|(?!!e);e.length>1&&t?t().then(()=>{this.mindMap.execCommand("INSERT_MULTI_CHILD_NODE",[],e.map(e=>({data:{text:e},children:[]})))}).catch(()=>{this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:n})}):this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{text:n})}}if(r)try{let e=await Object(v["K"])(r);this.activeNodeList.length>0&&this.activeNodeList.forEach(t=>{this.mindMap.execCommand("SET_NODE_IMAGE",t,{url:e.url,title:"",width:e.size.width,height:e.size.height})})}catch(o){e(oo["b"].LOAD_CLIPBOARD_IMAGE_ERROR,o)}}else this.paste()}insertBefore(e,t){this.insertTo(e,t,"before")}insertAfter(e,t){this.insertTo(e,t,"after")}insertTo(e,t,n="before"){let r=Object(v["r"])(e);r=r.filter(e=>!e.isRoot),"after"===n&&r.reverse(),r.forEach(e=>{this.checkNodeLayerChange(e,t);let r=e.parent,i=r.children,o=Object(v["w"])(e,i);if(-1===o)return;i.splice(o,1),r.nodeData.children.splice(o,1);let a=t.parent,s=a.children,l=Object(v["w"])(t,s);-1!==l&&("after"===n&&l++,s.splice(l,0,e),a.nodeData.children.splice(l,0,e.nodeData))}),this.mindMap.render()}checkNodeLayerChange(e,t){if(this.mindMap.richText){let n=1===e.layerIndex&&1!==t.layerIndex||1!==e.layerIndex&&1===t.layerIndex;n&&e.setData({resetRichText:!0})}}removeNode(e=[]){if(e=Object(v["r"])(e),this.activeNodeList.length<=0&&e.length<=0)return;let t=null,n=e.length>0,r=n?e:this.activeNodeList,i=r.find(e=>e.isRoot);if(i)this.clearActiveNodeList(),i.children=[],i.nodeData.children=[];else{t=this.getNextActiveNode();for(let e=0;e0,r=n?e:this.activeNodeList;r=r.filter(e=>!e.isRoot);for(let i=0;i0?n[r-1]:t.parent}return e}copyNode(){if(this.activeNodeList.length<=0)return;const e=Object(v["A"])(this.activeNodeList);return e.map(e=>Object(v["k"])({},e,!0))}cutNode(e){if(this.activeNodeList.length<=0)return;const t=Object(v["A"])(this.activeNodeList).filter(e=>!e.isRoot),n=t.map(e=>Object(v["k"])({},e,!0));t.forEach(e=>{Object(v["S"])(e)}),this.clearActiveNodeList(),this.mindMap.render(),e&&"function"===typeof e&&e(n)}moveNodeTo(e,t){let n=Object(v["r"])(e);n=n.filter(e=>!e.isRoot),n.forEach(e=>{this.checkNodeLayerChange(e,t),this.removeNodeFromActiveList(e),Object(v["S"])(e),t.nodeData.children.push(e.nodeData)}),this.emitNodeActiveEvent(),this.mindMap.render()}pasteNode(e){e=Object(v["r"])(e),this.activeNodeList.length<=0||e.length<=0||(this.activeNodeList.forEach(t=>{t.nodeData.children.push(...e.map(e=>{const t=Object(v["ab"])(e);return Object(v["n"])([t],!0),t}))}),this.mindMap.render())}setNodeStyle(e,t,n){let r={[t]:n};this.mindMap.richText&&this.mindMap.richText.setNotActiveNodeStyle(e,{[t]:n}),this.setNodeDataRender(e,r),Mh.includes(t)&&(e.parent||e).renderLine(!0)}setNodeStyles(e,t){let n={...t};this.mindMap.richText&&this.mindMap.richText.setNotActiveNodeStyle(e,t),this.setNodeDataRender(e,n);let r=Object.keys(t),i=!1;r.forEach(e=>{Mh.includes(e)&&(i=!0)}),i&&(e.parent||e).renderLine(!0)}setNodeActive(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{isActive:t}),e.updateNodeByActive(t)}setNodeExpand(e,t){this.mindMap.execCommand("SET_NODE_DATA",e,{expand:t}),this.mindMap.render()}expandAllNode(){Object(v["db"])(this.renderTree,null,e=>{e.data.expand||(e.data.expand=!0)},null,!0,0,0),this.mindMap.render()}unexpandAllNode(){Object(v["db"])(this.renderTree,null,(e,t,n)=>{!n&&e.children&&e.children.length>0&&(e.data.expand=!1)},null,!0,0,0),this.mindMap.render(()=>{this.mindMap.view.reset()})}expandToLevel(e){Object(v["db"])(this.renderTree,null,(t,n,r,i)=>{const o=i0&&(t.data.expand=!1)},null,!0,0,0),this.mindMap.render()}toggleActiveExpand(){this.activeNodeList.forEach(e=>{e.nodeData.children.length<=0||this.toggleNodeExpand(e)})}toggleNodeExpand(e){this.mindMap.execCommand("SET_NODE_EXPAND",e,!e.getData("expand"))}setNodeText(e,t,n,r){this.setNodeDataRender(e,{text:t,richText:n,resetRichText:r})}setNodeImage(e,t){const{url:n,title:r,width:i,height:o,custom:a=!1}=t||{url:"",title:"",width:0,height:0,custom:!1};this.setNodeDataRender(e,{image:n,imageTitle:r||"",imageSize:{width:i,height:o,custom:a}})}setNodeIcon(e,t){this.setNodeDataRender(e,{icon:t})}setNodeHyperlink(e,t,n=""){this.setNodeDataRender(e,{hyperlink:t,hyperlinkTitle:n})}setNodeNote(e,t){this.setNodeDataRender(e,{note:t})}setNodeTag(e,t){this.setNodeDataRender(e,{tag:t})}insertFormula(e,t=[]){if(!this.mindMap.richText||!this.mindMap.formula)return;t=Object(v["r"])(t);const n=t.length>0?t:this.activeNodeList;n.forEach(t=>{this.mindMap.formula.insertFormulaToNode(t,e)})}addGeneralization(e){if(this.activeNodeList.length<=0)return;const t=this.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization&&!e.checkHasSelfGeneralization()),n=Object(v["P"])(t);n.forEach(t=>{const n={...e||{text:this.mindMap.opt.defaultGeneralizationText},range:t.range||null};let r=t.node.getData("generalization");r?Array.isArray(r)?r.push(n):r=[r,n]:r=[n],this.mindMap.execCommand("SET_NODE_DATA",t.node,{generalization:r}),t.node.setData({expand:!0})}),this.mindMap.render(()=>{this.mindMap.render()})}removeGeneralization(){this.activeNodeList.length<=0||(this.activeNodeList.forEach(e=>{e.checkHasGeneralization()&&this.mindMap.execCommand("SET_NODE_DATA",e,{generalization:null})}),this.mindMap.render(),this.closeHighlightNode())}setNodeCustomPosition(e,t,n){let r=[e]||!1;r.forEach(e=>{this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:t,customTop:n})})}resetLayout(){Object(v["db"])(this.root,null,e=>{e.customLeft=void 0,e.customTop=void 0,this.mindMap.execCommand("SET_NODE_DATA",e,{customLeft:void 0,customTop:void 0}),this.mindMap.render()},null,!0,0,0)}setNodeShape(e,t){if(!t||!Kc.includes(t))return;let n=[e]||!1;n.forEach(e=>{this.setNodeStyle(e,"shape",t)})}goTargetNode(e,t=(()=>{})){let n="string"===typeof e?e:e.getData("uid");n&&this.expandToNodeUid(n,()=>{let e=this.findNodeByUid(n);e&&(e.active(),this.moveNodeToCenter(e),t())})}setNodeData(e,t){Object.keys(t).forEach(n=>{e.nodeData.data[n]=t[n]})}setNodeDataRender(e,t,n=!1){this.mindMap.execCommand("SET_NODE_DATA",e,t);let r=e.reRender();r?n||this.mindMap.render():this.mindMap.emit("node_tree_render_end")}moveNodeToCenter(e){let t=this.mindMap.width/2,n=this.mindMap.height/2,{left:r,top:i,width:o,height:a}=e,s=r+o/2,l=i+a/2,{state:c}=this.mindMap.view.getTransformData(),u=t-c.x,h=n-c.y,d=u-s,f=h-l;this.mindMap.view.translateX(d),this.mindMap.view.translateY(f),this.mindMap.view.setScale(1)}setRootNodeCenter(){this.moveNodeToCenter(this.root)}expandToNodeUid(e,t=(()=>{})){let n=[];const r={};Object(v["d"])(this.renderTree,(t,i)=>{if(t.data.uid===e)return n=i?[...r[i.data.uid],i]:[],"stop";r[t.data.uid]=i?[...r[i.data.uid],i]:[]});let i=!1;n.forEach(e=>{e.data.expand||(i=!0,e.data.expand=!0)}),i?this.mindMap.render(t):t()}findNodeByUid(e){let t=null;return Object(v["db"])(this.root,null,n=>{if(n.getData("uid")===e)return t=n,!0}),t}highlightNode(e,t){const{highlightNodeBoxStyle:n={}}=this.mindMap.opt;this.highlightBoxNode||(this.highlightBoxNode=(new Zl).stroke({color:n.stroke||"transparent"}).fill({color:n.fill||"transparent"}));let r=1/0,i=1/0,o=-1/0,a=-1/0;if(t){const n=e.children.slice(t[0],t[1]+1);n.forEach(e=>{e.lefto&&(o=t),n>a&&(a=n)})}else r=e.left,i=e.top,o=e.left+e.width,a=e.top+e.height;this.highlightBoxNode.plot([[r,i],[o,i],[o,a],[r,a]]),this.mindMap.otherDraw.add(this.highlightBoxNode)}closeHighlightNode(){this.highlightBoxNode.remove()}}var Dh=Oh,Ph=po()(Sh,{lineColor:"#333",backgroundColor:"#d1f6ec",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"#1fb27d"},second:{fillColor:"#fff",color:"#565656",borderColor:"transparent",borderWidth:0},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Ih=po()(Sh,{lineColor:"rgb(115, 161, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(115, 161, 191)"},second:{fillColor:"rgb(238, 243, 246)",color:"#333",borderColor:"rgb(115, 161, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Rh=po()(Sh,{lineColor:"rgb(191, 115, 148)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 148)"},second:{fillColor:"rgb(246, 238, 242)",color:"#333",borderColor:"rgb(191, 115, 148)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Fh=po()(Sh,{lineColor:"rgb(123, 115, 191)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(123, 115, 191)"},second:{fillColor:"rgb(239, 238, 246)",color:"#333",borderColor:"rgb(123, 115, 191)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),zh=po()(Sh,{lineColor:"rgb(191, 115, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 115, 115)"},second:{fillColor:"rgb(246, 238, 238)",color:"#333",borderColor:"rgb(191, 115, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),Bh=po()(Sh,{lineColor:"rgb(191, 147, 115)",backgroundColor:"rgb(251, 251, 251)",generalizationLineWidth:1,generalizationLineColor:"#333",root:{fillColor:"rgb(191, 147, 115)"},second:{fillColor:"rgb(246, 242, 238)",color:"#333",borderColor:"rgb(191, 147, 115)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"#333",color:"#333"}}),_h=po()(Sh,{lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(58, 65, 68)",backgroundImage:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowQzg5QTQ0NDhENzgxMUUzOENGREE4QTg0RDgzRTZDNyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowQzg5QTQ0NThENzgxMUUzOENGREE4QTg0RDgzRTZDNyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkMwOEQ1NDRGOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkMwOEQ1NDUwOEQ3NzExRTM4Q0ZEQThBODREODNFNkM3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+e9P33AAAACVJREFUeNpisXJ0YUACTAyoAMr/+eM7EGGRZ4FQ7BycEAZAgAEAHbEGtkoQm/wAAAAASUVORK5CYII=",backgroundRepeat:"repeat",backgroundSize:"auto",root:{fillColor:"rgb(233, 223, 152)",color:"#333",fontSize:24,borderRadius:21},second:{fillColor:"rgb(164, 197, 192)",borderColor:"transparent",color:"#333",fontSize:16,borderRadius:10},node:{fontSize:12,color:"#fff",fontWeight:"bold"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}}),jh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"#fff",root:{fillColor:"rgb(18, 187, 55)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(241, 242, 241)",borderColor:"transparent",color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",borderWidth:2,color:"#1a1a1a"}}),Hh=po()(Sh,{lineColor:"rgb(94, 202, 110)",lineWidth:2,generalizationLineWidth:3,generalizationLineColor:"#1a1a1a",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(255, 245, 214)",color:"#1a1a1a",fontSize:24,borderRadius:10,borderColor:"rgb(249, 199, 84)",borderWidth:1},second:{fillColor:"rgb(255, 245, 214)",borderColor:"rgb(249, 199, 84)",borderWidth:1,color:"#1a1a1a",fontSize:18,borderRadius:10},node:{fontSize:14,color:"#1a1a1a"},generalization:{fillColor:"#fff",borderColor:"#1a1a1a",color:"#1a1a1a",borderWidth:2}}),Uh=po()(Sh,{lineColor:"rgb(30, 53, 86)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(56, 123, 233)",backgroundColor:"rgb(241, 241, 241)",root:{fillColor:"rgb(30, 53, 86)",color:"#fff",fontSize:24,borderRadius:10,borderColor:"rgb(189, 197, 201)",borderWidth:2},second:{fillColor:"rgb(169, 218, 218)",borderColor:"rgb(30, 53, 86)",borderWidth:2,color:"#fff",fontSize:18,borderRadius:10},node:{fontSize:14,color:"rgb(30, 53, 86)",borderColor:"rgb(30, 53, 86)",borderWidth:1,marginY:20},generalization:{fillColor:"rgb(56, 123, 233)",borderColor:"rgb(56, 123, 233)",color:"#fff",borderWidth:0}}),qh=po()(Sh,{lineColor:"rgb(17, 68, 23)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"#fff",backgroundColor:"rgb(15, 16, 17)",root:{fillColor:"rgb(28, 178, 43)",color:"#fff",fontSize:24,borderRadius:10},second:{fillColor:"rgb(55, 56, 58)",color:"rgb(147,148,149)",fontSize:18,borderRadius:10,borderWidth:0},node:{fontSize:14,color:"rgb(147, 148, 149)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#333"}}),Gh=po()(Sh,{lineColor:"rgb(123, 199, 120)",backgroundColor:"rgb(236, 245, 231)",generalizationLineWidth:2,generalizationLineColor:"rgb(123, 199, 120)",root:{fillColor:"rgb(253, 244, 217)",color:"#222"},second:{fillColor:"rgb(253, 244, 217)",color:"#222",borderColor:"rgb(242, 200, 104)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"rgb(123, 199, 120)",borderColor:"transparent",borderWidth:2,color:"#fff"}}),Wh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(51, 51, 51)",backgroundColor:"rgb(239, 248, 250)",root:{fillColor:"rgb(255, 255, 255)",color:"#222"},second:{fillColor:"rgb(255, 255, 255)",color:"#222",borderColor:"rgb(255, 255, 255)",borderWidth:1,fontSize:14},node:{fontSize:12,color:"#333"},generalization:{fillColor:"#fff",borderColor:"rgb(51, 51, 51)",color:"#333"}}),Vh=po()(Sh,{lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#222",backgroundColor:"rgb(248, 215, 49)",root:{fillColor:"rgb(55, 165, 255)",borderColor:"rgb(51, 51, 51)",borderWidth:3},second:{fillColor:"rgb(255, 160, 36)",color:"#222",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{borderColor:"#222",borderWidth:3,color:"#222"}}),Yh=po()(Sh,{lineColor:"rgb(166, 101, 106)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(255, 208, 211)",root:{fillColor:"rgb(139, 109, 225)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(243, 104, 138)",color:"#fff",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"#222"}}),Zh=po()(Sh,{lineColor:"rgb(104, 204, 202)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(90, 206, 241)",backgroundColor:"rgb(239, 255, 255)",root:{fillColor:"rgb(0, 192, 184)",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"#222",borderColor:"rgb(184, 235, 233)",borderWidth:2,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(90, 206, 241)",borderColor:"transparent",color:"#fff"}}),Kh=po()(Sh,{lineColor:"rgb(51, 56, 62)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(127, 93, 64)",backgroundColor:"#fff",root:{fillColor:"rgb(51, 56, 62)",color:"rgb(247, 208, 160)",borderColor:"",borderWidth:0},second:{fillColor:"rgb(239, 209, 176)",color:"rgb(81, 58, 42)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(127, 93, 64)",borderColor:"transparent",color:"rgb(255, 214, 175)"}}),Xh=po()(Sh,{lineColor:"rgb(254, 146, 0)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 222, 69)",backgroundColor:"rgb(255, 246, 243)",root:{fillColor:"rgb(255, 112, 52)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(51, 51, 51)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"rgb(255, 222, 69)",borderColor:"transparent",color:"rgb(51, 51, 51)"}}),Jh=po()(Sh,{lineColor:"rgb(40, 193, 84)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(251, 158, 0)",backgroundColor:"rgb(238, 255, 243)",root:{fillColor:"rgb(25, 193, 73)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"#fff",color:"rgb(69, 149, 96)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"#222"},generalization:{fillColor:"#fff",borderColor:"rgb(251, 158, 0)",borderWidth:2,color:"rgb(51, 51, 51)"}}),Qh=po()(Sh,{lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",backgroundColor:"rgb(27, 31, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(204, 204, 204)"},generalization:{fillColor:"transparent",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}}),$h=po()(Sh,{lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",backgroundColor:"rgb(80, 156, 170)",root:{fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(65, 89, 158)"},second:{fillColor:"rgb(251, 227, 188)",color:"rgb(65, 89, 158)",borderColor:"",borderWidth:0,fontSize:14},node:{fontSize:12,color:"rgb(65, 89, 158)"},generalization:{fillColor:"#fff",borderColor:"transparent",color:"rgb(65, 89, 158)"}}),ed=po()(Sh,{lineColor:"rgb(34, 34, 34)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(34, 34, 34)",root:{fillColor:"#fff",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(241, 246, 248)",color:"rgb(34, 34, 34)",borderColor:"rgb(34, 34, 34)",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(34, 34, 34)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}}),td=po()(Sh,{lineColor:"rgb(113, 195, 169)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(113, 195, 169)",root:{fillColor:"rgb(16, 160, 121)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(240, 252, 249)",color:"rgb(50, 113, 96)",borderColor:"rgb(113, 195, 169)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(10, 59, 43)"},generalization:{fontSize:14,fillColor:"rgb(246, 238, 211)",borderColor:"",borderWidth:0,color:"rgb(173, 91, 12)"}}),nd=po()(Sh,{lineColor:"rgb(173, 123, 91)",lineWidth:4,generalizationLineWidth:4,generalizationLineColor:"rgb(173, 123, 91)",root:{fillColor:"rgb(202, 117, 79)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(245, 231, 216)",color:"rgb(125, 86, 42)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(96, 71, 47)"},generalization:{fontSize:14,fillColor:"rgb(255, 249, 239)",borderColor:"rgb(173, 123, 91)",borderWidth:2,color:"rgb(122, 83, 44)"}}),rd=po()(Sh,{backgroundColor:"rgb(255, 238, 228)",lineColor:"rgb(230, 138, 131)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(222, 101, 85)",root:{fillColor:"rgb(207, 44, 44)",color:"rgb(255, 233, 157)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(255, 255, 255)",color:"rgb(211, 58, 21)",borderColor:"rgb(222, 101, 85)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(144, 71, 43)"},generalization:{fontSize:14,fillColor:"rgb(255, 247, 211)",borderColor:"rgb(255, 202, 162)",borderWidth:2,color:"rgb(187, 101, 69)"}}),id=po()(Sh,{backgroundColor:"rgb(27, 31, 34)",lineColor:"rgb(75, 81, 78)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(36, 179, 96)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(254, 199, 13)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(27, 31, 34)",borderColor:"rgb(255, 119, 34)",borderWidth:2,color:"rgb(204, 204, 204)"}}),od=po()(Sh,{backgroundColor:"rgb(32, 37, 49)",lineColor:"rgb(137, 167, 196)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 119, 34)",root:{fillColor:"rgb(23, 153, 243)",color:"rgb(255, 255, 255)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(70, 78, 94)",color:"rgb(209, 210, 210)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(204, 204, 204)"},generalization:{fontSize:14,fillColor:"rgb(255, 119, 34)",borderColor:"",borderWidth:2,color:"#fff"}}),ad=po()(Sh,{backgroundColor:"rgb(18, 20, 20)",lineColor:"rgb(205, 186, 156)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(245, 224, 191)",root:{fillColor:"rgb(255, 208, 124)",color:"rgb(111, 61, 6)",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(66, 57, 46)",color:"rgb(225, 201, 158)",borderColor:"rgb(245, 224, 191)",borderWidth:2,fontSize:18},node:{fontSize:14,color:"rgb(231, 203, 155)"},generalization:{fontSize:14,fillColor:"rgb(56, 45, 34)",borderColor:"rgb(104, 84, 61)",borderWidth:2,color:"rgb(242, 216, 176)"}}),sd=po()(Sh,{backgroundColor:"#e6f1de",lineColor:"#f5ffad",lineWidth:4,generalizationLineWidth:3,generalizationLineColor:"#749336",root:{fillColor:"#94c143",color:"#fff",borderColor:"#94c143",borderWidth:0,fontSize:24},second:{fillColor:"#cee498",color:"#749336",borderColor:"#aec668",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#749336"},generalization:{fontSize:14,fillColor:"#cee498",borderColor:"#aec668",borderWidth:2,color:"#749336"}}),ld=po()(Sh,{backgroundColor:"#fff2df",lineColor:"#b0bc47",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#b0bc47",root:{fillColor:"#e68112",color:"#fff",borderColor:"#e68112",borderWidth:0,fontSize:24},second:{fillColor:"#ffd683",color:"#8c5416",borderColor:"#b0bc47",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#8c5416"},generalization:{fontSize:14,fillColor:"#ffd683",borderColor:"#b0bc47",borderWidth:2,color:"#8c5416"}}),cd=po()(Sh,{backgroundColor:"#070616",lineColor:"#fff",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"#fff",root:{fillColor:"#ff6811",color:"#110501",borderColor:"#ff6811",borderWidth:0,fontSize:24},second:{fillColor:"#070616",color:"#a9a4a9",borderColor:"#ff6811",borderWidth:2,fontSize:18},node:{fontSize:14,color:"#a9a4a9"},generalization:{fontSize:14,fillColor:"",borderColor:"#ff6811",borderWidth:2,color:"#a9a4a9"}}),ud={default:Sh,freshGreen:Ph,blueSky:Ih,brainImpairedPink:Rh,romanticPurple:Fh,freshRed:zh,earthYellow:Bh,classic:_h,classic2:jh,classic3:Hh,classic4:Uh,dark:qh,classicGreen:Gh,classicBlue:Wh,minions:Vh,pinkGrape:Yh,mint:Zh,gold:Kh,vitalityOrange:Xh,greenLeaf:Jh,dark2:Qh,skyGreen:$h,simpleBlack:ed,courseGreen:td,coffee:nd,redSpirit:rd,blackHumour:id,lateNightOffice:od,blackGold:ad,avocado:sd,autumn:ld,orangeJuice:cd};const hd={Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Esc:27,Spacebar:32,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Left:37,Up:38,Right:39,Down:40,Del:46,NumLock:144,Cmd:91,CmdFF:224,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"`":192,"=":187,"-":189,"/":191,".":190};for(let RE=0;RE<=9;RE++)hd[RE]=RE+48;"abcdefghijklmnopqrstuvwxyz".split("").forEach((e,t)=>{hd[e]=t+65});const dd=hd;class fd{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.shortcutMap={},this.shortcutMapCache={},this.isPause=!1,this.isInSvg=!1,this.bindEvent()}pause(){this.isPause=!0}recovery(){this.isPause=!1}save(){this.shortcutMapCache=this.shortcutMap,this.shortcutMap={}}restore(){this.shortcutMap=this.shortcutMapCache,this.shortcutMapCache={}}bindEvent(){this.onKeydown=this.onKeydown.bind(this),this.mindMap.on("svg_mouseenter",()=>{this.isInSvg=!0}),this.mindMap.on("svg_mouseleave",()=>{this.mindMap.richText&&this.mindMap.richText.showTextEdit||this.mindMap.renderer.textEdit.showTextEdit||this.mindMap.associativeLine&&this.mindMap.associativeLine.showTextEdit||(this.isInSvg=!1)}),window.addEventListener("keydown",this.onKeydown),this.mindMap.on("beforeDestroy",()=>{this.unBindEvent()})}unBindEvent(){window.removeEventListener("keydown",this.onKeydown)}onKeydown(e){this.isPause||this.mindMap.opt.enableShortcutOnlyWhenMouseInSvg&&!this.isInSvg||Object.keys(this.shortcutMap).forEach(t=>{this.checkKey(e,t)&&(this.checkKey(e,"Control+v")||(e.stopPropagation(),e.preventDefault()),this.shortcutMap[t].forEach(e=>{e()}))})}checkKey(e,t){let n=this.getOriginEventCodeArr(e),r=this.getKeyCodeArr(t);if(n.length!==r.length)return!1;for(let i=0;ie===n[i]);if(-1===e)return!1;r.splice(e,1)}return!0}getOriginEventCodeArr(e){let t=[];return(e.ctrlKey||e.metaKey)&&t.push(dd["Control"]),e.altKey&&t.push(dd["Alt"]),e.shiftKey&&t.push(dd["Shift"]),t.includes(e.keyCode)||t.push(e.keyCode),t}hasCombinationKey(e){return e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}getKeyCodeArr(e){let t=e.split(/\s*\+\s*/),n=[];return t.forEach(e=>{n.push(dd[e])}),n}addShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{this.shortcutMap[e]?this.shortcutMap[e].push(t):this.shortcutMap[e]=[t]})}removeShortcut(e,t){e.split(/\s*\|\s*/).forEach(e=>{if(this.shortcutMap[e])if(t){let n=this.shortcutMap[e].findIndex(e=>e===t);-1!==n&&this.shortcutMap[e].splice(n,1)}else this.shortcutMap[e]=[],delete this.shortcutMap[e]})}getShortcutFn(e){let t=[];return e.split(/\s*\|\s*/).forEach(e=>{t=this.shortcutMap[e]||[]}),t}}class pd{constructor(e={}){this.opt=e,this.mindMap=e.mindMap,this.commands={},this.history=[],this.activeHistoryIndex=0,this.registerShortcutKeys(),this.addHistory=Object(v["cb"])(this.addHistory,this.mindMap.opt.addHistoryTime,this)}clearHistory(){this.history=[],this.activeHistoryIndex=0,this.mindMap.emit("back_forward",0,0)}registerShortcutKeys(){this.mindMap.keyCommand.addShortcut("Control+z",()=>{this.mindMap.execCommand("BACK")}),this.mindMap.keyCommand.addShortcut("Control+y",()=>{this.mindMap.execCommand("FORWARD")})}exec(e,...t){if(this.commands[e]){if(this.commands[e].forEach(e=>{e(...t)}),["BACK","FORWARD","SET_NODE_ACTIVE","CLEAR_ACTIVE_NODE"].includes(e))return;this.addHistory()}}add(e,t){this.commands[e]?this.commands[e].push(t):this.commands[e]=[t]}remove(e,t){if(this.commands[e])if(t){let n=this.commands[e].find(e=>e===t);-1!==n&&this.commands[e].splice(n,1)}else this.commands[e]=[],delete this.commands[e]}addHistory(){if(this.mindMap.opt.readonly)return;let e=this.getCopyData();this.history.length>0&&JSON.stringify(this.history[this.history.length-1])===JSON.stringify(e)||(this.history=this.history.slice(0,this.activeHistoryIndex+1),this.history.push(Object(v["ab"])(e)),this.history.length>this.mindMap.opt.maxHistoryCount&&this.history.shift(),this.activeHistoryIndex=this.history.length-1,this.mindMap.emit("data_change",e),this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length))}back(e=1){if(!this.mindMap.opt.readonly&&this.activeHistoryIndex-e>=0){this.activeHistoryIndex-=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);let t=Object(v["ab"])(this.history[this.activeHistoryIndex]);return this.mindMap.emit("data_change",t),t}}forward(e=1){if(this.mindMap.opt.readonly)return;let t=this.history.length;if(this.activeHistoryIndex+e<=t-1){this.activeHistoryIndex+=e,this.mindMap.emit("back_forward",this.activeHistoryIndex,this.history.length);let t=Object(v["ab"])(this.history[this.activeHistoryIndex]);return this.mindMap.emit("data_change",t),t}}getCopyData(){return Object(v["l"])({},this.mindMap.renderer.renderTree,!0)}removeDataUid(e){e=Object(v["ab"])(e);let t=e=>{delete e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};return t(e),e}}var md=pd;class gd{constructor(){this.has={},this.queue=[],this.nextTick=Object(v["N"])(this.flush,this)}push(e,t){this.has[e]?this.replaceTask(e,t):(this.has[e]=!0,this.queue.push({name:e,fn:t}),this.nextTick())}replaceTask(e,t){const n=this.queue.findIndex(t=>t.name===e);-1!==n&&(this.queue[n]={name:e,fn:t})}flush(){let e=this.queue.slice(0);this.queue=[],e.forEach(({name:e,fn:t})=>{this.has[e]=!1,t()})}}var vd=gd;const bd={readonly:!1,layout:oo["a"].LAYOUT.LOGICAL_STRUCTURE,fishboneDeg:45,theme:"default",themeConfig:{},scaleRatio:.2,mouseScaleCenterUseMousePosition:!0,maxTag:5,expandBtnSize:20,imgTextMargin:5,textContentMargin:2,selectTranslateStep:3,selectTranslateLimit:20,customNoteContentShow:null,enableFreeDrag:!1,watermarkConfig:{text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"#999",opacity:.5,fontSize:14}},textAutoWrapWidth:500,customHandleMousewheel:null,mousewheelAction:oo["a"].MOUSE_WHEEL_ACTION.MOVE,mousewheelMoveStep:100,mousewheelZoomActionReverse:!0,defaultInsertSecondLevelNodeText:"二级节点",defaultInsertBelowSecondLevelNodeText:"分支主题",expandBtnStyle:{color:"#808080",fill:"#fff",fontSize:13,strokeColor:"#333333"},expandBtnIcon:{open:"",close:""},expandBtnNumHandler:e=>e,isShowExpandNum:!0,enableShortcutOnlyWhenMouseInSvg:!0,initRootNodePosition:null,exportPaddingX:10,exportPaddingY:10,nodeTextEditZIndex:3e3,nodeNoteTooltipZIndex:3e3,isEndNodeTextEditOnClickOuter:!0,maxHistoryCount:1e3,alwaysShowExpandBtn:!1,iconList:[],maxNodeCacheCount:1e3,defaultAssociativeLineText:"关联",fitPadding:50,enableCtrlKeyNodeSelection:!0,useLeftKeySelectionRightKeyDrag:!1,beforeTextEdit:null,isUseCustomNodeContent:!1,customCreateNodeContent:null,customInnerElsAppendTo:null,nodeDragPlaceholderMaxSize:20,enableAutoEnterTextEditWhenKeydown:!1,richTextEditFakeInPlace:!1,customHandleClipboardText:null,disableMouseWheelZoom:!1,disableTouchZoom:!1,errorHandler:(e,t)=>{console.error(e,t)},resetCss:"\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n ",enableDblclickBackToRootNode:!1,minExportImgCanvasScale:2,hoverRectColor:"rgb(94, 200, 248)",hoverRectPadding:2,selectTextOnEnterEditText:!1,deleteNodeActive:!0,autoMoveWhenMouseInEdgeOnDrag:!0,fit:!1,dragMultiNodeRectConfig:{width:40,height:20,fill:""},dragPlaceholderRectFill:"",dragOpacityConfig:{cloneNodeOpacity:.5,beingDragNodeOpacity:.3},tagsColorMap:{},cooperateStyle:{avatarSize:22,fontSize:12},associativeLineIsAlwaysAboveNode:!0,defaultGeneralizationText:"概要",handleIsSplitByWrapOnPasteCreateNewNode:null,addHistoryTime:100,isDisableDrag:!1,highlightNodeBoxStyle:{stroke:"rgb(94, 200, 248)",fill:"transparent"},createNewNodeBehavior:oo["a"].CREATE_NEW_NODE_BEHAVIOR.DEFAULT};class yd{constructor(e={}){if(this.opt=this.handleOpt(po()(bd,e)),this.el=this.opt.el,!this.el)throw new Error("缺少容器元素el");this.getElRectInfo(),this.cssEl=null,this.addCss(),this.initContainer(),this.initTheme(),this.initCache(),this.event=new ho({mindMap:this}),this.keyCommand=new fd({mindMap:this}),this.command=new md({mindMap:this}),this.renderer=new Dh({mindMap:this}),this.view=new so({mindMap:this}),this.batchExecution=new vd,yd.pluginList.forEach(e=>{this.initPlugin(e)}),this.render(this.opt.fit?()=>this.view.fit():()=>{}),setTimeout(()=>{this.command.addHistory()},0)}handleOpt(e){return e.data=Object(v["ab"])(e.data||{}),oo["h"].includes(e.layout)||(e.layout=oo["a"].LAYOUT.LOGICAL_STRUCTURE),e.theme=e.theme&&ud[e.theme]?e.theme:"default",e}initContainer(){const{associativeLineIsAlwaysAboveNode:e}=this.opt,t=()=>{this.associativeLineDraw=this.draw.group(),this.associativeLineDraw.addClass("smm-associative-line-container")};this.svg=Yc().addTo(this.el).size(this.width,this.height),this.draw=this.svg.group(),this.draw.addClass("smm-container"),this.lineDraw=this.draw.group(),this.lineDraw.addClass("smm-line-container"),e||t(),this.nodeDraw=this.draw.group(),this.nodeDraw.addClass("smm-node-container"),e&&t(),this.otherDraw=this.draw.group(),this.otherDraw.addClass("smm-other-container")}clearDraw(){this.lineDraw.clear(),this.associativeLineDraw.clear(),this.nodeDraw.clear(),this.otherDraw.clear()}addCss(){this.cssEl=document.createElement("style"),this.cssEl.type="text/css",this.cssEl.innerHTML=oo["e"],document.head.appendChild(this.cssEl)}removeCss(){document.head.removeChild(this.cssEl)}render(e,t=""){this.batchExecution.push("render",()=>{this.initTheme(),this.renderer.reRender=!1,this.renderer.render(e,t)})}reRender(e,t=""){this.batchExecution.push("render",()=>{this.clearDraw(),this.initTheme(),this.renderer.reRender=!0,this.renderer.render(e,t)})}getElRectInfo(){if(this.elRect=this.el.getBoundingClientRect(),this.width=this.elRect.width,this.height=this.elRect.height,this.width<=0||this.height<=0)throw new Error("容器元素el的宽高不能为0")}resize(){this.getElRectInfo(),this.svg.size(this.width,this.height),this.emit("resize")}on(e,t){this.event.on(e,t)}emit(e,...t){this.event.emit(e,...t)}off(e,t){this.event.off(e,t)}initCache(){Object.keys(oo["d"]).forEach(e=>{let t=Object(v["B"])(oo["d"][e]),n="";switch(t){case"Boolean":n=!1;break;default:n=null;break}oo["d"][e]=n})}initTheme(){this.themeConfig=po()(ud[this.opt.theme],this.opt.themeConfig),bo.setBackgroundStyle(this.el,this.themeConfig)}setTheme(e,t=!1){this.execCommand("CLEAR_ACTIVE_NODE"),this.opt.theme=e,t||this.render(null,oo["a"].CHANGE_THEME),this.emit("view_theme_change",e)}getTheme(){return this.opt.theme}setThemeConfig(e,t=!1){const n=Object(v["x"])(this.themeConfig,e);if(this.opt.themeConfig=e,!t){let e=Nh(n);this.render(null,e?"":oo["a"].CHANGE_THEME)}}getCustomThemeConfig(){return this.opt.themeConfig}getThemeConfig(e){return void 0===e?this.themeConfig:this.themeConfig[e]}getConfig(e){return void 0===e?this.opt:this.opt[e]}updateConfig(e={}){this.opt=this.handleOpt(po.a.all([bd,this.opt,e]))}getLayout(){return this.opt.layout}setLayout(e,t=!1){oo["h"].includes(e)||(e=oo["a"].LAYOUT.LOGICAL_STRUCTURE),this.opt.layout=e,this.view.reset(),this.renderer.setLayout(),t||this.render(null,oo["a"].CHANGE_LAYOUT)}execCommand(...e){this.command.exec(...e)}setData(e){e=Object(v["ab"])(e||{}),this.execCommand("CLEAR_ACTIVE_NODE"),this.command.clearHistory(),this.command.addHistory(),this.renderer.setData(e),this.reRender(()=>{},oo["a"].SET_DATA),this.emit("set_data",e)}setFullData(e){e.root&&this.setData(e.root),e.layout&&this.setLayout(e.layout),e.theme&&(e.theme.template&&this.setTheme(e.theme.template),e.theme.config&&this.setThemeConfig(e.theme.config)),e.view&&this.view.setTransformData(e.view)}getData(e){let t=this.command.getCopyData(),n={};return n=e?{layout:this.getLayout(),root:t,theme:{template:this.getTheme(),config:this.getCustomThemeConfig()},view:this.view.getTransformData()}:t,Object(v["ab"])(n)}async export(...e){try{let t=await this.doExport.export(...e);return t}catch(t){this.opt.errorHandler(oo["b"].EXPORT_ERROR,t)}}toPos(e,t){return{x:e-this.elRect.left,y:t-this.elRect.top}}setMode(e){[oo["a"].MODE.READONLY,oo["a"].MODE.EDIT].includes(e)&&(this.opt.readonly=e===oo["a"].MODE.READONLY,this.opt.readonly&&this.execCommand("CLEAR_ACTIVE_NODE"),this.emit("mode_change",e))}getSvgData({paddingX:e=0,paddingY:t=0,ignoreWatermark:n=!1}={}){const r=this.svg,i=this.draw,o=r.width(),a=r.height(),s=i.transform(),l=this.elRect;i.scale(1/s.scaleX,1/s.scaleY);const c=i.rbox();c.width+=2*e,c.height+=2*t,i.translate(e,t),r.size(c.width,c.height),i.translate(-c.x+l.left,-c.y+l.top);let u=r.clone();!n&&(c.width>o||c.height>a)&&this.watermark&&this.watermark.hasWatermark()&&(this.width=c.width,this.height=c.height,this.watermark.draw(),u=r.clone(),this.width=o,this.height=a,this.watermark.draw()),u.add(Yc(``));const h=r.find("marker");if(h&&h.length>0){const e=h[0].attr("id");u.find("marker").forEach(t=>{t.attr("id",e)})}return r.size(o,a),i.transform(s),{svg:u,svgHTML:u.svg(),rect:{...c,ratio:c.width/c.height},origWidth:o,origHeight:a,scaleX:s.scaleX,scaleY:s.scaleY}}addPlugin(e,t){let n=yd.hasPlugin(e);-1===n&&(yd.usePlugin(e,t),this.initPlugin(e))}removePlugin(e){let t=yd.hasPlugin(e);-1!==t&&(yd.pluginList.splice(t,1),this[e.instanceName]&&(this[e.instanceName].beforePluginRemove&&this[e.instanceName].beforePluginRemove(),delete this[e.instanceName]))}initPlugin(e){this[e.instanceName]=new e({mindMap:this,pluginOpt:e.pluginOpt})}destroy(){this.emit("beforeDestroy"),this.renderer.textEdit.hideEditTextBox(),this.associativeLine&&this.associativeLine.hideEditTextBox(),[...yd.pluginList].forEach(e=>{this[e.instanceName].beforePluginDestroy&&this[e.instanceName].beforePluginDestroy(),this[e.instanceName]=null}),this.event.unbind(),this.svg.remove(),bo.removeBackgroundStyle(this.el),this.el.innerHTML="",this.el=null,this.removeCss()}}yd.pluginList=[],yd.usePlugin=(e,t={})=>(-1!==yd.hasPlugin(e)||(e.pluginOpt=t,yd.pluginList.push(e)),yd),yd.hasPlugin=e=>yd.pluginList.findIndex(t=>t===e),yd.defineTheme=(e,t={})=>{if(ud[e])return new Error("该主题名称已存在");ud[e]=po()(Sh,t)};var wd=yd;class xd{constructor(e){this.mindMap=e.mindMap,this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.startViewPos={x:0,y:0}}calculationMiniMap(e,t){let{svg:n,rect:r,origWidth:i,origHeight:o,scaleX:a,scaleY:s}=this.mindMap.getSvgData({ignoreWatermark:!0});const l=this.mindMap.elRect;r.x-=l.left,r.x2-=l.left,r.y-=l.top,r.y2-=l.top;let c=e/t,u=0,h=0;c>r.ratio?(h=t,u=r.ratio*h):(u=e,h=u/r.ratio);let d=u/r.width,f=(e-u)/2,p=(t-h)/2,m=r.x-(r.width*a-r.width)/2,g=r.x2+(r.width*a-r.width)/2,b=r.y-(r.height*s-r.height)/2,y=r.y2+(r.height*s-r.height)/2,w=r.width*a,x=r.height*s,k={left:0,top:0,right:0,bottom:0};k.left=Math.max(0,-m/w*u)+f,k.right=Math.max(0,(g-i)/w*u)+f,k.top=Math.max(0,-b/x*h)+p,k.bottom=Math.max(0,(y-o)/x*h)+p,k.top>p+h&&(k.top=p+h),k.left>f+u&&(k.left=f+u),Object.keys(k).forEach(e=>{k[e]=k[e]+"px"}),this.removeNodeContent(n);const A=n.svg();return{getImgUrl:async e=>{const t=new Blob([A],{type:"image/svg+xml"}),n=await Object(v["R"])(t);e(n)},svgHTML:A,viewBoxStyle:k,miniMapBoxScale:d,miniMapBoxLeft:f,miniMapBoxTop:p}}removeNodeContent(e){if(e.hasClass("smm-node")){let t=e.findOne(".smm-node-shape"),n=t.attr("fill");return(Object(v["J"])(n)||Object(v["H"])(n))&&t.attr("fill",Object(v["C"])(this.mindMap.themeConfig)),e.clear(),void e.add(t)}let t=e.children();t&&t.length>0&&t.forEach(e=>{this.removeNodeContent(e)})}onMousedown(e){this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};let t=this.mindMap.view.getTransformData();this.startViewPos={x:t.state.x,y:t.state.y}}onMousemove(e,t=5){if(!this.isMousedown)return;let n=e.clientX-this.mousedownPos.x,r=e.clientY-this.mousedownPos.y;this.mindMap.view.translateXTo(n*t+this.startViewPos.x),this.mindMap.view.translateYTo(r*t+this.startViewPos.y)}onMouseup(){this.isMousedown=!1}}xd.instanceName="miniMap";var kd=xd;class Ad{constructor(e={}){this.mindMap=e.mindMap,this.lineSpacing=0,this.textSpacing=0,this.angle=0,this.text="",this.textStyle={},this.watermarkDraw=null,this.maxLong=this.getMaxLong(),this.updateWatermark(this.mindMap.opt.watermarkConfig||{}),this.bindEvent()}getMaxLong(){return Math.sqrt(Math.pow(this.mindMap.width,2)+Math.pow(this.mindMap.height,2))}bindEvent(){this.onResize=this.onResize.bind(this),this.mindMap.on("resize",this.onResize)}unBindEvent(){this.mindMap.off("resize",this.onResize)}onResize(){this.maxLong=this.getMaxLong(),this.draw()}createContainer(){this.watermarkDraw||(this.watermarkDraw=this.mindMap.svg.group().css({"pointer-events":"none","user-select":"none"}).addClass("smm-water-mark-container"))}removeContainer(){this.watermarkDraw&&(this.watermarkDraw.remove(),this.watermarkDraw=null)}hasWatermark(){return!!this.text.trim()}handleConfig({text:e,lineSpacing:t,textSpacing:n,angle:r,textStyle:i}){this.text=void 0===e?"":String(e).trim(),this.lineSpacing="number"===typeof t&&t>0?t:100,this.textSpacing="number"===typeof n&&n>0?n:100,this.angle="number"===typeof r&&r>=0&&r<=90?r:30,this.textStyle=Object.assign(this.textStyle,i||{})}draw(){if(this.watermarkDraw&&this.watermarkDraw.clear(),!this.hasWatermark())return void this.removeContainer();this.createContainer();let e=0;while(e{let n=this.textStyle[t];"color"===t?e.fill(n):e.css(Object(v["e"])(t),n)})}updateWatermark(e){this.mindMap.opt.watermarkConfig=po()(this.mindMap.opt.watermarkConfig,e),this.handleConfig(e),this.draw()}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Ad.instanceName="watermark";var Cd=Ad;class Ed{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.onKeyup=this.onKeyup.bind(this),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.LEFT,()=>{this.onKeyup(oo["a"].KEY_DIR.LEFT)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.UP,()=>{this.onKeyup(oo["a"].KEY_DIR.UP)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.RIGHT,()=>{this.onKeyup(oo["a"].KEY_DIR.RIGHT)}),this.mindMap.keyCommand.addShortcut(oo["a"].KEY_DIR.DOWN,()=>{this.onKeyup(oo["a"].KEY_DIR.DOWN)})}onKeyup(e){if(this.mindMap.renderer.activeNodeList.length>0)this.focus(e);else{let e=this.mindMap.renderer.root;this.mindMap.execCommand("GO_TARGET_NODE",e)}}focus(e){let t=this.mindMap.renderer.activeNodeList[0],n=this.getNodeRect(t),r=null,i=1/0,o=(e,t)=>{let o=this.getDistance(n,e);o{if(i.uid===e.uid)return;let o=this.getNodeRect(i),{left:a,top:s,right:l,bottom:c}=o,u=!1;n===oo["a"].KEY_DIR.LEFT?u=l<=t.left:n===oo["a"].KEY_DIR.RIGHT?u=a>=t.right:n===oo["a"].KEY_DIR.UP?u=c<=t.top:n===oo["a"].KEY_DIR.DOWN&&(u=s>=t.bottom),u&&r(o,i)})}getFocusNodeByShadowAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){Object(v["d"])(this.mindMap.renderer.root,i=>{if(i.uid===e.uid)return;let o=this.getNodeRect(i),{left:a,top:s,right:l,bottom:c}=o,u=!1;n===oo["a"].KEY_DIR.LEFT?u=at.top:n===oo["a"].KEY_DIR.RIGHT?u=l>t.right&&st.top:n===oo["a"].KEY_DIR.UP?u=st.left:n===oo["a"].KEY_DIR.DOWN&&(u=c>t.bottom&&at.left),u&&r(o,i)})}getFocusNodeByAreaAlgorithm({currentActiveNode:e,currentActiveNodeRect:t,dir:n,checkNodeDis:r}){let i=(t.right+t.left)/2,o=(t.bottom+t.top)/2;Object(v["d"])(this.mindMap.renderer.root,t=>{if(t.uid===e.uid)return;let a=this.getNodeRect(t),{left:s,top:l,right:c,bottom:u}=a,h=(c+s)/2,d=(u+l)/2,f=h-i,p=d-o;if(0===f&&0===p)return;let m=!1;n===oo["a"].KEY_DIR.LEFT?m=f<=0&&f<=p&&f<=-p:n===oo["a"].KEY_DIR.RIGHT?m=f>0&&f>=-p&&f>=p:n===oo["a"].KEY_DIR.UP?m=p<=0&&p0&&-pf),m&&r(a,t)})}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:o,top:a,width:s,height:l}=e;return{right:(o+s)*t+r,bottom:(a+l)*n+i,left:o*t+r,top:a*n+i}}getDistance(e,t){let n=this.getCenter(e),r=this.getCenter(t);return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}getCenter({left:e,right:t,top:n,bottom:r}){return{x:(e+t)/2,y:(n+r)/2}}}Ed.instanceName="keyboardNavigation";var Sd=Ed,Td=n("fafe");class Nd{constructor(e){this.mindMap=e.mindMap}async pdf(e,t,n=!1){n?await this.multiPageExport(e,t):await this.onePageExport(e,t)}onePageExport(e,t){return new Promise((n,r)=>{let i=new Td["a"]({unit:"pt",format:"a4",compress:!0}),o=oo["c"].width/oo["c"].height,a=new Image;a.onload=()=>{let r,s,l=a.width,c=a.height,u=l/c;l<=oo["c"].width&&c<=oo["c"].height?(r=l,s=c):o>u?(r=u*oo["c"].height,s=oo["c"].height):(r=oo["c"].width,s=oo["c"].width/u),i.addImage(t,"PNG",(oo["c"].width-r)/2,(oo["c"].height-s)/2,r,s),i.save(e),n()},a.onerror=e=>{r(e)},a.src=t})}multiPageExport(e,t){return new Promise((n,r)=>{let i=new Image;i.onload=()=>{let r=i.width,o=i.height,a=r/oo["c"].width*oo["c"].height,s=o,l=0,c=oo["c"].width,u=oo["c"].width/r*o,h=new Td["a"]({unit:"pt",format:"a4",compress:!0});if(s0)h.addImage(t,"PNG",0,l,c,u),s-=a,l-=oo["c"].height,s>0&&h.addPage();h.save(e),n()},i.onerror=e=>{r(e)},i.src=t})}}Nd.instanceName="doExportPDF";var Md=Nd;class Ld{constructor(e){this.mindMap=e.mindMap}async xmind(e,t){const n=await St.transformToXmind(e,t);return n}getXmind(){return St}}Ld.instanceName="doExportXMind";var Od=Ld;const Dd=e=>{let t=String(e).split(/\s+/);return t.map(e=>{if(/^[\d.]+/.test(e)){let t=/^([\d.]+)(.*)$/.exec(e);return[Number(t[1]),t[2]]}return e})},Pd=(e,t)=>e*t,Id=(e,t)=>t/e,Rd={left:0,top:0,center:50,bottom:100,right:100},Fd=({backgroundSize:e,drawOpt:t,imageRatio:n,canvasWidth:r,canvasHeight:i,canvasRatio:o})=>{if(e){let a=Dd(e);if("auto"===a[0]&&"auto"===a[1])return;if("cover"===a[0])return void(n>o?(t.height=i,t.width=Pd(n,i)):(t.width=r,t.height=Id(n,r)));if("contain"===a[0])return void(n>o?(t.width=r,t.height=Id(n,r)):(t.height=i,t.width=Pd(n,i)));let s=-1;a[0]&&(Array.isArray(a[0])?"%"===a[0][1]?(t.width=a[0][0]/100*r,s=t.width):(t.width=a[0][0],s=a[0][0]):"auto"===a[0]&&a[1]&&("%"===a[1][1]?t.width=Pd(n,a[1][0]/100*i):t.width=Pd(n,a[1][0]))),a[1]&&Array.isArray(a[1])?"%"===a[1][1]?t.height=a[1][0]/100*i:t.height=a[1][0]:-1!==s&&(t.height=Id(n,s))}},zd=({backgroundPosition:e,drawOpt:t,imgWidth:n,imgHeight:r,canvasWidth:i,canvasHeight:o})=>{if(e){let a=Dd(e);if(a=a.map(e=>"string"===typeof e&&void 0!==Rd[e]?[Rd[e],"%"]:e),Array.isArray(a[0])){if(1===a.length&&a.push([50,"%"]),"%"===a[0][1]){let e=a[0][0]/100*i,r=a[0][0]/100*n;t.x=e-r}else t.x=a[0][0];if("%"===a[1][1]){let e=a[1][0]/100*o,n=a[1][0]/100*r;t.y=e-n}else t.y=a[1][0]}}},Bd=({ctx:e,image:t,backgroundRepeat:n,drawOpt:r,imgWidth:i,imgHeight:o,canvasWidth:a,canvasHeight:s})=>{if(n){let l=r.x,c=r.y,u=Math.ceil(l/i),h=Math.ceil(c/o),d=l-u*i,f=c-h*o,p=Dd(n);if("no-repeat"===p[0]||i>=a&&o>=s)return;if("repeat-x"===p[0]&&a>i){let n=d;while(no){let n=f;while(no){let i=f;while(i{e.drawImage(t,n.sx,n.sy,n.swidth,n.sheight,n.x,n.y,n.width,n.height)},jd=(e,t,n,r,{backgroundSize:i,backgroundPosition:o,backgroundRepeat:a},s=(()=>{}))=>{let l=t/n,c=new Image;c.src=r,c.onload=()=>{let r=c.width,u=c.height,h=r/u,d={sx:0,sy:0,swidth:r,sheight:u,x:0,y:0,width:r,height:u};Fd({backgroundSize:i,drawOpt:d,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l}),zd({backgroundPosition:o,drawOpt:d,imgWidth:d.width,imgHeight:d.height,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l});let f=Bd({ctx:e,image:c,backgroundRepeat:a,drawOpt:d,imgWidth:d.width,imgHeight:d.height,imageRatio:h,canvasWidth:t,canvasHeight:n,canvasRatio:l});f||_d(e,c,d),s()},c.onerror=e=>{s(e)}};var Hd=jd;class Ud{constructor(e){this.mindMap=e.mindMap}async export(e,t=!0,n="思维导图",...r){if(this[e]){const i=await this[e](n,...r);return t&&"pdf"!==e&&Object(v["p"])(i,n+"."+e),i}return null}createTransformImgTaskList(e,t,n,r){const i=e.find(t);return i.map(async e=>{const t=r(e);if(/^data:/.test(t)||"none"===t)return;const i=await Object(v["F"])(t);e.attr(n,i)})}async getSvgData(){let{exportPaddingX:e,exportPaddingY:t}=this.mindMap.opt,{svg:n,svgHTML:r}=this.mindMap.getSvgData({paddingX:e,paddingY:t});const i=this.createTransformImgTaskList(n,"image","href",e=>e.attr("href")||e.attr("xlink:href")),o=this.createTransformImgTaskList(n,"img","src",e=>e.attr("src")),a=[...i,...o];let s;if(await Promise.all(a),this.mindMap.richText){const e=n.find("foreignObject");e.length>0&&(e[0].add(Yc(``)),s=!0)}return(a.length>0||s)&&(r=n.svg()),{node:n,str:r}}svgToPng(e,t,n=(()=>!1),r){return new Promise((i,o)=>{const a=new Image;a.setAttribute("crossOrigin","anonymous"),a.onload=async()=>{try{const e=document.createElement("canvas"),o=Math.max(window.devicePixelRatio,this.mindMap.opt.minExportImgCanvasScale);let s=a.width,l=a.height;if(r){const e=Object(v["W"])(s,l,r.width,r.height);s=e[0],l=e[1]}const c=n(s,l);c?(e.width=l*o,e.height=s*o,e.style.width=l+"px",e.style.height=s+"px"):(e.width=s*o,e.height=l*o,e.style.width=s+"px",e.style.height=l+"px");const u=e.getContext("2d");u.scale(o,o),c&&(u.rotate(.5*Math.PI),u.translate(0,-l)),t||await this.drawBackgroundToCanvas(u,s,l),u.drawImage(a,0,0,s,l),i(e.toDataURL())}catch(e){o(e)}},a.onerror=e=>{o(e)},a.src=e})}drawBackgroundToCanvas(e,t,n){return new Promise((r,i)=>{const{backgroundColor:o="#fff",backgroundImage:a,backgroundRepeat:s="no-repeat",backgroundPosition:l="center center",backgroundSize:c="cover"}=this.mindMap.themeConfig;e.save(),e.rect(0,0,t,n),e.fillStyle=o,e.fill(),e.restore(),a&&"none"!==a?(e.save(),Hd(e,t,n,a,{backgroundRepeat:s,backgroundPosition:l,backgroundSize:c},t=>{t?i(t):r(),e.restore()})):r()})}drawBackgroundToSvg(e){return new Promise(async t=>{const{backgroundColor:n="#fff",backgroundImage:r,backgroundRepeat:i="repeat"}=this.mindMap.themeConfig;if(e.css("background-color",n),r&&"none"!==r){const n=await Object(v["F"])(r);e.css("background-image",`url(${n})`),e.css("background-repeat",i),t()}else t()})}async png(e,t=!1,n,r){const{str:i}=await this.getSvgData(),o=await this.fixSvgStrAndToBlob(i),a=await this.svgToPng(o,t,n,r);return a}async pdf(e,t,n){if(!this.mindMap.doExportPDF)throw new Error("请注册ExportPDF插件");const r=await this.png("",!1,(e,t)=>!(e<=oo["c"].width&&t&&oo["c"].height)&&e/t>1,{width:n||2*oo["c"].width});await this.mindMap.doExportPDF.pdf(e,r,t)}async xmind(e){if(!this.mindMap.doExportXMind)throw new Error("请注册ExportXMind插件");const t=this.mindMap.getData(),n=await this.mindMap.doExportXMind.xmind(t,e),r=await Object(v["R"])(n);return r}async svg(e){const{node:t}=await this.getSvgData();t.first().before(Yc(`${e}`)),await this.drawBackgroundToSvg(t);const n=t.svg(),r=await this.fixSvgStrAndToBlob(n);return r}async fixSvgStrAndToBlob(e){e=Object(v["T"])(e),e=Object(v["D"])(e);const t=new Blob([e],{type:"image/svg+xml"}),n=await Object(v["R"])(t);return n}async json(e,t=!0){const n=this.mindMap.getData(t),r=JSON.stringify(n),i=new Blob([r]),o=await Object(v["R"])(i);return o}async smm(e,t){const n=await this.json(e,t);return n}async md(){const e=this.mindMap.getData(),t=Ot(e),n=new Blob([t]),r=await Object(v["R"])(n);return r}}Ud.instanceName="doExport";var qd=Ud;n("a3df");class Gd extends ch{constructor({mindMap:e}){super(e.renderer),this.mindMap=e,this.reset(),this.bindEvent()}reset(){this.isDragging=!1,this.mousedownNode=null,this.beingDragNodeList=[],this.nodeList=[],this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.drawTransform=null,this.clone=null,this.placeholder=null,this.offsetX=0,this.offsetY=0,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.checkDragOffset=10,this.minOffset=10}bindEvent(){this.checkOverlapNode=Object(v["cb"])(this.checkOverlapNode,300,this),this.mindMap.on("node_mousedown",(e,t)=>{if(this.mindMap.opt.readonly||1!==t.which||e.isGeneralization||e.isRoot)return;t.preventDefault(),this.isMousedown=!0,this.mousedownNode=e;const{x:n,y:r}=this.mindMap.toPos(t.clientX,t.clientY);this.mouseDownX=n,this.mouseDownY=r}),this.mindMap.on("mousemove",e=>{if(this.mindMap.opt.readonly||!this.isMousedown)return;e.preventDefault();const{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,!this.isDragging&&Math.abs(t-this.mouseDownX)<=this.checkDragOffset&&Math.abs(n-this.mouseDownY)<=this.checkDragOffset||(this.mindMap.emit("node_dragging"),this.handleStartMove(),this.onMove(t,n,e))}),this.onMouseup=this.onMouseup.bind(this),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("mouseup",this.onMouseup)}onMouseup(e){if(!this.isMousedown)return;this.isMousedown=!1,this.beingDragNodeList.forEach(e=>{e.setOpacity(1),e.showChildren(),e.endDrag()}),this.removeCloneNode();let t=this.overlapNode?this.overlapNode.getData("uid"):"",n=this.prevNode?this.prevNode.getData("uid"):"",r=this.nextNode?this.nextNode.getData("uid"):"";if(this.overlapNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!1),this.mindMap.execCommand("MOVE_NODE_TO",this.beingDragNodeList,this.overlapNode);else if(this.prevNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.prevNode,!1),this.mindMap.execCommand("INSERT_AFTER",this.beingDragNodeList,this.prevNode);else if(this.nextNode)this.mindMap.execCommand("SET_NODE_ACTIVE",this.nextNode,!1),this.mindMap.execCommand("INSERT_BEFORE",this.beingDragNodeList,this.nextNode);else if(this.clone&&this.mindMap.opt.enableFreeDrag&&1===this.beingDragNodeList.length){let{x:t,y:n}=this.mindMap.toPos(e.clientX-this.offsetX,e.clientY-this.offsetY),{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.drawTransform;t=(t-o)/r,n=(n-a)/i,this.mousedownNode.left=t,this.mousedownNode.top=n,this.mousedownNode.customLeft=t,this.mousedownNode.customTop=n,this.mindMap.execCommand("SET_NODE_CUSTOM_POSITION",this.mousedownNode,t,n),this.mindMap.render()}this.isDragging&&this.mindMap.emit("node_dragend",{overlapNodeUid:t,prevNodeUid:n,nextNodeUid:r}),this.reset()}onMove(e,t,n){if(!this.isMousedown)return;let{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.drawTransform,s=e-this.offsetX,l=t-this.offsetY;e=(s-o)/r,t=(l-a)/i;let c=this.clone.transform();this.clone.translate(e-c.translateX,t-c.translateY),this.checkOverlapNode(),this.mindMap.opt.autoMoveWhenMouseInEdgeOnDrag&&this.mindMap.select&&(this.drawTransform=this.mindMap.draw.transform(),this.mindMap.select.clearAutoMoveTimer(),this.mindMap.select.onMove(n.clientX,n.clientY))}handleStartMove(){if(!this.isDragging){this.isDragging=!0;let e=this.mousedownNode;this.drawTransform=this.mindMap.draw.transform();let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.drawTransform;this.offsetX=this.mouseDownX-(e.left*t+r),this.offsetY=this.mouseDownY-(e.top*n+i),e.getData("isActive")?this.beingDragNodeList=Object(v["A"])(this.mindMap.renderer.activeNodeList.filter(e=>!e.isRoot&&!e.isGeneralization)):this.beingDragNodeList=[e],this.nodeTreeToList(),this.createCloneNode(),this.mindMap.execCommand("CLEAR_ACTIVE_NODE")}}nodeTreeToList(){const e=[];Object(v["d"])(this.mindMap.renderer.root,t=>{this.checkIsInBeingDragNodeList(t)||(e[t.layerIndex]||(e[t.layerIndex]=[]),e[t.layerIndex].push(t))}),this.nodeList=e.reduceRight((e,t)=>[...e,...t],[])}createCloneNode(){if(!this.clone){const{dragMultiNodeRectConfig:e,dragPlaceholderRectFill:t,dragOpacityConfig:n}=this.mindMap.opt,{width:r,height:i,fill:o}=e,a=this.beingDragNodeList[0],s=a.style.merge("lineColor",!0);if(this.beingDragNodeList.length>1)this.clone=this.mindMap.otherDraw.rect().size(r,i).radius(i/2).fill({color:o||s}),this.offsetX=r/2,this.offsetY=i/2;else{this.clone=a.group.clone();const e=this.clone.findOne(".smm-expand-btn");e&&e.remove(),this.mindMap.otherDraw.add(this.clone)}this.clone.opacity(n.cloneNodeOpacity),this.clone.css("z-index",99999),this.placeholder=this.mindMap.otherDraw.rect().fill({color:t||s}),this.beingDragNodeList.forEach(e=>{e.setOpacity(n.beingDragNodeOpacity),e.hideChildren(),e.startDrag()})}}removeCloneNode(){this.clone&&(this.clone.remove(),this.placeholder.remove())}checkOverlapNode(){this.drawTransform&&this.placeholder&&(this.overlapNode=null,this.prevNode=null,this.nextNode=null,this.placeholder.size(0,0),this.nodeList.forEach(e=>{if(e.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",e,!1),!(this.overlapNode||this.prevNode&&this.nextNode))switch(this.mindMap.opt.layout){case"logicalStructure":this.handleLogicalStructure(e);break;case"mindMap":this.handleMindMap(e);break;case"organizationStructure":this.handleOrganizationStructure(e);break;case"catalogOrganization":this.handleCatalogOrganization(e);break;case"timeline":this.handleTimeLine(e);break;case"timeline2":this.handleTimeLine2(e);break;case"verticalTimeline":this.handleLogicalStructure(e);break;case"fishbone":this.handleFishbone(e);break;default:this.handleLogicalStructure(e)}}),this.overlapNode&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0))}handleVerticalCheck(e,t,n=!1){let r=this.mouseMoveX,i=this.mouseMoveY,o=this.getNodeRect(e);n&&(t=t.reverse());let a=o.height/4,{prevBrotherOffset:s,nextBrotherOffset:l}=this.getNodeDistanceToSiblingNode(t,e,o,"v");if(o.left<=r&&o.right>=r){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=l>0?i>o.bottom&&i<=o.bottom+l:i>=o.bottom-a&&i<=o.bottom,r=s>0?i=o.top-s:i>=o.top&&i<=o.top+a;if(t){n?this.nextNode=e:this.prevNode=e;let t=this.formatPlaceholderSize(l);this.setPlaceholderRect(e.width,t,o.originLeft,o.originBottom)}else if(r){n?this.prevNode=e:this.nextNode=e;let t=this.formatPlaceholderSize(s);this.setPlaceholderRect(e.width,t,o.originLeft,o.originTop-t)}}this.checkIsOverlap({node:e,dir:"v",prevBrotherOffset:s,nextBrotherOffset:l,size:a,pos:i,nodeRect:o})}}handleHorizontalCheck(e,t){let n=this.mouseMoveX,r=this.mouseMoveY,i=this.getNodeRect(e),o=i.width/4,{prevBrotherOffset:a,nextBrotherOffset:s}=this.getNodeDistanceToSiblingNode(t,e,i,"h");if(i.top<=r&&i.bottom>=r){if(!this.overlapNode&&!this.prevNode&&!this.nextNode&&!e.isRoot){let t=s>0?n=i.right:n<=i.right&&n>=i.right-o,r=a>0?n>i.left-a&&n<=i.left:n<=i.left+o&&n>=i.left;if(t){this.prevNode=e;let t=this.formatPlaceholderSize(s);this.setPlaceholderRect(t,e.height,i.originRight,i.originTop)}else if(r){this.nextNode=e;let t=this.formatPlaceholderSize(a);this.setPlaceholderRect(t,e.height,i.originLeft-t,i.originTop)}}this.checkIsOverlap({node:e,dir:"h",prevBrotherOffset:a,nextBrotherOffset:s,size:o,pos:n,nodeRect:i})}}getNodeDistanceToSiblingNode(e,t,n,r){let i="v"===r?"top":"left",o="v"===r?"bottom":"right",a=Object(v["w"])(t,e),s=null,l=null;-1!==a&&(a-1>=0&&(s=e[a-1]),a+1<=e.length-1&&(l=e[a+1]));let c=0;if(s){let e=this.getNodeRect(s);c=n[i]-e[o],c=c>=this.minOffset?c/2:0}else c=this.minOffset;let u=0;if(l){let e=this.getNodeRect(l);u=e[i]-n[o],u=u>=this.minOffset?u/2:0}else u=this.minOffset;return{prevBrotherOffset:c,nextBrotherOffset:u}}formatPlaceholderSize(e){const{nodeDragPlaceholderMaxSize:t}=this.mindMap.opt;return e>0?Math.min(e,t):5}setPlaceholderRect(e,t,n,r){this.placeholder.size(e,t).move(n,r)}checkIsOverlap({node:e,dir:t,prevBrotherOffset:n,nextBrotherOffset:r,size:i,pos:o,nodeRect:a}){let s="v"===t?"top":"left",l="v"===t?"bottom":"right";this.overlapNode||this.prevNode||this.nextNode||a[s]+(n>0?0:i)<=o&&a[l]-(r>0?0:i)>=o&&(this.overlapNode=e)}handleLogicalStructure(e){const t=this.commonGetNodeCheckList(e);this.handleVerticalCheck(e,t)}handleMindMap(e){const t=e.parent?e.parent.children.filter(t=>{let n=!0;return 1===e.layerIndex&&(n=t.dir===e.dir),n&&!this.checkIsInBeingDragNodeList(t)}):[];this.handleVerticalCheck(e,t)}handleOrganizationStructure(e){const t=this.commonGetNodeCheckList(e);this.handleHorizontalCheck(e,t)}handleCatalogOrganization(e){const t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine(e){let t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):this.handleVerticalCheck(e,t)}handleTimeLine2(e){let t=this.commonGetNodeCheckList(e);1===e.layerIndex?this.handleHorizontalCheck(e,t):"top"===e.dir&&2===e.layerIndex?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}handleFishbone(e){let t=e.parent?e.parent.children.filter(e=>e.layerIndex>1&&!this.checkIsInBeingDragNodeList(e)):[];1===e.layerIndex?this.handleHorizontalCheck(e,t):"top"===e.dir&&2===e.layerIndex?this.handleVerticalCheck(e,t,!0):this.handleVerticalCheck(e,t)}commonGetNodeCheckList(e){return e.parent?[...e.parent.children].filter(e=>!this.checkIsInBeingDragNodeList(e)):[]}getNodeRect(e){let{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.drawTransform,{left:o,top:a,width:s,height:l}=e,c=o,u=a,h=a+l,d=o+s,f=(o+s)*t+r,p=(a+l)*n+i;return o=o*t+r,a=a*n+i,{width:s,height:l,left:o,top:a,right:f,bottom:p,originLeft:c,originTop:u,originBottom:h,originRight:d}}checkIsInBeingDragNodeList(e){return!!this.beingDragNodeList.find(t=>t.uid===e.uid||t.isAncestor(e))}}Gd.instanceName="drag";var Wd=Gd;class Vd{constructor({mindMap:e}){this.mindMap=e,this.rect=null,this.isMousedown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseMoveX=0,this.mouseMoveY=0,this.isSelecting=!1,this.cacheActiveList=[],this.bindEvent()}bindEvent(){this.checkInNodes=Object(v["cb"])(this.checkInNodes,300,this),this.mindMap.on("mousedown",e=>{if(this.mindMap.opt.readonly)return;let{useLeftKeySelectionRightKeyDrag:t}=this.mindMap.opt;if(!e.ctrlKey&&(t?1!==e.which:3!==e.which))return;e.preventDefault(),this.isMousedown=!0,this.cacheActiveList=[...this.mindMap.renderer.activeNodeList];let{x:n,y:r}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseDownX=n,this.mouseDownY=r,this.createRect(n,r)}),this.mindMap.on("mousemove",e=>{if(this.mindMap.opt.readonly)return;if(!this.isMousedown)return;let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY);this.mouseMoveX=t,this.mouseMoveY=n,Math.abs(t-this.mouseDownX)<=10&&Math.abs(n-this.mouseDownY)<=10||(this.clearAutoMoveTimer(),this.onMove(e.clientX,e.clientY,()=>{this.isSelecting=!0,this.rect.plot([[this.mouseDownX,this.mouseDownY],[this.mouseMoveX,this.mouseDownY],[this.mouseMoveX,this.mouseMoveY],[this.mouseDownX,this.mouseMoveY]]),this.checkInNodes()},(e,t)=>{switch(e){case"left":this.mouseDownX+=t;break;case"top":this.mouseDownY+=t;break;case"right":this.mouseDownX-=t;break;case"bottom":this.mouseDownY-=t;break;default:break}}))}),this.onMouseup=this.onMouseup.bind(this),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup)}onMouseup(){this.mindMap.opt.readonly||this.isMousedown&&(this.checkTriggerNodeActiveEvent(),clearTimeout(this.autoMoveTimer),this.isMousedown=!1,this.cacheActiveList=[],this.rect&&this.rect.remove(),this.rect=null,setTimeout(()=>{this.isSelecting=!1},0))}checkTriggerNodeActiveEvent(){let e=this.cacheActiveList.length!==this.mindMap.renderer.activeNodeList.length,t=!1;if(!e)for(let n=0;nt.getData("uid")===e.getData("uid"))){t=!0;break}}(e||t)&&this.mindMap.renderer.emitNodeActiveEvent()}onMove(e,t,n=(()=>{}),r=(()=>{})){n();let i=this.mindMap.opt.selectTranslateStep,o=this.mindMap.opt.selectTranslateLimit,a=0;e<=this.mindMap.elRect.left+o&&(r("left",i),this.mindMap.view.translateX(i),a++),e>=this.mindMap.elRect.right-o&&(r("right",i),this.mindMap.view.translateX(-i),a++),t<=this.mindMap.elRect.top+o&&(r("top",i),this.mindMap.view.translateY(i),a++),t>=this.mindMap.elRect.bottom-o&&(r("bottom",i),this.mindMap.view.translateY(-i),a++),a>0&&this.startAutoMove(e,t,n,r)}startAutoMove(e,t,n,r){this.autoMoveTimer=setTimeout(()=>{this.onMove(e,t,n,r)},20)}clearAutoMoveTimer(){clearTimeout(this.autoMoveTimer)}createRect(e,t){this.rect&&this.rect.remove(),this.rect=this.mindMap.svg.polygon().stroke({color:"#0984e3"}).fill({color:"rgba(9,132,227,0.3)"}).plot([[e,t]])}checkInNodes(){let{scaleX:e,scaleY:t,translateX:n,translateY:r}=this.mindMap.draw.transform(),i=Math.min(this.mouseDownX,this.mouseMoveX),o=Math.min(this.mouseDownY,this.mouseMoveY),a=Math.max(this.mouseDownX,this.mouseMoveX),s=Math.max(this.mouseDownY,this.mouseMoveY);Object(v["d"])(this.mindMap.renderer.root,l=>{let{left:c,top:u,width:h,height:d}=l,f=(c+h)*e+n,p=(u+d)*t+r;if(c=c*e+n,u=u*t+r,Object(v["j"])(i,a,o,s,c,f,u,p)){if(l.getData("isActive"))return;this.mindMap.renderer.addNodeToActiveList(l)}else if(l.getData("isActive")){if(!l.getData("isActive"))return;this.mindMap.renderer.removeNodeFromActiveList(l)}})}hasSelectRange(){return this.isSelecting}}Vd.instanceName="select";var Yd=Vd,Zd=n("4f98"),Kd=n.n(Zd),Xd=n("a872"),Jd=n.n(Xd);n("5ba9");let Qd=!1,$d=["宋体, SimSun, Songti SC","微软雅黑, Microsoft YaHei","楷体, 楷体_GB2312, SimKai, STKaiti","黑体, SimHei, Heiti SC","隶书, SimLi","andale mono","arial, helvetica, sans-serif","arial black, avant garde","comic sans ms","impact, chicago","times new roman","sans-serif","serif"],ef=new Array(100).fill(0).map((e,t)=>t+"px");class tf{constructor({mindMap:e,pluginOpt:t}){this.mindMap=e,this.pluginOpt=t,this.textEditNode=null,this.showTextEdit=!1,this.quill=null,this.range=null,this.lastRange=null,this.pasteUseRange=null,this.node=null,this.isInserting=!1,this.styleEl=null,this.cacheEditingText="",this.lostStyle=!1,this.isCompositing=!1,this.initOpt(),this.extendQuill(),this.appendCss(),this.bindEvent(),this.mindMap.opt.data&&(this.mindMap.opt.data=this.handleSetData(this.mindMap.opt.data))}bindEvent(){this.onCompositionStart=this.onCompositionStart.bind(this),this.onCompositionEnd=this.onCompositionEnd.bind(this),window.addEventListener("compositionstart",this.onCompositionStart),window.addEventListener("compositionend",this.onCompositionEnd)}unbindEvent(){window.removeEventListener("compositionstart",this.onCompositionStart),window.removeEventListener("compositionend",this.onCompositionEnd)}appendCss(){let e="\n .ql-editor {\n overflow: hidden;\n padding: 0;\n height: auto;\n line-height: normal;\n -webkit-user-select: text;\n }\n \n .ql-container {\n height: auto;\n font-size: inherit;\n }\n\n .ql-container.ql-snow {\n border: none;\n }\n\n .smm-richtext-node-wrap p {\n font-family: auto;\n }\n\n .smm-richtext-node-edit-wrap p {\n font-family: auto;\n }\n ";this.styleEl=document.createElement("style"),this.styleEl.type="text/css",this.styleEl.innerHTML=e,document.head.appendChild(this.styleEl)}initOpt(){this.pluginOpt.fontFamilyList&&Array.isArray(this.pluginOpt.fontFamilyList)&&($d=this.pluginOpt.fontFamilyList),this.pluginOpt.fontSizeList&&Array.isArray(this.pluginOpt.fontSizeList)&&(ef=this.pluginOpt.fontSizeList)}extendQuill(){if(Qd)return;Qd=!0;const e=Kd.a.import("attributors/class/font");e.whitelist=$d,Kd.a.register(e,!0);const t=Kd.a.import("attributors/style/font");t.whitelist=$d,Kd.a.register(t,!0);const n=Kd.a.import("attributors/class/size");n.whitelist=ef,Kd.a.register(n,!0);const r=Kd.a.import("attributors/style/size");r.whitelist=ef,Kd.a.register(r,!0)}showEditText({node:e,rect:t,isInserting:n,isFromKeyDown:r,isFromScale:i}){if(this.showTextEdit)return;const{richTextEditFakeInPlace:o,customInnerElsAppendTo:a,nodeTextEditZIndex:s,textAutoWrapWidth:l,selectTextOnEnterEditText:c}=this.mindMap.opt;this.node=e,this.isInserting=n,t||(t=e._textData.node.node.getBoundingClientRect()),i||this.mindMap.emit("before_show_text_edit"),this.mindMap.renderer.textEdit.registerTmpShortcut();let u=e._textData.node,h=u.attr("data-width"),d=u.attr("data-height"),f=t.width/h,p=t.height/d,m=6,g=4;if(o){let t=e.getPaddingVale();m=t.paddingX,g=t.paddingY}if(!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.classList.add("smm-richtext-node-edit-wrap"),this.textEditNode.style.cssText=`\n position:fixed; \n box-sizing: border-box; \n box-shadow: 0 0 20px rgba(0,0,0,.5);\n outline: none; \n word-break: \n break-all;padding: ${g}px ${m}px;\n `,this.textEditNode.addEventListener("click",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("mousedown",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("keydown",e=>{this.mindMap.renderer.textEdit.checkIsAutoEnterTextEditKey(e)&&e.stopPropagation()});const e=a||document.body;e.appendChild(this.textEditNode)}let b=e.style.merge("fillColor"),y=e.style.merge("color");if(this.textEditNode.style.marginLeft=`-${m*f}px`,this.textEditNode.style.marginTop=`-${g*p}px`,this.textEditNode.style.zIndex=s,this.textEditNode.style.backgroundColor="transparent"===b?Object(v["J"])(y)?Object(v["C"])(this.mindMap.themeConfig):"#fff":b,this.textEditNode.style.minWidth=h+2*m+"px",this.textEditNode.style.minHeight=d+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px",this.textEditNode.style.display="block",this.textEditNode.style.maxWidth=l+2*m+"px",this.textEditNode.style.transform=`scale(${f}, ${p})`,this.textEditNode.style.transformOrigin="left top",o&&(this.textEditNode.style.borderRadius=(e.style.merge("borderRadius")||5)+"px","roundedRectangle"==e.style.merge("shape")&&(this.textEditNode.style.borderRadius=(e.height||50)+"px")),e.getData("richText"))this.textEditNode.innerHTML=this.cacheEditingText||e.getData("text");else{let t="";Object(v["I"])(e.getData("text"))||(t=String(e.getData("text")).split(/\n/gim).join("
"));let n=`

${t}

`;this.textEditNode.innerHTML=this.cacheEditingText||n}this.initQuillEditor(),document.querySelector(".ql-editor").style.minHeight=d+"px",this.showTextEdit=!0,this.focus(n||c&&!r?0:null),e.getData("richText")||this.setTextStyleIfNotRichText(e),this.cacheEditingText=""}setTextStyleIfNotRichText(e){let t={font:e.style.merge("fontFamily"),color:e.style.merge("color"),italic:"italic"===e.style.merge("fontStyle"),bold:"bold"===e.style.merge("fontWeight"),size:e.style.merge("fontSize")+"px",underline:"underline"===e.style.merge("textDecoration"),strike:"line-through"===e.style.merge("textDecoration")};this.pureFormatAllText(t)}getEditText(){let e=this.quill.container.firstChild.innerHTML;return e.replace(/


<\/p>$/,"")}hideEditText(e){if(!this.showTextEdit)return;let t=this.getEditText(),n=e&&e.length>0?e:this.mindMap.renderer.activeNodeList;n.forEach(e=>{this.mindMap.execCommand("SET_NODE_TEXT",e,t,!0),e.isGeneralization&&e.generalizationBelongNode.updateGeneralization(),this.mindMap.render()}),this.mindMap.emit("hide_text_edit",this.textEditNode,n),this.textEditNode.style.display="none",this.showTextEdit=!1,this.mindMap.emit("rich_text_selection_change",!1),this.node=null,this.isInserting=!1}initQuillEditor(){this.quill=new Kd.a(this.textEditNode,{modules:{toolbar:!1,keyboard:{bindings:{enter:{key:13,handler:function(){}},tab:{key:9,handler:function(){}}}}},theme:"snow"}),this.quill.on("selection-change",e=>{if(!this.isInserting&&(this.lastRange=this.range,this.range=null,e)){this.pasteUseRange=e;let t=this.quill.getBounds(e.index,e.length),n=this.textEditNode.getBoundingClientRect(),r={left:t.left+n.left,top:t.top+n.top,right:t.right+n.left,bottom:t.bottom+n.top,width:t.width},i=this.quill.getFormat(e.index,e.length),o=!1;0==e.length?o=!1:(this.range=e,o=!0),this.mindMap.emit("rich_text_selection_change",o,r,i)}}),this.quill.on("text-change",()=>{let e=this.quill.getContents(),t=e.ops.length;t<=0||1===t&&"\n"===e.ops[0].insert?(this.lostStyle=!0,this.syncFormatToNodeConfig(null,!0)):this.lostStyle&&!this.isCompositing&&(this.setTextStyleIfNotRichText(this.node),this.lostStyle=!1)}),this.quill.clipboard.addMatcher(Node.TEXT_NODE,e=>{let t=this.getPasteTextStyle();return(new Jd.a).insert(e.data,t)}),this.quill.clipboard.addMatcher(Node.ELEMENT_NODE,(e,t)=>{let n=[],r=this.getPasteTextStyle();return t.ops.forEach(e=>{e.insert&&"string"===typeof e.insert&&"\n"!==e.insert&&n.push({attributes:{...r},insert:e.insert})}),t.ops=n,t})}getPasteTextStyle(){return this.pasteUseRange?this.quill.getFormat(this.pasteUseRange.index,this.pasteUseRange.length):{}}onCompositionStart(){this.showTextEdit&&(this.isCompositing=!0)}onCompositionEnd(){this.showTextEdit&&(this.isCompositing=!1,this.lostStyle&&this.setTextStyleIfNotRichText(this.node))}selectAll(){this.quill.setSelection(0,this.quill.getLength())}focus(e){let t=this.quill.getLength();this.quill.setSelection("number"===typeof e?e:t,t)}formatText(e={},t=!1){if(!this.range&&!this.lastRange)return;this.syncFormatToNodeConfig(e,t);let n=!this.range,r=n?this.lastRange:this.range;t?this.quill.removeFormat(r.index,r.length):this.quill.formatText(r.index,r.length,e),n&&this.quill.setSelection(this.lastRange.index,this.lastRange.length)}removeFormat(){this.formatText({},!0)}formatRangeText(e,t={}){e&&(this.syncFormatToNodeConfig(t),this.quill.formatText(e.index,e.length,t))}formatAllText(e={}){this.syncFormatToNodeConfig(e),this.pureFormatAllText(e)}pureFormatAllText(e={}){this.quill.formatText(0,this.quill.getLength(),e)}syncFormatToNodeConfig(e,t){if(this.node)if(t)["fontFamily","fontSize","fontWeight","fontStyle","textDecoration","color"].forEach(e=>{delete this.node.nodeData.data[e]});else{let t=this.richTextStyleToNormalStyle(e);this.mindMap.execCommand("SET_NODE_DATA",this.node,t)}}normalStyleToRichTextStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"fontFamily":t.font=r;break;case"fontSize":t.size=r+"px";break;case"fontWeight":t.bold="bold"===r;break;case"fontStyle":t.italic="italic"===r;break;case"textDecoration":t.underline="underline"===r,t.strike="line-through"===r;break;case"color":t.color=r;break;default:break}}),t}richTextStyleToNormalStyle(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];switch(n){case"font":t.fontFamily=r;break;case"size":t.fontSize=parseFloat(r);break;case"bold":t.fontWeight=r?"bold":"normal";break;case"italic":t.fontStyle=r?"italic":"normal";break;case"underline":t.textDecoration=r?"underline":"none";break;case"strike":t.textDecoration=r?"line-through":"none";break;case"color":t.color=r;break;default:break}}),t}setNotActiveNodeStyle(e,t){const n=this.normalStyleToRichTextStyle(t);Object.keys(n).length>0&&(this.showEditText({node:e}),this.formatAllText(n),this.hideEditText([e]))}async handleExportPng(e){let t=document.createElement("div");t.style.position="absolute",t.style.left="-9999999px",t.appendChild(e),this.mindMap.el.appendChild(t);let n=e=>{e.style.margin=0,e.style.padding=0,e.hasChildNodes()&&Array.from(e.children).forEach(e=>{n(e)})};n(e);const r=await domtoimage.toPng(t);return this.mindMap.el.removeChild(t),r}transformAllNodesToNormalNode(){Object(v["db"])(this.mindMap.renderer.renderTree,null,e=>{e.data.richText&&(e.data.richText=!1,e.data.text=Object(v["z"])(e.data.text))},null,!0,0,0),this.mindMap.command.clearHistory(),this.mindMap.command.addHistory(),this.mindMap.render(null,oo["a"].TRANSFORM_TO_NORMAL_NODE)}handleSetData(e){let t=e=>{e.data&&!e.data.richText&&(e.data.richText=!0,e.data.resetRichText=!0),e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e)})};return t(e),e}beforePluginRemove(){this.transformAllNodesToNormalNode(),document.head.removeChild(this.styleEl),this.unbindEvent()}beforePluginDestroy(){document.head.removeChild(this.styleEl),this.unbindEvent()}}tf.instanceName="richText";var nf=tf,rf=n("0f9c");const of=(e,t)=>e.getData("associativeLineTargets").findIndex(e=>e===t.getData("uid")),af=(e,t,n,r)=>{let i=e+(n-e)/2,o=t,a=i,s=r;return Math.abs(e-n)<=5&&(i=e+(r-t)/2,a=i),[{x:i,y:o},{x:a,y:s}]},sf=(e,t,n,r)=>`M ${e.x},${e.y} C ${n.x},${n.y} ${r.x},${r.y} ${t.x},${t.y}`,lf=e=>{let{left:t,top:n,width:r,height:i}=e;return{right:t+r,bottom:n+i,left:t,top:n}},cf=(e,t,n,r)=>{let i=af(e,t,n,r);return sf({x:e,y:t},{x:n,y:r},i[0],i[1])},uf=(e,t)=>{const{left:n,top:r,translateLeft:i,translateTop:o,width:a,height:s}=e,l=t.clientX,c=t.clientY,u=i+a/2,h=o+s/2,d=n+a/2,f=r+s/2,p=Math.atan(s/a),m=l-u,g=h-c,v=Math.atan2(g,m);let b=n+a,y=r+s;if(v=-p){const e=v*(a/2);return(v=0||v>=-p&&v<0)&&(y=f-e),{x:b,y:y,dir:"right",range:e}}if(v>=p&&v=p){const t=s/2/v;e=-t,b=d+t}else if(v>=Math.PI/2-p&&v=p-Math.PI){let e=0;if(v>=p-Math.PI/2&&v<-p){const t=s/2/v;e=t,b=d-t}else if(v=p-Math.PI){const t=(u-l)/(h-c),n=s/2*t;e=-n,b=d+n}return{x:b,y:y,dir:"bottom",range:e}}b=n;const w=(h-c)/(u-l),x=w*(a/2);return(v>=-Math.PI&&v=Math.PI-p)&&(y=f-x),{x:b,y:y,dir:"left",range:x}},hf=(e,t="right",n=0,r=null)=>{let{left:i,top:o,width:a,height:s}=e;if(r)return uf(e,r);switch(t){case"left":return{x:i,y:o+s/2-n};case"right":return{x:i+a,y:o+s/2-n};case"top":return{x:i+a/2-n,y:o};case"bottom":return{x:i+a/2-n,y:o+s};default:break}},df=(e,t)=>{let n=lf(e),r=(n.right+n.left)/2,i=(n.bottom+n.top)/2,o=lf(t),a=(o.right+o.left)/2,s=(o.bottom+o.top)/2,l=a-r,c=s-i;if(0===l&&0===c)return[];let u="",h="";return l<=0&&l<=c&&l<=-c?(u="left",h="right"):l>0&&l>=-c&&l>=c?(u="right",h="left"):c<=0&&c0&&-cl&&(u="right",h="right"),[hf(e,u),hf(t,h)]},ff=(e,t,n,r)=>{let i=of(n,r),o=[],a=n.getData("associativeLineTargetControlOffsets");if(a&&a[i]){let n=a[i];o=[{x:e.x+n[0].x,y:e.y+n[0].y},{x:t.x+n[1].x,y:t.y+n[1].y}]}else o=af(e.x,e.y,t.x,t.y);return{path:sf(e,t,o[0],o[1]),controlPoints:o}},pf=(e,t)=>{let n=af(e.x,e.y,t.x,t.y);return[{x:n[0].x-e.x,y:n[0].y-e.y},{x:n[1].x-t.x,y:n[1].y-t.y}]};function mf(){let{associativeLineActiveColor:e}=this.mindMap.themeConfig;this.controlLine1=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlLine2=this.associativeLineDraw.line().stroke({color:e,width:2}),this.controlPoint1=this.createOneControlNode("controlPoint1"),this.controlPoint2=this.createOneControlNode("controlPoint2")}function gf(e){let{associativeLineActiveColor:t}=this.mindMap.themeConfig;return this.associativeLineDraw.circle(this.controlPointDiameter).stroke({color:t}).fill({color:"#fff"}).click(e=>{e.stopPropagation()}).mousedown(t=>{this.onControlPointMousedown(t,e)})}function vf(e,t){e.stopPropagation(),this.isControlPointMousedown=!0,this.mousedownControlPointKey=t}function bf(e){if(!this.isControlPointMousedown||!this.mousedownControlPointKey||!this[this.mousedownControlPointKey])return;e.stopPropagation(),e.preventDefault();let t=this.controlPointDiameter/2,{x:n,y:r}=this.getTransformedEventPos(e);this.controlPointMousemoveState.pos={x:n,y:r},this[this.mousedownControlPointKey].x(n-t).y(r-t);let[,,,i,o]=this.activeLine,a=of(i,o),{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=i.getData();s=s||[];const c=this.getNodePos(i),u=this.getNodePos(o);let[h,d]=this.updateAllLinesPos(i,o,s[a]);this.controlPointMousemoveState.startPoint=h,this.controlPointMousemoveState.endPoint=d,this.controlPointMousemoveState.targetIndex=a;let f=[];f=l?l[a]:pf(h,d);let p=null,m=null;const{x:g,y:v}=this.mindMap.toPos(e.clientX,e.clientY),b={clientX:g,clientY:v};"controlPoint1"===this.mousedownControlPointKey?(h=hf(c,"",0,b),p={x:n,y:r},m={x:d.x+f[1].x,y:d.y+f[1].y},h&&(this.controlPointMousemoveState.startPoint=h,this.controlLine1.plot(h.x,h.y,p.x,p.y))):(d=hf(u,"",0,b),p={x:h.x+f[0].x,y:h.y+f[0].y},m={x:n,y:r},d&&(this.controlPointMousemoveState.endPoint=d,this.controlLine2.plot(d.x,d.y,m.x,m.y))),this.updataAassociativeLine(h,d,p,m,this.activeLine)}function yf(e,t,n,r,i){const[o,a,s]=i,l=sf(e,t,n,r);o.plot(l),a.plot(l),this.updateTextPos(o,s),this.updateTextEditBoxPos(s)}function wf(e){if(!this.isControlPointMousedown)return;e.stopPropagation(),e.preventDefault();let{pos:t,startPoint:n,endPoint:r,targetIndex:i}=this.controlPointMousemoveState,[,,,o]=this.activeLine,a=[],{associativeLinePoint:s,associativeLineTargetControlOffsets:l}=o.getData();s||(s=[]),s[i]=s[i]||{startPoint:n,endPoint:r},l?a=l:a[i]=pf(n,r);let c=null,u=null;"controlPoint1"===this.mousedownControlPointKey?(c={x:t.x-n.x,y:t.y-n.y},u=a[i][1],s[i].startPoint=n):(c=a[i][0],u={x:t.x-r.x,y:t.y-r.y},s[i].endPoint=r),a[i]=[c,u],this.mindMap.execCommand("SET_NODE_DATA",o,{associativeLineTargetControlOffsets:a,associativeLinePoint:s}),setTimeout(()=>{this.resetControlPoint()},0)}function xf(){this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""}}function kf(e,t,n,r){this.controlLine1||this.createControlNodes();let i=this.controlPointDiameter/2;this.controlLine1.plot(e.x,e.y,n.x,n.y),this.controlLine2.plot(t.x,t.y,r.x,r.y),this.controlPoint1.x(n.x-i).y(n.y-i),this.controlPoint2.x(r.x-i).y(r.y-i)}function Af(){this.controlLine1&&([this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.remove()}),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null)}function Cf(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.hide()})}function Ef(){this.controlLine1&&[this.controlLine1,this.controlLine2,this.controlPoint1,this.controlPoint2].forEach(e=>{e.show()})}var Sf={createControlNodes:mf,createOneControlNode:gf,onControlPointMousedown:vf,onControlPointMousemove:bf,onControlPointMouseup:wf,resetControlPoint:xf,renderControls:kf,removeControls:Af,hideControls:Cf,showControls:Ef,updataAassociativeLine:yf};function Tf(e){let t=this.associativeLineDraw.group();const n=()=>{this.activeLine&&this.activeLine[3]===e.node&&this.activeLine[4]===e.toNode||this.setActiveLine({...e,text:t})};return t.click(e=>{e.stopPropagation(),n()}),t.on("dblclick",e=>{e.stopPropagation(),n(),this.activeLine&&this.showEditTextBox(t)}),t}function Nf(e){if(this.mindMap.emit("before_show_text_edit"),this.mindMap.keyCommand.addShortcut("Enter",()=>{this.hideEditTextBox()}),!this.textEditNode){this.textEditNode=document.createElement("div"),this.textEditNode.style.cssText="position:fixed;box-sizing: border-box;background-color:#fff;box-shadow: 0 0 20px rgba(0,0,0,.5);padding: 3px 5px;margin-left: -5px;margin-top: -3px;outline: none; word-break: break-all;",this.textEditNode.setAttribute("contenteditable",!0),this.textEditNode.addEventListener("keyup",e=>{e.stopPropagation()}),this.textEditNode.addEventListener("click",e=>{e.stopPropagation()});const e=this.mindMap.opt.customInnerElsAppendTo||document.body;e.appendChild(this.textEditNode)}let{associativeLineTextFontSize:t,associativeLineTextFontFamily:n,associativeLineTextLineHeight:r}=this.mindMap.themeConfig,{defaultAssociativeLineText:i,nodeTextEditZIndex:o}=this.mindMap.opt,a=this.mindMap.view.scale,[,,,s,l]=this.activeLine,c=this.getText(s,l),u=(c||i).split(/\n/gim);this.textEditNode.style.fontFamily=n,this.textEditNode.style.fontSize=t*a+"px",this.textEditNode.style.lineHeight=u.length>1?r:"normal",this.textEditNode.style.zIndex=o,this.textEditNode.innerHTML=u.join("
"),this.textEditNode.style.display="block",this.updateTextEditBoxPos(e),this.showTextEdit=!0,""===c||c===i?Object(v["Y"])(this.textEditNode):Object(v["q"])(this.textEditNode)}function Mf(){this.hideEditTextBox()}function Lf(e){let t=e.node.getBoundingClientRect();this.textEditNode&&(this.textEditNode.style.minWidth=t.width+10+"px",this.textEditNode.style.minHeight=t.height+6+"px",this.textEditNode.style.left=t.left+"px",this.textEditNode.style.top=t.top+"px")}function Of(){if(!this.showTextEdit)return;let[e,,t,n,r]=this.activeLine,i=Object(v["y"])(this.textEditNode.innerHTML),o=i===this.mindMap.opt.defaultAssociativeLineText;i=o?"":i,this.mindMap.execCommand("SET_NODE_DATA",n,{associativeLineText:{...n.getData("associativeLineText")||{},[r.getData("uid")]:i}}),this.textEditNode.style.display="none",this.textEditNode.innerHTML="",this.showTextEdit=!1,this.renderText(i,e,t),this.mindMap.emit("hide_text_edit")}function Df(e,t){let n=e.getData("associativeLineText");return n&&n[t.getData("uid")]||""}function Pf(e,t,n){if(!e)return;let{associativeLineTextFontSize:r,associativeLineTextLineHeight:i}=this.mindMap.themeConfig;n.clear();let o=e.split(/\n/gim);o.forEach((e,t)=>{let o=(new Cc).text(e);o.y(r*i*t),this.styleText(o),n.add(o)}),Rf(t,n)}function If(e){let{associativeLineTextColor:t,associativeLineTextFontSize:n,associativeLineTextFontFamily:r}=this.mindMap.themeConfig;e.fill({color:t}).css({"font-family":r,"font-size":n})}function Rf(e,t){let n=e.length(),r=e.pointAt(n/2),{width:i,height:o}=t.bbox();t.x(r.x-i/2),t.y(r.y-o/2)}var Ff={getText:Df,createText:Tf,styleText:If,onScale:Mf,showEditTextBox:Nf,hideEditTextBox:Of,updateTextEditBoxPos:Lf,renderText:Pf,updateTextPos:Rf};class zf{constructor(e={}){this.mindMap=e.mindMap,this.associativeLineDraw=this.mindMap.associativeLineDraw,this.lineList=[],this.activeLine=null,this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine=null,this.overlapNode=null,this.isNodeDragging=!1,this.markerPath=null,this.marker=this.createMarker(),this.controlLine1=null,this.controlLine2=null,this.controlPoint1=null,this.controlPoint2=null,this.controlPointDiameter=10,this.isControlPointMousedown=!1,this.mousedownControlPointKey="",this.controlPointMousemoveState={pos:null,startPoint:null,endPoint:null,targetIndex:""},this.checkOverlapNode=Object(v["cb"])(this.checkOverlapNode,100,this),Object.keys(Sf).forEach(e=>{this[e]=Sf[e].bind(this)}),Object.keys(Ff).forEach(e=>{this[e]=Ff[e].bind(this)}),this.bindEvent()}bindEvent(){this.renderAllLines=this.renderAllLines.bind(this),this.mindMap.on("node_tree_render_end",this.renderAllLines),this.mindMap.on("data_change",this.renderAllLines),this.mindMap.on("draw_click",()=>{this.isControlPointMousedown||this.clearActiveLine()}),this.mindMap.on("node_click",e=>{this.isCreatingLine?this.completeCreateLine(e):this.clearActiveLine()}),this.mindMap.keyCommand.addShortcut("Del|Backspace",this.removeLine.bind(this)),this.mindMap.command.add("ADD_ASSOCIATIVE_LINE",this.addLine.bind(this)),this.mindMap.on("mousemove",this.onMousemove.bind(this)),this.mindMap.on("node_dragging",this.onNodeDragging.bind(this)),this.mindMap.on("node_dragend",this.onNodeDragend.bind(this)),this.mindMap.on("mouseup",this.onControlPointMouseup.bind(this)),this.mindMap.on("scale",this.onScale)}createMarker(){return this.associativeLineDraw.marker(20,20,e=>{e.ref(12,5),e.size(10,10),e.attr("orient","auto-start-reverse"),this.markerPath=e.path("M0,0 L2,5 L0,10 L10,5 Z")})}updateAllLinesPos(e,t,n){n=n||{};let[r,i]=df(e,t),o=0,a="",s=0,l="";return n.startPoint&&(o=n.startPoint.range||0,a=n.startPoint.dir||"right",r=hf(e,a,o)),n.endPoint&&(s=n.endPoint.range||0,l=n.endPoint.dir||"right",i=hf(t,l,s)),[r,i]}renderAllLines(){this.removeAllLines(),this.removeControls(),this.clearActiveLine();let e=this.mindMap.renderer.root;if(!e)return;let t=new Map,n=new Map;Object(v["db"])(e,null,e=>{if(!e)return;let r=e.getData();r.associativeLineTargets&&r.associativeLineTargets.length>0&&n.set(e,r.associativeLineTargets),r.uid&&t.set(r.uid,e)},()=>{},!0,0),n.forEach((e,n)=>{e.forEach((e,r)=>{let i=t.get(e);if(!n||!i)return;const o=(n.getData("associativeLinePoint")||[])[r],[a,s]=this.updateAllLinesPos(n,i,o);this.drawLine(a,s,n,i)})})}drawLine(e,t,n,r){let{associativeLineWidth:i,associativeLineColor:o,associativeLineActiveWidth:a,associativeLineActiveColor:s}=this.mindMap.themeConfig;this.markerPath.stroke({color:o}).fill({color:o});let{path:l,controlPoints:c}=ff(e,t,n,r),u=this.associativeLineDraw.path();u.stroke({width:i,color:o,dasharray:[6,4]}).fill({color:"none"}),u.plot(l),u.marker("end",this.marker);let h=this.associativeLineDraw.path();h.stroke({width:a,color:"transparent"}).fill({color:"none"}),h.plot(l);let d=this.createText({path:u,clickPath:h,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:c});h.click(i=>{i.stopPropagation(),this.setActiveLine({path:u,clickPath:h,text:d,node:n,toNode:r,startPoint:e,endPoint:t,controlPoints:c})}),h.dblclick(()=>{this.activeLine&&this.showEditTextBox(d)}),this.renderText(this.getText(n,r),u,d),this.lineList.push([u,h,d,n,r])}setActiveLine({path:e,clickPath:t,text:n,node:r,toNode:i,startPoint:o,endPoint:a,controlPoints:s}){let{associativeLineActiveColor:l}=this.mindMap.themeConfig;this.mindMap.execCommand("CLEAR_ACTIVE_NODE"),this.clearActiveLine(),this.activeLine=[e,t,n,r,i],t.stroke({color:l}),this.getText(r,i)||this.renderText(this.mindMap.opt.defaultAssociativeLineText,e,n),this.renderControls(o,a,s[0],s[1]),this.mindMap.emit("associative_line_click",e,t,r,i),this.front()}removeAllLines(){this.lineList.forEach(e=>{e[0].remove(),e[1].remove(),e[2].remove()}),this.lineList=[]}createLineFromActiveNode(){if(this.mindMap.renderer.activeNodeList.length<=0)return;let e=this.mindMap.renderer.activeNodeList[0];this.createLine(e)}createLine(e){let{associativeLineWidth:t,associativeLineColor:n}=this.mindMap.themeConfig;!this.isCreatingLine&&e&&(this.front(),this.isCreatingLine=!0,this.creatingStartNode=e,this.creatingLine=this.associativeLineDraw.path(),this.creatingLine.stroke({width:t,color:n,dasharray:[6,4]}).fill({color:"none"}),this.creatingLine.marker("end",this.marker))}onMousemove(e){this.onControlPointMousemove(e),this.updateCreatingLine(e)}updateCreatingLine(e){if(!this.isCreatingLine)return;let{x:t,y:n}=this.getTransformedEventPos(e),r=hf(this.creatingStartNode),i=t>r.x?-10:10,o=cf(r.x,r.y,t+i,n);this.creatingLine.plot(o),this.checkOverlapNode(t,n)}getTransformedEventPos(e){let{x:t,y:n}=this.mindMap.toPos(e.clientX,e.clientY),{scaleX:r,scaleY:i,translateX:o,translateY:a}=this.mindMap.draw.transform();return{x:(t-o)/r,y:(n-a)/i}}getNodePos(e){const{scaleX:t,scaleY:n,translateX:r,translateY:i}=this.mindMap.draw.transform(),{left:o,top:a,width:s,height:l}=e;let c=o*t+r,u=a*n+i;return{left:o,top:a,translateLeft:c,translateTop:u,width:s,height:l}}checkOverlapNode(e,t){this.overlapNode=null,Object(v["d"])(this.mindMap.renderer.root,n=>{if(n.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",n,!1),n.uid===this.creatingStartNode.uid||this.overlapNode)return;let{left:r,top:i,width:o,height:a}=n,s=r+o,l=i+a;e>=r&&e<=s&&t>=i&&t<=l&&(this.overlapNode=n)}),this.overlapNode&&!this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!0)}completeCreateLine(e){this.creatingStartNode.uid!==e.uid&&(this.addLine(this.creatingStartNode,e),this.overlapNode&&this.overlapNode.getData("isActive")&&this.mindMap.execCommand("SET_NODE_ACTIVE",this.overlapNode,!1),this.isCreatingLine=!1,this.creatingStartNode=null,this.creatingLine.remove(),this.creatingLine=null,this.overlapNode=null,this.back())}addLine(e,t){if(!e||!t)return;let n=t.getData("uid");n||(n=Object(rf["a"])(),this.mindMap.execCommand("SET_NODE_DATA",t,{uid:n}));let r=e.getData("associativeLineTargets")||[];const i=r.some(e=>e===n);if(i)return;r.push(n);let[o,a]=df(e,t),s=af(o.x,o.y,a.x,a.y),l=e.getData("associativeLineTargetControlOffsets")||[];l[r.length-1]=[{x:s[0].x-o.x,y:s[0].y-o.y},{x:s[1].x-a.x,y:s[1].y-a.y}];let c=e.getData("associativeLinePoint")||[];c[r.length-1]={startPoint:o,endPoint:a},this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:r,associativeLineTargetControlOffsets:l,associativeLinePoint:c})}removeLine(){if(!this.activeLine)return;let[,,,e,t]=this.activeLine;this.removeControls();let{associativeLineTargets:n,associativeLinePoint:r,associativeLineTargetControlOffsets:i,associativeLineText:o}=e.getData();r=r||[];let a=of(e,t),s={};o&&Object.keys(o).forEach(e=>{e!==t.getData("uid")&&(s[e]=o[e])}),this.mindMap.execCommand("SET_NODE_DATA",e,{associativeLineTargets:n.filter((e,t)=>t!==a),associativeLinePoint:r.filter((e,t)=>t!==a),associativeLineTargetControlOffsets:i?i.filter((e,t)=>t!==a):[],associativeLineText:s})}clearActiveLine(){if(this.activeLine){let[,e,t,n,r]=this.activeLine;e.stroke({color:"transparent"}),this.hideEditTextBox(),this.getText(n,r)||t.clear(),this.activeLine=null,this.removeControls(),this.back()}}onNodeDragging(){this.isNodeDragging||(this.isNodeDragging=!0,this.lineList.forEach(e=>{e[0].hide(),e[1].hide(),e[2].hide()}),this.hideControls())}onNodeDragend(){this.isNodeDragging&&(this.lineList.forEach(e=>{e[0].show(),e[1].show(),e[2].show()}),this.showControls(),this.isNodeDragging=!1)}front(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||this.associativeLineDraw.front()}back(){this.mindMap.opt.associativeLineIsAlwaysAboveNode||(this.associativeLineDraw.back(),this.associativeLineDraw.forward())}}zf.instanceName="associativeLine";var Bf=zf;class _f{constructor({mindMap:e}){this.mindMap=e,this.touchesNum=0,this.singleTouchstartEvent=null,this.clickNum=0,this.touchStartScaleView=null,this.bindEvent()}bindEvent(){this.onTouchstart=this.onTouchstart.bind(this),this.onTouchmove=this.onTouchmove.bind(this),this.onTouchcancel=this.onTouchcancel.bind(this),this.onTouchend=this.onTouchend.bind(this),window.addEventListener("touchstart",this.onTouchstart),window.addEventListener("touchmove",this.onTouchmove),window.addEventListener("touchcancel",this.onTouchcancel),window.addEventListener("touchend",this.onTouchend)}unBindEvent(){window.removeEventListener("touchstart",this.onTouchstart),window.removeEventListener("touchmove",this.onTouchmove),window.removeEventListener("touchcancel",this.onTouchcancel),window.removeEventListener("touchend",this.onTouchend)}onTouchstart(e){if(this.touchesNum=e.touches.length,this.touchStartScaleView=null,1===this.touchesNum){let t=e.touches[0];this.singleTouchstartEvent=t,this.dispatchMouseEvent("mousedown",t.target,t)}}onTouchmove(e){let t=e.touches.length;if(1===t){let t=e.touches[0];this.dispatchMouseEvent("mousemove",t.target,t)}else if(2===t){if(this.mindMap.opt.disableTouchZoom)return;let t=e.touches[0],n=e.touches[1],r=t.clientX-n.clientX,i=t.clientY-n.clientY,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),{x:a,y:s}=this.mindMap.toPos(t.clientX,t.clientY),{x:l,y:c}=this.mindMap.toPos(n.clientX,n.clientY),u=(a+l)/2,h=(s+c)/2;const d=this.mindMap.view;if(!this.touchStartScaleView)return void(this.touchStartScaleView={distance:o,scale:d.scale,x:d.x,y:d.y,cx:u,cy:h});const f=this.touchStartScaleView;let p=f.scale*(o/f.distance);Math.abs(o-f.distance)<=10&&(p=f.scale);const m=1-p/f.scale;d.scale=p<.1?.1:p,d.x=f.x+(u-f.x)*m+(u-f.cx)*p,d.y=f.y+(h-f.y)*m+(h-f.cy)*p,d.transform(),this.mindMap.emit("scale",p)}}onTouchcancel(e){}onTouchend(e){if(this.dispatchMouseEvent("mouseup",e.target),1===this.touchesNum){this.clickNum++,setTimeout(()=>{this.clickNum=0},300);let e=this.singleTouchstartEvent;this.clickNum>1&&(this.clickNum=0,this.dispatchMouseEvent("dblclick",e.target,e))}this.touchesNum=0,this.singleTouchstartEvent=null,this.touchStartScaleView=null}dispatchMouseEvent(e,t,n){let r={};n&&(r={screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,which:1});let i=new MouseEvent(e,{view:window,bubbles:!0,cancelable:!0,...r});t.dispatchEvent(i)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}_f.instanceName="touchEvent";var jf=_f;class Hf{constructor({mindMap:e}){this.mindMap=e,this.resizeBtnSize=26,this.handleEl=null,this.isShowHandleEl=!1,this.node=null,this.img=null,this.rect=null,this.isMousedown=!1,this.currentImgWidth=0,this.currentImgHeight=0,this.isAdjusted=!1,this.bindEvent()}bindEvent(){this.onNodeImgMouseleave=this.onNodeImgMouseleave.bind(this),this.onNodeImgMousemove=this.onNodeImgMousemove.bind(this),this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.onRenderEnd=this.onRenderEnd.bind(this),this.mindMap.on("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.on("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.onRenderEnd)}unBindEvent(){this.mindMap.off("node_img_mouseleave",this.onNodeImgMouseleave),this.mindMap.off("node_img_mousemove",this.onNodeImgMousemove),this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.onRenderEnd)}onNodeImgMousemove(e,t){this.isMousedown||this.isAdjusted||this.mindMap.opt.readonly||this.node&&this.node.uid===e.uid&&this.isShowHandleEl||(this.node=e,this.img=t,this.rect=this.img.rbox(),this.showHandleEl())}onNodeImgMouseleave(){this.isMousedown||this.hideHandleEl()}hideNodeImage(){this.img&&this.img.hide()}showNodeImage(){this.img&&this.img.show()}showHandleEl(){this.handleEl||this.createResizeBtnEl(),this.setHandleElRect(),this.handleEl.style.display="block",this.isShowHandleEl=!0}hideHandleEl(){this.isShowHandleEl&&(this.isShowHandleEl=!1,this.handleEl.style.display="none",this.handleEl.style.backgroundImage="",this.handleEl.style.width=0,this.handleEl.style.height=0,this.handleEl.style.left=0,this.handleEl.style.top=0)}setHandleElRect(){let{width:e,height:t,x:n,y:r}=this.rect;this.handleEl.style.left=n+"px",this.handleEl.style.top=r+"px",this.currentImgWidth=e,this.currentImgHeight=t,this.updateHandleElSize()}updateHandleElSize(){this.handleEl.style.width=this.currentImgWidth+"px",this.handleEl.style.height=this.currentImgHeight+"px"}createResizeBtnEl(){this.handleEl=document.createElement("div"),this.handleEl.style.cssText="\n pointer-events: none;\n position: fixed;\n\t display:none;\n background-size: cover;\n ",this.handleEl.className="node-img-handle";const e=document.createElement("div");e.innerHTML=mu.imgAdjust,e.style.cssText=`\n position: absolute;\n right: 0;\n bottom: 0;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: nwse-resize;\n `,e.className="node-image-resize",e.addEventListener("mouseenter",()=>{this.showHandleEl()}),e.addEventListener("mouseleave",()=>{this.isMousedown||this.hideHandleEl()}),e.addEventListener("mousedown",e=>{e.stopPropagation(),this.onMousedown(e)}),e.addEventListener("mouseup",e=>{setTimeout(()=>{this.hideHandleEl(),this.isAdjusted=!1},0)}),e.addEventListener("click",e=>{e.stopPropagation()}),this.handleEl.appendChild(e);const t=document.createElement("div");this.handleEl.prepend(t),t.className="node-image-remove",t.innerHTML=mu.remove,t.style.cssText=`\n position: absolute;\n right: 0;top:0;color:#fff;\n pointer-events: auto;\n background-color: rgba(0, 0, 0, 0.3);\n width: ${this.resizeBtnSize}px;\n height: ${this.resizeBtnSize}px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n `,t.addEventListener("mouseenter",e=>{this.showHandleEl()}),t.addEventListener("mouseleave",e=>{this.isMousedown||this.hideHandleEl()}),t.addEventListener("click",e=>{this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:null})});const n=this.mindMap.opt.customInnerElsAppendTo||document.body;n.appendChild(this.handleEl)}onMousedown(){this.isMousedown=!0,this.hideNodeImage(),this.handleEl.style.backgroundImage=`url(${this.node.getData("image")})`}onMousemove(e){if(!this.isMousedown)return;e.preventDefault();let{width:t,height:n}=this.node.getData("imageSize"),r=e.clientX-this.rect.x,i=e.clientY-this.rect.y;if(r<=0||i<=0)return;let[o,a]=Object(v["X"])(t,n,r,i);this.currentImgWidth=o,this.currentImgHeight=a,this.updateHandleElSize()}onMouseup(){if(!this.isMousedown)return;this.showNodeImage(),this.hideHandleEl();let{image:e,imageTitle:t}=this.node.getData(),{scaleX:n,scaleY:r}=this.mindMap.draw.transform();this.mindMap.execCommand("SET_NODE_IMAGE",this.node,{url:e,title:t,width:this.currentImgWidth/n,height:this.currentImgHeight/r,custom:!0}),this.isAdjusted=!0,this.isMousedown=!1}onRenderEnd(){this.isAdjusted?this.isAdjusted=!1:this.hideHandleEl()}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Hf.instanceName="nodeImgAdjust";var Uf=Hf;n("532c");class qf{constructor({mindMap:e}){this.mindMap=e,this.isSearching=!1,this.searchText="",this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isJumpNext=!1,this.onDataChange=this.onDataChange.bind(this),this.mindMap.on("data_change",this.onDataChange)}onDataChange(){if(this.isJumpNext)return this.isJumpNext=!1,void this.search(this.searchText);this.notResetSearchText?this.notResetSearchText=!1:this.searchText=""}search(e,t=(()=>{})){if(Object(v["I"])(e))return this.endSearch();e=String(e),this.isSearching=!0,this.searchText===e||(this.searchText=e,this.doSearch()),this.searchNext(t),this.emitEvent()}endSearch(){this.isSearching&&(this.searchText="",this.matchNodeList=[],this.currentIndex=-1,this.notResetSearchText=!1,this.isSearching=!1,this.mindMap.opt.readonly&&this.mindMap.renderer.closeHighlightNode(),this.emitEvent())}doSearch(){this.matchNodeList=[],this.currentIndex=-1,Object(v["d"])(this.mindMap.renderer.root,e=>{let{richText:t,text:n}=e.getData();t&&(n=Object(v["z"])(n)),n.includes(this.searchText)&&this.matchNodeList.push(e)})}searchNext(e){if(!this.isSearching||this.matchNodeList.length<=0)return;this.currentIndex{this.notResetSearchText=!1,e(),this.mindMap.opt.readonly&&this.mindMap.renderer.highlightNode(t)})}replace(e,t=!1){if(null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0)return;this.isJumpNext=t,e=String(e);let n=this.matchNodeList[this.currentIndex];if(!n)return;let r=this.getReplacedText(n,this.searchText,e);this.notResetSearchText=!0,n.setText(r,n.getData("richText"),!0),this.matchNodeList=this.matchNodeList.filter(e=>n!==e),this.currentIndex>this.matchNodeList.length-1?this.currentIndex=-1:this.currentIndex--,this.emitEvent()}replaceAll(e){null===e||void 0===e||!this.isSearching||this.matchNodeList.length<=0||(e=String(e),this.matchNodeList.forEach(t=>{let n=this.getReplacedText(t,this.searchText,e);this.mindMap.renderer.setNodeDataRender(t,{text:n,resetRichText:!!t.getData("richText")},!0)}),this.mindMap.render(),this.mindMap.command.addHistory(),this.endSearch())}getReplacedText(e,t,n){let{richText:r,text:i}=e.getData();return r?Object(v["V"])(i,t,n):i.replaceAll(t,n)}emitEvent(){this.mindMap.emit("search_info_change",{currentIndex:this.currentIndex,total:this.matchNodeList.length})}}qf.instanceName="search";var Gf=qf;class Wf{constructor({mindMap:e}){this.mindMap=e,this.isInPainter=!1,this.painterNode=null,this.bindEvent()}bindEvent(){this.painterOneNode=this.painterOneNode.bind(this),this.onEndPainter=this.onEndPainter.bind(this),this.mindMap.on("node_click",this.painterOneNode),this.mindMap.on("draw_click",this.onEndPainter)}unBindEvent(){this.mindMap.off("node_click",this.painterOneNode),this.mindMap.off("draw_click",this.onEndPainter)}startPainter(){if(this.mindMap.opt.readonly)return;let e=this.mindMap.renderer.activeNodeList;e.length<=0||(this.painterNode=e[0],this.isInPainter=!0,this.mindMap.emit("painter_start"))}endPainter(){this.painterNode=null,this.isInPainter=!1}onEndPainter(){this.isInPainter&&(this.endPainter(),this.mindMap.emit("painter_end"))}painterOneNode(e){if(!e||!this.isInPainter||!this.painterNode||!e||e.uid===this.painterNode.uid)return;const t={},n=this.painterNode.getData();Object.keys(n).forEach(e=>{Object(v["f"])(e)&&(t[e]=n[e])}),e.setStyles(t),n.activeStyle&&e.setStyles(n.activeStyle,!0)}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}Wf.instanceName="painter";var Vf=Wf;class Yf{constructor(e){this.mindMap=e.mindMap,this.scrollbarWrapSize={width:0,height:0},this.chartHeight=0,this.chartWidth=0,this.reset(),this.bindEvent()}reset(){this.currentScrollType="",this.isMousedown=!1,this.mousedownPos={x:0,y:0},this.mousedownScrollbarPos=0}bindEvent(){this.onMousemove=this.onMousemove.bind(this),this.onMouseup=this.onMouseup.bind(this),this.updateScrollbar=this.updateScrollbar.bind(this),this.updateScrollbar=Object(v["cb"])(this.updateScrollbar,16,this),this.mindMap.on("mousemove",this.onMousemove),this.mindMap.on("mouseup",this.onMouseup),this.mindMap.on("node_tree_render_end",this.updateScrollbar),this.mindMap.on("view_data_change",this.updateScrollbar)}unBindEvent(){this.mindMap.off("mousemove",this.onMousemove),this.mindMap.off("mouseup",this.onMouseup),this.mindMap.off("node_tree_render_end",this.updateScrollbar),this.mindMap.off("view_data_change",this.updateScrollbar)}updateScrollbar(){if(this.isMousedown)return;const e=this.calculationScrollbar();this.emitEvent(e)}emitEvent(e){this.mindMap.emit("scrollbar_change",e)}setScrollBarWrapSize(e,t){this.scrollbarWrapSize.width=e,this.scrollbarWrapSize.height=t}calculationScrollbar(){const e=this.mindMap.draw.rbox(),t=this.mindMap.elRect;e.x-=t.left,e.y-=t.top;const n=this.mindMap.height,r=n/2,i=e.height+2*r;this.chartHeight=i;const o=e.y-r,a=Math.min(n/i*100,100);let s=-o/i*100;s<0&&(s=0),s>100-a&&(s=100-a);const l=this.mindMap.width,c=l/2,u=e.width+2*c;this.chartWidth=u;const h=e.x-c,d=Math.min(l/u*100,100);let f=-h/u*100;f<0&&(f=0),f>100-d&&(f=100-d);const p={vertical:{top:s,height:a},horizontal:{left:f,width:d}};return p}onMousedown(e,t){e.preventDefault(),e.stopPropagation(),this.currentScrollType=t,this.isMousedown=!0,this.mousedownPos={x:e.clientX,y:e.clientY};const n=window.getComputedStyle(e.target);t===oo["a"].SCROLL_BAR_DIR.VERTICAL?this.mousedownScrollbarPos=Number.parseFloat(n.top):this.mousedownScrollbarPos=Number.parseFloat(n.left)}onMousemove(e){if(this.isMousedown)if(e.preventDefault(),e.stopPropagation(),this.currentScrollType===oo["a"].SCROLL_BAR_DIR.VERTICAL){const t=e.clientY-this.mousedownPos.y+this.mousedownScrollbarPos;this.updateMindMapView(oo["a"].SCROLL_BAR_DIR.VERTICAL,t)}else{const t=e.clientX-this.mousedownPos.x+this.mousedownScrollbarPos;this.updateMindMapView(oo["a"].SCROLL_BAR_DIR.HORIZONTAL,t)}}onMouseup(){this.isMousedown=!1,this.reset()}updateMindMapView(e,t){const n=this.calculationScrollbar(),r=this.mindMap.draw.transform(),i=this.mindMap.draw.rbox(),o=this.mindMap.renderer.root.group.rbox();if(e===oo["a"].SCROLL_BAR_DIR.VERTICAL){let e=t;e<=0&&(e=0);let a=(100-n.vertical.height)/100*this.scrollbarWrapSize.height;e>=a&&(e=a);const s=e/this.scrollbarWrapSize.height*100,l=-s/100*this.chartHeight,c=o.y-i.y,u=this.mindMap.height/2;let h=l+c-u*r.scaleY+u;this.mindMap.view.translateYTo(h),this.emitEvent({horizontal:n.horizontal,vertical:{top:s,height:n.vertical.height}})}else{let e=t;e<=0&&(e=0);let a=(100-n.horizontal.width)/100*this.scrollbarWrapSize.width;e>=a&&(e=a);const s=e/this.scrollbarWrapSize.width*100,l=-s/100*this.chartWidth,c=o.x-i.x,u=this.mindMap.width/2;let h=l+c-u*r.scaleX+u;this.mindMap.view.translateXTo(h),this.emitEvent({vertical:n.vertical,horizontal:{left:s,width:n.horizontal.width}})}}onClick(e,t){let n=0;n=t===oo["a"].SCROLL_BAR_DIR.VERTICAL?e.clientY-e.currentTarget.getBoundingClientRect().top:e.clientX-e.currentTarget.getBoundingClientRect().left,this.updateMindMapView(t,n)}beforePluginDestroy(){this.unBindEvent()}}Yf.instanceName="scrollbar";var Zf=Yf,Kf=n("5703"),Xf=n.n(Kf);class Jf{constructor(e){this.opt=e,this.mindMap=e.mindMap,window.katex=Xf.a,this.extendQuill()}extendQuill(){const e=Kd.a.import("formats/formula");class t extends e{static create(e){let t=super.create(e);return"string"===typeof e&&(Xf.a.render(e,t,{throwOnError:!1,errorColor:"#f00",output:"mathml"}),t.setAttribute("data-value",e)),t}}Kd.a.register("formats/formula",t,!0)}insertFormulaToNode(e,t){let n=this.mindMap.richText;n.showEditText(e),n.quill.insertEmbed(n.quill.getLength()-1,"formula",t),n.setTextStyleIfNotRichText(n.node),n.hideEditText([e])}}Jf.instanceName="formula";var Qf=Jf,$f=n("4afd"),ep=n("0d93");class tp{constructor(e){this.opt=e,this.mindMap=e.mindMap,this.ydoc=new $f["a"],this.ymap=null,this.provider=null,this.awareness=null,this.currentAwarenessData=[],this.waitNodeUidMap={},this.currentData=null,this.userInfo=null,this.bindEvent(),this.mindMap.opt.data&&this.initData(this.mindMap.opt.data)}initData(e){e=Object(v["ab"])(e),this.ymap&&this.ymap.unobserve(this.onObserve),this.ymap=this.ydoc.getMap(),this.currentData=this.transformTreeDataToObject(e),Object.keys(this.currentData).forEach(e=>{this.ymap.set(e,this.currentData[e])}),this.onObserve=this.onObserve.bind(this),this.ymap.observe(this.onObserve)}getDoc(){return this.ydoc}setProvider(e,t={}){const{roomName:n,signalingList:r,...i}=t;this.provider=e||new ep["a"](n,this.ydoc,{signaling:r,...i}),this.awareness=this.provider.awareness,this.onAwareness=this.onAwareness.bind(this),this.awareness.on("change",this.onAwareness)}bindEvent(){this.onDataChange=this.onDataChange.bind(this),this.mindMap.on("data_change",this.onDataChange),this.onNodeActive=this.onNodeActive.bind(this),this.mindMap.on("node_active",this.onNodeActive),this.onNodeTreeRenderEnd=this.onNodeTreeRenderEnd.bind(this),this.mindMap.on("node_tree_render_end",this.onNodeTreeRenderEnd),this.initData=this.initData.bind(this),this.mindMap.on("set_data",this.initData)}unBindEvent(){this.ymap&&this.ymap.unobserve(this.onObserve),this.mindMap.off("data_change",this.onDataChange),this.mindMap.off("node_active",this.onNodeActive),this.mindMap.off("node_tree_render_end",this.onNodeTreeRenderEnd),this.mindMap.off("set_data",this.initData),this.ydoc.destroy()}onObserve(e){const t=e.target.toJSON();if(Object(v["G"])(t,this.currentData))return;this.currentData=t;const n=this.transformObjectToTreeData(t);n&&(this.mindMap.renderer.setData(n),this.mindMap.render(),this.mindMap.command.addHistory())}onDataChange(e){const t=this.transformTreeDataToObject(e);this.updateChanges(t)}updateChanges(e){const t=this.currentData;this.currentData=e,this.ydoc.transact(()=>{Object.keys(e).forEach(n=>{t[n]&&Object(v["G"])(t[n],e[n])||this.ymap.set(n,e[n])}),Object.keys(t).forEach(t=>{e[t]||this.ymap.delete(t)})})}onNodeActive(e,t){this.userInfo&&this.awareness.setLocalStateField(this.userInfo.name,{userInfo:{...this.userInfo},nodeIdList:t.map(e=>e.uid)})}onNodeTreeRenderEnd(){Object.keys(this.waitNodeUidMap).forEach(e=>{const t=this.mindMap.renderer.findNodeByUid(e);t&&t.addUser(this.waitNodeUidMap[e])}),this.waitNodeUidMap={}}setUserInfo(e){"Object"!==Object(v["B"])(e)||Object(v["I"])(e.id)||Object(v["I"])(e.name)&&Object(v["I"])(e.avatar)||(this.userInfo=e||null)}onAwareness(){const e=(e,t)=>{e.forEach(e=>{const n=Object.keys(e)[0];if(!n)return;const r=e[n],i=r.userInfo,o=r.nodeIdList;o.forEach(e=>{const n=this.mindMap.renderer.findNodeByUid(e);t(e,n,i)})})};e(this.currentAwarenessData,(e,t,n)=>{t&&t.removeUser(n)});const t=Array.from(this.awareness.getStates().values());this.currentAwarenessData=t,e(t,(e,t,n)=>{n.id!==this.userInfo.id&&(t?t.addUser(n):this.waitNodeUidMap[e]=n)})}transformTreeDataToObject(e){const t={},n=(e,r)=>{const i=e.data.uid;r&&r.children.push(i),t[i]={isRoot:!r,data:{...e.data},children:[]},e.children&&e.children.length>0&&e.children.forEach(e=>{n(e,t[i])})};return n(e,null),t}findParentUid(e,t){const n=Object.keys(e);let r="";return n.forEach(n=>{const i=e[n].children,o=-1!==i.findIndex(e=>e===t);o&&(r=n)}),r}transformObjectToTreeData(e){const t=Object.keys(e);if(t.length<=0)return null;const n=t.find(t=>e[t].isRoot);if(!n||!e[n])return null;const r={data:Object(v["ab"])(e[n].data),children:[]},i={};return i[n]=r,t.forEach(t=>{const n=this.findParentUid(e,t),r=e[t],o=i[t]||{data:Object(v["ab"])(r.data),children:[]};if(i[t]||(i[t]=o),n){const r=e[n].children.findIndex(e=>e===t);i[n]||(i[n]={data:Object(v["ab"])(e[n].data),children:[]}),i[n].children[r]=o}}),r}beforePluginRemove(){this.unBindEvent()}beforePluginDestroy(){this.unBindEvent()}}tp.instanceName="cooperate";var np=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("outline.title")}},[t("div",{staticClass:"changeBtn",class:{isDark:e.isDark},on:{click:e.onChangeToOutlineEdit}},[t("span",{staticClass:"icon iconfont iconquanping1"})]),"outline"===e.activeSidebar?t("Outline",{attrs:{mindMap:e.mindMap},on:{scrollTo:e.onScrollTo}}):e._e()],1)},rp=[],ip=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarContainer",class:{show:e.show,isDark:e.isDark},style:{zIndex:e.zIndex},on:{click:function(e){e.stopPropagation()}}},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}}),e.title?t("div",{staticClass:"sidebarHeader"},[e._v(" "+e._s(e.title)+" ")]):e._e(),t("div",{ref:"sidebarContent",staticClass:"sidebarContent"},[e._t("default")],2)])},op=[],ap={name:"Sidebar",props:{title:{type:String,default:""}},data(){return{show:!1,zIndex:0}},computed:{...Object(se["d"])(["isDark"])},watch:{show(e,t){e&&!t&&(this.zIndex=ke.sidebarZIndex++)}},created(){this.$bus.$on("closeSideBar",this.handleCloseSidebar)},beforeDestroy(){this.$bus.$off("closeSideBar",this.handleCloseSidebar)},methods:{...Object(se["c"])(["setActiveSidebar"]),handleCloseSidebar(){this.close()},close(){this.show=!1,this.setActiveSidebar("")},getEl(){return this.$refs.sidebarContent}}},sp=ap,lp=(n("7b13"),Object(p["a"])(sp,ip,op,!1,null,"e9a8c6d4",null)),cp=lp.exports,up=function(){var e=this,t=e._self._c;return t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"current-change":e.onCurrentChange},nativeOn:{mouseenter:function(t){e.isInTreArea=!0},mouseleave:function(t){e.isInTreArea=!1}},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid},on:{click:function(t){return e.onClick(r)}}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},blur:function(t){return e.onBlur(t,n)},paste:function(t){return e.onPaste(t,n)}}})])}}])})},hp=[],dp=(n("5b81"),{name:"Outline",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null,notHandleDataChange:!1,isHandleNodeTreeRenderEnd:!1,beInsertNodeUid:"",insertType:"",isInTreArea:!1,isAfterCreateNewNode:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},created(){window.addEventListener("keydown",this.onKeyDown),this.$bus.$on("data_change",this.handleDataChange),this.$bus.$on("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$on("hide_text_edit",this.handleHideTextEdit)},mounted(){this.refresh()},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown),this.$bus.$off("data_change",this.handleDataChange),this.$bus.$off("node_tree_render_end",this.handleNodeTreeRenderEnd),this.$bus.$off("hide_text_edit",this.handleHideTextEdit)},methods:{handleHideTextEdit(){this.notHandleDataChange&&(this.notHandleDataChange=!1,this.refresh())},handleDataChange(){this.notHandleDataChange?this.notHandleDataChange=!1:this.isAfterCreateNewNode?this.isAfterCreateNewNode=!1:this.refresh()},handleNodeTreeRenderEnd(){if(this.insertType)return this[this.insertType](),void(this.insertType="");this.isHandleNodeTreeRenderEnd&&(this.isHandleNodeTreeRenderEnd=!1,this.refresh(),this.$nextTick(()=>{this.afterCreateNewNode()}))},refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=(e.data.richText?Object(v["O"])(e.data.text):e.data.text).replaceAll(/\n/g,"
");n=Object(v["E"])(n),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},afterCreateNewNode(){let e=this.beInsertNodeUid;if(e&&this.$refs.tree)try{this.isAfterCreateNewNode=!0,this.$refs.tree.setCurrentKey(e);let t=this.$refs.tree.getNode(e);this.onCurrentChange(t.data),this.onClick(t.data);const n=document.querySelector(`.customNode[data-id="${e}"] .nodeEdit`);if(n){let e=window.getSelection(),t=document.createRange();t.selectNodeContents(n),e.removeAllRanges(),e.addRange(t);let r=n.offsetTop;this.$emit("scrollTo",r)}}catch(t){console.log(t)}this.beInsertNodeUid=""},checkAllowDrag(e){return!e.data.root},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return void(this.insertType&&(this[this.insertType](),this.insertType=""));const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText,i=this.mindMap.renderer.findNodeByUid(t.data.uid);i&&(this.notHandleDataChange=!0,n?i.setText(Object(v["bb"])(r),!0,!0):i.setText(r))},onPaste(e){e.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument();let n=(e.clipboardData||window.clipboardData).getData("text");n=Object(v["z"])(n),n=n.replaceAll(/\n/g,"");const r=document.createTextNode(n);t.getRangeAt(0).insertNode(r),t.collapseToEnd()},getKey(){return Math.random()},onNodeInputKeydown(e){13!==e.keyCode||e.shiftKey||(e.preventDefault(),this.insertType="insertNode",e.target.blur()),9===e.keyCode&&(e.preventDefault(),this.insertType="insertChildNode",e.target.blur())},insertNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(v["m"])(),this.mindMap.execCommand("INSERT_NODE",!1,[],{uid:this.beInsertNodeUid})},insertChildNode(){this.notHandleDataChange=!0,this.isHandleNodeTreeRenderEnd=!0,this.beInsertNodeUid=Object(v["m"])(),this.mindMap.execCommand("INSERT_CHILD_NODE",!1,[],{uid:this.beInsertNodeUid})},onClick(e){this.notHandleDataChange=!0;const t=this.mindMap.renderer.findNodeByUid(e.uid);t&&t.nodeData.data.isActive||this.mindMap.execCommand("GO_TARGET_NODE",e.uid,()=>{this.notHandleDataChange=!1})},onNodeDrop(e,t,n){this.notHandleDataChange=!0;const r=this.mindMap.renderer.findNodeByUid(e.data.uid),i=this.mindMap.renderer.findNodeByUid(t.data.uid);if(r&&i)switch(n){case"before":this.mindMap.execCommand("INSERT_BEFORE",r,i);break;case"after":this.mindMap.execCommand("INSERT_AFTER",r,i);break;case"inner":this.mindMap.execCommand("MOVE_NODE_TO",r,i);break;default:break}},onCurrentChange(e){this.currentData=e},onKeyDown(e){if(this.isInTreArea&&[46,8].includes(e.keyCode)&&this.currentData){e.stopPropagation(),this.mindMap.renderer.textEdit.hideEditTextBox();const t=this.mindMap.renderer.findNodeByUid(this.currentData.uid);t&&!t.isRoot&&(this.notHandleDataChange=!0,this.$refs.tree.remove(this.currentData),this.mindMap.execCommand("REMOVE_NODE",[t]))}}}}),fp=dp,pp=(n("5ee0"),Object(p["a"])(fp,up,hp,!1,null,"887458fa",null)),mp=pp.exports,gp={name:"OutlineSidebar",components:{Sidebar:cp,Outline:mp},props:{mindMap:{type:Object}},computed:{...Object(se["d"])(["activeSidebar","isOutlineEdit","isDark"])},watch:{activeSidebar(e){this.$refs.sidebar.show="outline"===e}},methods:{...Object(se["c"])(["setIsOutlineEdit","setActiveSidebar"]),onChangeToOutlineEdit(){this.setActiveSidebar(""),this.setIsOutlineEdit(!0)},onScrollTo(e){let t=this.$refs.sidebar.getEl(),n=t.offsetHeight,r=t.scrollTop;e>r+n&&t.scrollTo(0,e-n/2)}}},vp=gp,bp=(n("02c6"),Object(p["a"])(vp,np,rp,!1,null,"8cff0f40",null)),yp=bp.exports,wp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("style.title")}},[e.activeNodes.length>0?t("div",{staticClass:"styleBox",class:{isDark:e.isDark}},[t("div",{staticClass:"sidebarContent"},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.text")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontFamily")}},model:{value:e.style.fontFamily,callback:function(t){e.$set(e.style,"fontFamily",t)},expression:"style.fontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("fontSize")}},model:{value:e.style.fontSize,callback:function(t){e.$set(e.style,"fontSize",t)},expression:"style.fontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.lineHeight")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineHeight")}},model:{value:e.style.lineHeight,callback:function(t){e.$set(e.style,"lineHeight",t)},expression:"style.lineHeight"}},e._l(e.lineHeightList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"btnGroup"},[t("el-tooltip",{attrs:{content:e.$t("style.color"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"styleBtn"},[e._v(" A "),t("span",{staticClass:"colorShow",style:{backgroundColor:e.style.color||"#eee"}})])]),t("el-tooltip",{attrs:{content:e.$t("style.addFontWeight"),placement:"bottom"}},[t("div",{staticClass:"styleBtn",class:{actived:"bold"===e.style.fontWeight},on:{click:e.toggleFontWeight}},[e._v(" B ")])]),t("el-tooltip",{attrs:{content:e.$t("style.italic"),placement:"bottom"}},[t("div",{staticClass:"styleBtn i",class:{actived:"italic"===e.style.fontStyle},on:{click:e.toggleFontStyle}},[e._v(" I ")])]),t("el-tooltip",{attrs:{content:e.$t("style.textDecoration"),placement:"bottom"}},[t("div",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"styleBtn u",style:{textDecoration:e.style.textDecoration||"none"}},[e._v(" U ")])])],1),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.color},on:{change:e.changeFontColor}})],1),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"hover"}},[t("el-radio-group",{attrs:{size:"mini"},on:{change:function(t){return e.update("textDecoration")}},model:{value:e.style.textDecoration,callback:function(t){e.$set(e.style,"textDecoration",t)},expression:"style.textDecoration"}},[t("el-radio-button",{attrs:{label:"none"}},[e._v(e._s(e.$t("style.none")))]),t("el-radio-button",{attrs:{label:"underline"}},[e._v(e._s(e.$t("style.underline")))]),t("el-radio-button",{attrs:{label:"line-through"}},[e._v(e._s(e.$t("style.lineThrough")))]),t("el-radio-button",{attrs:{label:"overline"}},[e._v(e._s(e.$t("style.overline")))])],1)],1)],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.border")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.borderColor}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.borderColor},on:{change:e.changeBorderColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderDasharray")}},model:{value:e.style.borderDasharray,callback:function(t){e.$set(e.style,"borderDasharray",t)},expression:"style.borderDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.borderDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderWidth")}},model:{value:e.style.borderWidth,callback:function(t){e.$set(e.style,"borderWidth",t)},expression:"style.borderWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:"rectangle"===e.style.shape,expression:"style.shape === 'rectangle'"}],staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.borderRadius")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("borderRadius")}},model:{value:e.style.borderRadius,callback:function(t){e.$set(e.style,"borderRadius",t)},expression:"style.borderRadius"}},e._l(e.borderRadiusList,(function(e){return t("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.background")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.fillColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.fillColor},on:{change:e.changeFillColor}})],1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.shape")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.shape")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("shape")}},model:{value:e.style.shape,callback:function(t){e.$set(e.style,"shape",t)},expression:"style.shape"}},e._l(e.shapeList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{staticStyle:{"margin-top":"5px"},attrs:{width:"60",height:"26"}},[t("path",{attrs:{d:e.shapeListMap[n.value],fill:"none",stroke:e.style.shape===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-width":"2"}})])])})),1)],1)]),t("div",{staticClass:"title"},[e._v(e._s(e.$t("style.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{width:"80px",backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:e.changeLineColor}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineDasharray")}},model:{value:e.style.lineDasharray,callback:function(t){e.$set(e.style,"lineDasharray",t)},expression:"style.lineDasharray"}},e._l(e.borderDasharrayList,(function(n){return t("el-option",{key:n.value,attrs:{label:n.name,value:n.value}},[t("svg",{attrs:{width:"120",height:"34"}},[t("line",{attrs:{x1:"10",y1:"17",x2:"110",y2:"17","stroke-width":"2",stroke:e.style.lineDasharray===n.value?"#409eff":e.isDark?"#fff":"#000","stroke-dasharray":n.value}})])])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("lineWidth")}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.borderWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("style.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingX")}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("style.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:function(t){return e.update("paddingY")}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)])])]):t("div",{staticClass:"tipBox"},[t("div",{staticClass:"tipIcon iconfont icontianjiazijiedian"}),t("div",{staticClass:"tipText"},[e._v("请选择一个节点")])])])},xp=[],kp=function(){var e=this,t=e._self._c;return t("div",{staticClass:"colorContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"colorList"},e._l(e.colorList,(function(n){return t("span",{key:n,staticClass:"colorItem iconfont",class:{icontouming:"transparent"===n},style:{backgroundColor:n},on:{click:function(t){return e.clickColorItem(n)}}})})),0),t("div",{staticClass:"moreColor"},[t("span",[e._v(e._s(e.$t("color.moreColor")))]),t("el-color-picker",{attrs:{size:"mini"},on:{change:e.changeColor},model:{value:e.selectColor,callback:function(t){e.selectColor=t},expression:"selectColor"}})],1)])},Ap=[],Cp={name:"Color",props:{color:{type:String,default:""}},data(){return{colorList:he,selectColor:""}},computed:{...Object(se["d"])(["isDark"])},watch:{color(){this.selectColor=this.color}},created(){this.selectColor=this.color},methods:{clickColorItem(e){this.$emit("change",e)},changeColor(){this.$emit("change",this.selectColor)}}},Ep=Cp,Sp=(n("ce80"),Object(p["a"])(Ep,kp,Ap,!1,null,"530a160f",null)),Tp=Sp.exports,Np={name:"Style",components:{Sidebar:cp,Color:Tp},data(){return{fontSizeList:ce,borderWidthList:de,borderRadiusList:pe,lineHeightList:ue,activeNodes:[],style:{shape:"",paddingX:0,paddingY:0,color:"",fontFamily:"",fontSize:"",lineHeight:"",textDecoration:"",fontWeight:"",fontStyle:"",borderWidth:"",borderColor:"",fillColor:"",borderDasharray:"",borderRadius:"",lineColor:"",lineDasharray:"",lineWidth:""}}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),fontFamilyList(){return je[this.$i18n.locale]||je.zh},borderDasharrayList(){return He[this.$i18n.locale]||He.zh},shapeList(){return Ke[this.$i18n.locale]||Ke.zh},shapeListMap(){return Xe[this.$i18n.locale]||Xe.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeStyle"===e}},created(){this.$bus.$on("node_active",this.onNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.onNodeActive)},methods:{onNodeActive(...e){this.$nextTick(()=>{this.activeNodes=[...e[1]],this.initNodeStyle()})},initNodeStyle(){this.activeNodes.length<=0||["shape","paddingX","paddingY","color","fontFamily","fontSize","lineHeight","textDecoration","fontWeight","fontStyle","borderWidth","borderColor","fillColor","borderDasharray","borderRadius","lineColor","lineDasharray","lineWidth"].forEach(e=>{this.style[e]=this.activeNodes[0].getStyle(e,!1)})},update(e){this.activeNodes.forEach(t=>{t.setStyle(e,this.style[e])})},toggleFontWeight(){"bold"===this.style.fontWeight?this.style.fontWeight="normal":this.style.fontWeight="bold",this.update("fontWeight")},toggleFontStyle(){"italic"===this.style.fontStyle?this.style.fontStyle="normal":this.style.fontStyle="italic",this.update("fontStyle")},changeFontColor(e){this.style.color=e,this.update("color")},changeBorderColor(e){this.style.borderColor=e,this.update("borderColor")},changeLineColor(e){this.style.lineColor=e,this.update("lineColor")},changeFillColor(e){this.style.fillColor=e,this.update("fillColor")}}},Mp=Np,Lp=(n("1ab0"),n("71e2"),Object(p["a"])(Mp,wp,xp,!1,null,"4a300153",null)),Op=Lp.exports,Dp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("baseStyle.title")}},[e.data?t("div",{staticClass:"sidebarContent",class:{isDark:e.isDark}},[t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.background")))]),t("div",{staticClass:"row"},[t("el-tabs",{staticClass:"tab",model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.color"),name:"color"}},[t("Color",{attrs:{color:e.style.backgroundColor},on:{change:t=>{e.update("backgroundColor",t)}}})],1),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.image"),name:"image"}},[t("ImgUpload",{staticClass:"imgUpload",on:{change:t=>{e.update("backgroundImage",t)}},model:{value:e.style.backgroundImage,callback:function(t){e.$set(e.style,"backgroundImage",t)},expression:"style.backgroundImage"}}),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageRepeat")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundRepeat",t)}},model:{value:e.style.backgroundRepeat,callback:function(t){e.$set(e.style,"backgroundRepeat",t)},expression:"style.backgroundRepeat"}},e._l(e.backgroundRepeatList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imagePosition")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundPosition",t)}},model:{value:e.style.backgroundPosition,callback:function(t){e.$set(e.style,"backgroundPosition",t)},expression:"style.backgroundPosition"}},e._l(e.backgroundPositionList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.imageSize")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("backgroundSize",t)}},model:{value:e.style.backgroundSize,callback:function(t){e.$set(e.style,"backgroundSize",t)},expression:"style.backgroundSize"}},e._l(e.backgroundSizeList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1)],1)],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.line")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover",arg:"popover"}],staticClass:"block",style:{backgroundColor:e.style.lineColor}}),t("el-popover",{ref:"popover",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.lineColor},on:{change:t=>{e.update("lineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineWidth",t)}},model:{value:e.style.lineWidth,callback:function(t){e.$set(e.style,"lineWidth",t)},expression:"style.lineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.style")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("lineStyle",t)}},model:{value:e.style.lineStyle,callback:function(t){e.$set(e.style,"lineStyle",t)},expression:"style.lineStyle"}},e._l(e.lineStyleList,(function(n){return t("el-option",{key:n.value,staticClass:"lineStyleOption",class:{isDark:e.isDark,isSelected:e.style.lineStyle===n.value},attrs:{label:n.name,value:n.value},domProps:{innerHTML:e._s(e.lineStyleMap[n.value])}})})),1)],1),"curve"===e.style.lineStyle?t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.rootStyle")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("rootLineKeepSameInCurve",t)}},model:{value:e.style.rootLineKeepSameInCurve,callback:function(t){e.$set(e.style,"rootLineKeepSameInCurve",t)},expression:"style.rootLineKeepSameInCurve"}},e._l(e.rootLineKeepSameInCurveList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1):e._e()]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.lineOfOutline")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover2",arg:"popover2"}],staticClass:"block",style:{backgroundColor:e.style.generalizationLineColor}}),t("el-popover",{ref:"popover2",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.generalizationLineColor},on:{change:t=>{e.update("generalizationLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.width")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("generalizationLineWidth",t)}},model:{value:e.style.generalizationLineWidth,callback:function(t){e.$set(e.style,"generalizationLineWidth",t)},expression:"style.generalizationLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLine")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover4",arg:"popover4"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineColor}}),t("el-popover",{ref:"popover4",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineColor},on:{change:t=>{e.update("associativeLineColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineWidth",t)}},model:{value:e.style.associativeLineWidth,callback:function(t){e.$set(e.style,"associativeLineWidth",t)},expression:"style.associativeLineWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover5",arg:"popover5"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineActiveColor}}),t("el-popover",{ref:"popover5",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineActiveColor},on:{change:t=>{e.update("associativeLineActiveColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.associativeLineActiveWidth")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.update("associativeLineActiveWidth",t)}},model:{value:e.style.associativeLineActiveWidth,callback:function(t){e.$set(e.style,"associativeLineActiveWidth",t)},expression:"style.associativeLineActiveWidth"}},e._l(e.lineWidthList,(function(n){return t("el-option",{key:n,attrs:{label:n,value:n}},[n>0?t("span",{staticClass:"borderLine",class:{isDark:e.isDark},style:{height:n+"px"}}):e._e()])})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.associativeLineText")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontFamily")))]),t("el-select",{attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontFamily",t)}},model:{value:e.style.associativeLineTextFontFamily,callback:function(t){e.$set(e.style,"associativeLineTextFontFamily",t)},expression:"style.associativeLineTextFontFamily"}},e._l(e.fontFamilyList,(function(e){return t("el-option",{key:e.value,style:{fontFamily:e.value},attrs:{label:e.name,value:e.value}})})),1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.color")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover6",arg:"popover6"}],staticClass:"block",style:{backgroundColor:e.style.associativeLineTextColor}}),t("el-popover",{ref:"popover6",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.style.associativeLineTextColor},on:{change:t=>{e.update("associativeLineTextColor",t)}}})],1)],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.fontSize")))]),t("el-select",{staticStyle:{width:"80px"},attrs:{size:"mini",placeholder:""},on:{change:function(t){return e.update("associativeLineTextFontSize",t)}},model:{value:e.style.associativeLineTextFontSize,callback:function(t){e.$set(e.style,"associativeLineTextFontSize",t)},expression:"style.associativeLineTextFontSize"}},e._l(e.fontSizeList,(function(e){return t("el-option",{key:e,style:{fontSize:e+"px"},attrs:{label:e,value:e}})})),1)],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeBorderType")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.update("nodeUseLineStyle",t)}},model:{value:e.style.nodeUseLineStyle,callback:function(t){e.$set(e.style,"nodeUseLineStyle",t)},expression:"style.nodeUseLineStyle"}},[e._v(e._s(e.$t("baseStyle.nodeUseLineStyle")))])],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodePadding")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingX",t)}},model:{value:e.style.paddingX,callback:function(t){e.$set(e.style,"paddingX",t)},expression:"style.paddingX"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},on:{change:t=>{e.update("paddingY",t)}},model:{value:e.style.paddingY,callback:function(t){e.$set(e.style,"paddingY",t)},expression:"style.paddingY"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.image")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumWidth")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxWidth",t)}},model:{value:e.style.imgMaxWidth,callback:function(t){e.$set(e.style,"imgMaxWidth",t)},expression:"style.imgMaxWidth"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.maximumHeight")))]),t("el-slider",{staticStyle:{width:"140px"},attrs:{min:10,max:300},on:{change:t=>{e.update("imgMaxHeight",t)}},model:{value:e.style.imgMaxHeight,callback:function(t){e.$set(e.style,"imgMaxHeight",t)},expression:"style.imgMaxHeight"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.icon")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.size")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{min:12,max:50},on:{change:t=>{e.update("iconSize",t)}},model:{value:e.style.iconSize,callback:function(t){e.$set(e.style,"iconSize",t)},expression:"style.iconSize"}})],1)]),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.nodeMargin")))]),t("div",{staticClass:"row column"},[t("el-tabs",{staticClass:"tab",on:{"tab-click":e.initMarginStyle},model:{value:e.marginActiveTab,callback:function(t){e.marginActiveTab=t},expression:"marginActiveTab"}},[t("el-tab-pane",{attrs:{label:e.$t("baseStyle.level2Node"),name:"second"}}),t("el-tab-pane",{attrs:{label:e.$t("baseStyle.belowLevel2Node"),name:"node"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.horizontal")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginX",t)}},model:{value:e.style.marginX,callback:function(t){e.$set(e.style,"marginX",t)},expression:"style.marginX"}})],1),t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.vertical")))]),t("el-slider",{staticStyle:{width:"200px"},attrs:{max:200},on:{change:t=>{e.updateMargin("marginY",t)}},model:{value:e.style.marginY,callback:function(t){e.$set(e.style,"marginY",t)},expression:"style.marginY"}})],1)],1),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.watermark")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.watermarkShowChange},model:{value:e.watermarkConfig.show,callback:function(t){e.$set(e.watermarkConfig,"show",t)},expression:"watermarkConfig.show"}},[e._v(e._s(e.$t("baseStyle.showWatermark")))])],1)]),e.watermarkConfig.show?[t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkText")))]),t("el-input",{attrs:{size:"small"},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.text,callback:function(t){e.$set(e.watermarkConfig,"text",t)},expression:"watermarkConfig.text"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextColor")))]),t("span",{directives:[{name:"popover",rawName:"v-popover:popover3",arg:"popover3"}],staticClass:"block",style:{backgroundColor:e.watermarkConfig.textStyle.color}}),t("el-popover",{ref:"popover3",attrs:{placement:"bottom",trigger:"click"}},[t("Color",{attrs:{color:e.watermarkConfig.textStyle.color},on:{change:t=>{e.watermarkConfig.textStyle.color=t,e.updateWatermarkConfig()}}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextOpacity")))]),t("el-slider",{staticStyle:{width:"170px"},attrs:{min:0,max:1,step:.1},on:{change:e.updateWatermarkConfig},model:{value:e.watermarkConfig.textStyle.opacity,callback:function(t){e.$set(e.watermarkConfig.textStyle,"opacity",t)},expression:"watermarkConfig.textStyle.opacity"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextFontSize")))]),t("el-input-number",{attrs:{size:"small",min:0,max:50,step:1},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textStyle.fontSize,callback:function(t){e.$set(e.watermarkConfig.textStyle,"fontSize",t)},expression:"watermarkConfig.textStyle.fontSize"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkAngle")))]),t("el-input-number",{attrs:{size:"small",min:0,max:90,step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.angle,callback:function(t){e.$set(e.watermarkConfig,"angle",t)},expression:"watermarkConfig.angle"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkLineSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.lineSpacing,callback:function(t){e.$set(e.watermarkConfig,"lineSpacing",t)},expression:"watermarkConfig.lineSpacing"}})],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.watermarkTextSpacing")))]),t("el-input-number",{attrs:{size:"small",step:10},on:{change:e.updateWatermarkConfig},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.watermarkConfig.textSpacing,callback:function(t){e.$set(e.watermarkConfig,"textSpacing",t)},expression:"watermarkConfig.textSpacing"}})],1)])]:e._e(),t("div",{staticClass:"title noTop"},[e._v(e._s(e.$t("baseStyle.otherConfig")))]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:t=>{e.updateOtherConfig("enableFreeDrag",t)}},model:{value:e.config.enableFreeDrag,callback:function(t){e.$set(e.config,"enableFreeDrag",t)},expression:"config.enableFreeDrag"}},[e._v(e._s(e.$t("baseStyle.enableFreeDrag")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:e.enableNodeRichTextChange},model:{value:e.enableNodeRichText,callback:function(t){e.enableNodeRichText=t},expression:"enableNodeRichText"}},[e._v(e._s(e.$t("baseStyle.isEnableNodeRichText")))])],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelAction")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelAction",t)}},model:{value:e.config.mousewheelAction,callback:function(t){e.$set(e.config,"mousewheelAction",t)},expression:"config.mousewheelAction"}},[t("el-option",{attrs:{label:e.$t("baseStyle.zoomView"),value:"zoom"}}),t("el-option",{attrs:{label:e.$t("baseStyle.moveViewUpDown"),value:"move"}})],1)],1)]),"zoom"===e.config.mousewheelAction?t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.mousewheelZoomActionReverse")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("mousewheelZoomActionReverse",t)}},model:{value:e.config.mousewheelZoomActionReverse,callback:function(t){e.$set(e.config,"mousewheelZoomActionReverse",t)},expression:"config.mousewheelZoomActionReverse"}},[t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse1"),value:!1}}),t("el-option",{attrs:{label:e.$t("baseStyle.mousewheelZoomActionReverse2"),value:!0}})],1)],1)]):e._e(),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("baseStyle.createNewNodeBehavior")))]),t("el-select",{staticStyle:{width:"120px"},attrs:{size:"mini",placeholder:""},on:{change:t=>{e.updateOtherConfig("createNewNodeBehavior",t)}},model:{value:e.config.createNewNodeBehavior,callback:function(t){e.$set(e.config,"createNewNodeBehavior",t)},expression:"config.createNewNodeBehavior"}},[t("el-option",{attrs:{label:e.$t("baseStyle.default"),value:"default"}}),t("el-option",{attrs:{label:e.$t("baseStyle.notActive"),value:"notActive"}}),t("el-option",{attrs:{label:e.$t("baseStyle.activeOnly"),value:"activeOnly"}})],1)],1)]),t("div",{staticClass:"row"},[t("div",{staticClass:"rowItem"},[t("el-checkbox",{on:{change:function(t){return e.updateLocalConfig("isShowScrollbar",t)}},model:{value:e.localConfigs.isShowScrollbar,callback:function(t){e.$set(e.localConfigs,"isShowScrollbar",t)},expression:"localConfigs.isShowScrollbar"}},[e._v(e._s(e.$t("baseStyle.isShowScrollbar")))])],1)])],2):e._e()])},Pp=[],Ip={name:"BaseStyle",components:{Sidebar:cp,Color:Tp,ImgUpload:g},props:{data:{type:[Object,null],default:null},mindMap:{type:Object}},data(){return{lineWidthList:me,fontSizeList:ce,activeTab:"color",marginActiveTab:"second",style:{backgroundColor:"",lineColor:"",lineWidth:"",lineStyle:"",rootLineKeepSameInCurve:"",generalizationLineWidth:"",generalizationLineColor:"",associativeLineColor:"",associativeLineWidth:0,associativeLineActiveWidth:0,associativeLineActiveColor:"",associativeLineTextFontSize:0,associativeLineTextColor:"",associativeLineTextFontFamily:"",paddingX:0,paddingY:0,imgMaxWidth:0,imgMaxHeight:0,iconSize:0,backgroundImage:"",backgroundRepeat:"no-repeat",backgroundPosition:"",backgroundSize:"",marginX:0,marginY:0,nodeUseLineStyle:!1},config:{enableFreeDrag:!1,mousewheelAction:"zoom",mousewheelZoomActionReverse:!1,createNewNodeBehavior:"default"},watermarkConfig:{show:!1,text:"",lineSpacing:100,textSpacing:100,angle:30,textStyle:{color:"",opacity:0,fontSize:1}},updateWatermarkTimer:null,enableNodeRichText:!0,localConfigs:{isShowScrollbar:!1}}},computed:{...Object(se["d"])(["activeSidebar","localConfig","isDark"]),lineStyleList(){return Ue[this.$i18n.locale]||Ue.zh},rootLineKeepSameInCurveList(){return Ge[this.$i18n.locale]||Ge.zh},backgroundRepeatList(){return We[this.$i18n.locale]||We.zh},backgroundPositionList(){return Ve[this.$i18n.locale]||Ve.zh},backgroundSizeList(){return Ye[this.$i18n.locale]||Ye.zh},fontFamilyList(){return je[this.$i18n.locale]||je.zh},lineStyleMap(){return qe[this.$i18n.locale]||qe.zh}},watch:{activeSidebar(e){"baseStyle"===e?(this.$refs.sidebar.show=!0,this.initStyle(),this.initConfig(),this.initWatermark()):this.$refs.sidebar.show=!1}},created(){this.initLoacalConfig(),this.$bus.$on("setData",this.onSetData)},beforeDestroy(){this.$bus.$off("setData",this.onSetData)},methods:{...Object(se["c"])(["setLocalConfig"]),onSetData(){"baseStyle"===this.activeSidebar&&setTimeout(()=>{this.initStyle()},0)},initStyle(){["backgroundColor","lineWidth","lineStyle","rootLineKeepSameInCurve","lineColor","generalizationLineWidth","generalizationLineColor","associativeLineColor","associativeLineWidth","associativeLineActiveWidth","associativeLineActiveColor","associativeLineTextFontSize","associativeLineTextColor","associativeLineTextFontFamily","paddingX","paddingY","imgMaxWidth","imgMaxHeight","iconSize","backgroundImage","backgroundRepeat","backgroundPosition","backgroundSize","nodeUseLineStyle"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig(e),"backgroundImage"===e&&"none"===this.style[e]&&(this.style[e]="")}),this.initMarginStyle()},initConfig(){["enableFreeDrag","mousewheelAction","mousewheelZoomActionReverse","createNewNodeBehavior"].forEach(e=>{this.config[e]=this.mindMap.getConfig(e)})},initLoacalConfig(){this.enableNodeRichText=this.localConfig.openNodeRichText,this.mousewheelAction=this.localConfig.mousewheelAction,this.mousewheelZoomActionReverse=this.localConfig.mousewheelZoomActionReverse,["isShowScrollbar"].forEach(e=>{this.localConfigs[e]=this.localConfig[e]})},initWatermark(){let e=this.mindMap.getConfig("watermarkConfig");["text","lineSpacing","textSpacing","angle"].forEach(t=>{this.watermarkConfig[t]=e[t]}),this.watermarkConfig.show=!!e.text,this.watermarkConfig.textStyle={...e.textStyle}},initMarginStyle(){["marginX","marginY"].forEach(e=>{this.style[e]=this.mindMap.getThemeConfig()[this.marginActiveTab][e]})},update(e,t){this.style[e]="backgroundImage"===e&&"none"===t?"":t,this.data.theme.config[e]=t,this.$bus.$emit("showLoading"),this.mindMap.setThemeConfig(this.data.theme.config),Object(Wi["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},updateOtherConfig(e,t){this.mindMap.updateConfig({[e]:t}),this.data.config=this.data.config||{},this.data.config[e]=t,Object(Wi["d"])({config:this.data.config})},updateWatermarkConfig(){clearTimeout(this.updateWatermarkTimer),this.updateWatermarkTimer=setTimeout(()=>{let{show:e,...t}=this.watermarkConfig;this.mindMap.watermark.updateWatermark({...t}),this.data.config=this.data.config||{},this.data.config.watermarkConfig=this.mindMap.getConfig("watermarkConfig"),Object(Wi["d"])({config:this.data.config})},300)},updateMargin(e,t){this.style[e]=t,this.data.theme.config[this.marginActiveTab]||(this.data.theme.config[this.marginActiveTab]={}),this.data.theme.config[this.marginActiveTab][e]=t,this.mindMap.setThemeConfig(this.data.theme.config),Object(Wi["d"])({theme:{template:this.mindMap.getTheme(),config:this.data.theme.config}})},watermarkShowChange(e){if(e){let e=this.watermarkConfig.text||this.$t("baseStyle.watermarkDefaultText");this.watermarkConfig.text=e}else this.watermarkConfig.text="";this.updateWatermarkConfig()},enableNodeRichTextChange(e){this.mindMap.renderer.textEdit.hideEditTextBox(),this.setLocalConfig({openNodeRichText:e})},updateLocalConfig(e,t){this.setLocalConfig({[e]:t})}}},Rp=Ip,Fp=(n("a9e9"),n("feb0"),Object(p["a"])(Rp,Dp,Pp,!1,null,"46bf1066",null)),zp=Fp.exports,Bp=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("theme.title")}},[t("div",{staticClass:"themeList",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.groupList,(function(e){return t("el-tab-pane",{key:e.name,attrs:{label:e.name,name:e.name}})})),1),e._l(e.currentList,(function(n){return t("div",{key:n.value,staticClass:"themeItem",class:{active:n.value===e.theme},on:{click:function(t){return e.useTheme(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.themeMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])}))],2)])},_p=[];const jp={logicalStructure:n("58cf"),mindMap:n("7992"),organizationStructure:n("57cb"),catalogOrganization:n("bea9"),timeline:n("0cfe"),timeline2:n("4ec2"),fishbone:n("3c2a"),verticalTimeline:n("b47d")},Hp={default:n("facf"),classic:n("5e3f"),minions:n("a57a"),pinkGrape:n("4f8c"),mint:n("d046"),gold:n("7e82"),vitalityOrange:n("7080"),greenLeaf:n("9ed8"),dark2:n("4514"),skyGreen:n("6276"),classic2:n("9876d"),classic3:n("86d9"),classic4:n("5abe"),classicGreen:n("1474"),classicBlue:n("8b92"),blueSky:n("1560"),brainImpairedPink:n("2f97"),dark:n("0d42"),earthYellow:n("8f14"),freshGreen:n("1f76"),freshRed:n("9543"),romanticPurple:n("5843"),simpleBlack:n("0754"),courseGreen:n("3cc4"),coffee:n("dbc4"),redSpirit:n("bc06"),blackHumour:n("b645"),lateNightOffice:n("6ad8"),blackGold:n("1b88"),autumn:n("7f95"),avocado:n("135f"),orangeJuice:n("be49"),oreo:n("daf1"),shallowSea:n("b0a0"),lemonBubbles:n("cb07"),rose:n("0536"),seaBlueLine:n("6c83"),neonLamp:n("1397"),darkNightLceBlade:n("aa39"),morandi:n("9192"),classic5:n("e9d1"),dark3:n("a7a61"),dark4:n("e497"),cactus:n("5a50")},Up=["a^2","a_2","a^{2+2}","a_{i,j}","x_2^3","\\overbrace{1+2+\\cdots+100}","\\sum_{k=1}^N k^2","\\lim_{n \\to \\infty}x_n","\\int_{-N}^{N} e^x\\, dx","\\sqrt{3}","\\sqrt[n]{3}","\\sin\\theta","\\log X","\\log_{10}","\\log_\\alpha X","\\lim_{t\\to n}T","\\frac{1}{2}=0.5","\\binom{n}{k}","\\begin{matrix}x & y \\\\z & v\\end{matrix}","\\begin{cases}3x + 5y + z \\\\7x - 2y + 4z \\\\-6x + 3y + 2z\\end{cases}"];var qp={lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(22, 22, 22)",color:"#fff",borderColor:"rgb(22, 22, 22)",borderWidth:3,fontSize:24},second:{fillColor:"rgb(244, 246, 253)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"transparent",borderColor:"rgb(34, 34, 34)",borderWidth:2,color:"rgb(34, 34, 34)"}},Gp={backgroundColor:"rgb(187, 241, 250)",lineColor:"rgb(74, 139, 170)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 168, 101)",root:{fillColor:"rgb(51, 149, 255)",color:"#fff",borderColor:"rgb(51, 149, 255)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(74, 139, 170)",color:"#fff",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 168, 101)",borderWidth:2,color:"#000"}},Wp={backgroundColor:"rgb(236, 254, 255)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(51, 51, 51)",root:{fillColor:"rgb(39, 222, 232)",color:"rgb(26, 26, 26)",borderColor:"rgb(26, 26, 26)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(235, 255, 187)",color:"rgb(0, 0, 0)",borderColor:"rgb(51, 51, 51)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(26, 26, 26)",borderWidth:2,color:"rgb(26, 26, 26)"}},Vp={backgroundColor:"rgb(255, 251, 231)",lineColor:"rgb(110, 165, 79)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(136, 100, 0)",root:{fillColor:"rgb(254, 92, 92)",color:"#fff",borderColor:"rgb(18, 187, 55)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(209, 237, 176)",color:"rgb(85, 136, 55)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(26, 26, 26)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(136, 100, 0)",borderWidth:2,color:"rgb(136, 100, 0)"}},Yp={backgroundColor:"rgb(231, 245, 255)",lineColor:"rgb(96, 189, 255)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(0, 155, 255)",root:{fillColor:"rgb(96, 189, 255)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(0, 149, 255)",borderColor:"",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(0, 66, 157)"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 155, 255)",borderWidth:2,color:"rgb(0, 155, 255)"}},Zp={backgroundColor:"rgb(17, 17, 84)",lineColor:"rgb(255, 0, 214)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 181, 0)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(251, 233, 248)",color:"rgb(208, 5, 176)",borderColor:"rgb(255, 0, 214)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"transparent",color:"rgb(248, 177, 237)",borderColor:"",borderWidth:3,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(255, 181, 0)",borderWidth:2,color:"rgb(17, 17, 84)"}},Kp={backgroundColor:"rgb(0, 21, 21)",lineColor:"rgb(0, 139, 146)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgba(2, 167, 240, 0.5)",associativeLineColor:"rgb(255, 255, 255)",associativeLineTextColor:"rgb(255, 255, 255)",root:{fillColor:"rgb(0, 243, 255)",color:"rgb(0, 21, 21)",borderColor:"#fff",borderWidth:3,fontSize:24,shape:"parallelogram"},second:{fillColor:"rgb(0, 21, 21)",color:"#fff",borderColor:"#fff",borderWidth:3,fontSize:18,shape:"diamond"},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"rgb(0, 117, 255)",borderWidth:2,color:"rgb(0, 21, 21)"}},Xp={backgroundColor:"rgb(252, 245, 241)",lineColor:"rgb(144, 114, 110)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(128, 154, 151)",associativeLineColor:"rgb(166, 124, 106)",associativeLineTextColor:"rgb(166, 124, 106)",root:{fillColor:"rgb(207, 121, 105)",color:"#fff",borderColor:"rgb(207, 121, 105)",borderWidth:3,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(239, 210, 207)",color:"rgb(144, 79, 68)",borderColor:"rgb(222, 186, 183)",borderWidth:3,fontSize:18,shape:"roundedRectangle"},node:{fontSize:14,color:"rgb(131, 90, 64)"},generalization:{fontSize:14,fillColor:"rgb(172, 202, 199)",borderColor:"rgb(172, 202, 199)",borderWidth:2,color:"rgb(91, 102, 97)"}},Jp={backgroundColor:"rgb(233, 245, 241)",lineColor:"rgb(34, 34, 34)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(34, 34, 34)",associativeLineColor:"rgb(56, 44, 116)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(56, 44, 116)",color:"#fff",borderColor:"rgb(56, 44, 116)",borderWidth:0,fontSize:24},second:{fillColor:"rgb(161, 213, 188)",color:"rgb(0, 0, 0)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(56, 44, 116)",borderColor:"",borderWidth:0,color:"#fff"}},Qp={backgroundColor:"rgb(0, 0, 0)",lineColor:"rgb(172, 172, 172)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(172, 172, 172)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"#fff",color:"rgb(241, 79, 81)",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"rgb(241, 79, 81)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"#fff",borderColor:"",borderWidth:0,color:"rgb(241, 79, 81)"}},$p={backgroundColor:"rgb(32, 34, 43)",lineColor:"rgb(90, 136, 116)",lineWidth:2,generalizationLineWidth:2,generalizationLineColor:"rgb(90, 136, 116)",associativeLineColor:"rgb(57, 130, 252)",associativeLineTextColor:"rgb(68, 68, 68)",root:{fillColor:"rgb(1, 192, 116)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24},second:{fillColor:"rgb(48, 51, 63)",color:"#fff",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"#fff"},generalization:{fontSize:14,fillColor:"rgb(1, 192, 116)",borderColor:"",borderWidth:0,color:"#fff"}},em={backgroundColor:"rgb(219, 255, 211)",lineColor:"rgb(51, 51, 51)",lineWidth:3,generalizationLineWidth:3,generalizationLineColor:"rgb(255, 127, 71)",associativeLineColor:"rgb(160, 220, 63)",associativeLineTextColor:"rgb(160, 220, 63)",root:{fillColor:"rgb(15, 198, 113)",color:"#fff",borderColor:"",borderWidth:0,fontSize:24,shape:"roundedRectangle"},second:{fillColor:"#fff",color:"rgb(26, 26, 26)",borderColor:"",borderWidth:0,fontSize:18},node:{fontSize:14,color:"rgb(0, 0, 0)"},generalization:{fontSize:14,fillColor:"rgb(255, 127, 71)",borderColor:"",borderWidth:0,color:"#fff"}},tm=[{name:"奥利奥",value:"oreo",theme:qp,dark:!1},{name:"浅海",value:"shallowSea",theme:Gp,dark:!1},{name:"柠檬气泡",value:"lemonBubbles",theme:Wp,dark:!1},{name:"玫瑰",value:"rose",theme:Vp,dark:!1},{name:"海蓝线",value:"seaBlueLine",theme:Yp,dark:!1},{name:"霓虹灯",value:"neonLamp",theme:Zp,dark:!0},{name:"暗夜冰刃",value:"darkNightLceBlade",theme:Kp,dark:!0},{name:"莫兰迪",value:"morandi",theme:Xp,dark:!1},{name:"脑图经典5",value:"classic5",theme:Jp,dark:!1},{name:"暗色3",value:"dark3",theme:Qp,dark:!0},{name:"暗色4",value:"dark4",theme:$p,dark:!0},{name:"仙人掌",value:"cactus",theme:em,dark:!1}],nm={name:"Theme",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{themeList:[...oo["k"],...tm].reverse(),themeMap:Hp,theme:"",activeName:"",groupList:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),currentList(){return this.groupList.find(e=>e.name===this.activeName).list}},watch:{activeSidebar(e){"theme"===e?(this.theme=this.mindMap.getTheme(),this.handleDark(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},created(){this.initGroup(),this.theme=this.mindMap.getTheme(),this.handleDark(),this.mindMap.on("view_theme_change",this.handleViewThemeChange)},beforeDestroy(){this.mindMap.off("view_theme_change",this.handleViewThemeChange)},methods:{...Object(se["c"])(["setIsDark"]),handleViewThemeChange(){this.theme=this.mindMap.getTheme(),this.handleDark()},initGroup(){let e=["default","skyGreen","classic2","classic3","classicGreen","classicBlue","blueSky","brainImpairedPink","earthYellow","freshGreen","freshRed","romanticPurple","pinkGrape","mint"],t=[],n=[];this.themeList.forEach(r=>{e.includes(r.value)?t.push(r):r.dark||n.push(r)}),this.groupList=[{name:this.$t("theme.classics"),list:n},{name:this.$t("theme.dark"),list:this.themeList.filter(e=>e.dark)},{name:this.$t("theme.simple"),list:t}],this.activeName=this.groupList[0].name},useTheme(e){if(e.value===this.theme)return;this.theme=e.value,this.handleDark();const t=this.mindMap.getCustomThemeConfig(),n=Object.keys(t).length>0;n?this.$confirm(this.$t("theme.coverTip"),this.$t("theme.tip"),{confirmButtonText:this.$t("theme.cover"),cancelButtonText:this.$t("theme.reserve"),type:"warning"}).then(()=>{this.mindMap.setThemeConfig({},!0),this.changeTheme(e,{})}).catch(()=>{this.changeTheme(e,t)}):this.changeTheme(e,t)},changeTheme(e,t){this.$bus.$emit("showLoading"),this.mindMap.setTheme(e.value),Object(Wi["d"])({theme:{template:e.value,config:t}})},handleDark(){let e=this.themeList.find(e=>e.value===this.theme);this.setIsDark(e.dark)}}},rm=nm,im=(n("8952"),Object(p["a"])(rm,Bp,_p,!1,null,"80f2e6de",null)),om=im.exports,am=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("strusture.title")}},[t("div",{staticClass:"layoutList",class:{isDark:e.isDark}},e._l(e.layoutList,(function(n){return t("div",{key:n.value,staticClass:"layoutItem",class:{active:n.value===e.layout},on:{click:function(t){return e.useLayout(n)}}},[t("div",{staticClass:"imgBox"},[t("img",{attrs:{src:e.layoutImgMap[n.value],alt:""}})]),t("div",{staticClass:"name"},[e._v(e._s(n.name))])])})),0)])},sm=[],lm={name:"Structure",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{layoutList:oo["g"],layoutImgMap:jp,layout:""}},computed:{...Object(se["d"])(["activeSidebar","isDark"])},watch:{activeSidebar(e){"structure"===e?(this.layout=this.mindMap.getLayout(),this.$refs.sidebar.show=!0):this.$refs.sidebar.show=!1}},methods:{useLayout(e){this.layout=e.value,this.mindMap.setLayout(e.value),Object(Wi["d"])({layout:e.value})}}},cm=lm,um=(n("da5b"),Object(p["a"])(cm,am,sm,!1,null,"a218ac20",null)),hm=um.exports,dm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"countContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.words")))]),t("span",{staticClass:"value"},[e._v(e._s(e.words))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("count.nodes")))]),t("span",{staticClass:"value"},[e._v(e._s(e.num))])])])},fm=[];let pm=document.createElement("div");var mm={name:"Count",props:{mindMap:{type:Object}},data(){return{textStr:"",words:0,num:0}},computed:{...Object(se["d"])(["isDark"])},created(){this.$bus.$on("data_change",this.onDataChange),this.mindMap&&this.onDataChange(this.mindMap.getData())},beforeDestroy(){this.$bus.$off("data_change",this.onDataChange)},methods:{onDataChange(e){this.textStr="",this.words=0,this.num=0,this.walk(e),pm.innerHTML=this.textStr,this.words=pm.textContent.length},walk(e){this.num++,this.textStr+=String(e.data.text)||"",e.children&&e.children.length>0&&e.children.forEach(e=>{this.walk(e)})}}},gm=mm,vm=(n("bf32"),Object(p["a"])(gm,dm,fm,!1,null,"0770e0d2",null)),bm=vm.exports,ym=function(){var e=this,t=e._self._c;return t("div",{staticClass:"navigatorContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"item"},[t("el-select",{staticStyle:{width:"100px"},attrs:{size:"small"},on:{change:e.onLangChange},model:{value:e.lang,callback:function(t){e.lang=t},expression:"lang"}},e._l(e.langList,(function(e){return t("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont iconsousuo",on:{click:e.showSearch}})]),t("div",{staticClass:"item"},[t("MouseAction",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.openMiniMap?e.$t("navigatorToolbar.closeMiniMap"):e.$t("navigatorToolbar.openMiniMap"),placement:"top"}},[t("div",{staticClass:"btn iconfont icondaohang1",on:{click:e.toggleMiniMap}})])],1),t("div",{staticClass:"item"},[t("el-tooltip",{attrs:{effect:"dark",content:e.isReadonly?e.$t("navigatorToolbar.edit"):e.$t("navigatorToolbar.readonly"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.isReadonly?"iconyanjing":"iconbianji1"],on:{click:e.readonlyChange}})])],1),t("div",{staticClass:"item"},[t("Fullscreen",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("Scale",{attrs:{isDark:e.isDark,mindMap:e.mindMap}})],1),t("div",{staticClass:"item"},[t("div",{staticClass:"btn iconfont",class:[e.isDark?"iconmoon_line":"iconlieri"],on:{click:e.toggleDark}})]),t("div",{staticClass:"item"},[t("el-dropdown",{on:{command:e.handleCommand}},[t("div",{staticClass:"btn iconfont iconbangzhu"}),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"github"}},[e._v("Github")]),t("el-dropdown-item",{attrs:{command:"helpDoc"}},[e._v("使用文档")]),t("el-dropdown-item",{attrs:{command:"devDoc"}},[e._v("开发文档")]),t("el-dropdown-item",{attrs:{command:"site"}},[e._v("官方网站")]),t("el-dropdown-item",{attrs:{command:"issue"}},[e._v("意见反馈")]),t("el-dropdown-item",{attrs:{disabled:""}},[e._v("当前:v"+e._s(e.version))])],1)],1)],1)])},wm=[],xm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scaleContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomOut"),placement:"top"}},[t("div",{staticClass:"btn el-icon-minus",on:{click:e.narrow}})]),t("div",{staticClass:"scaleInfo"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.scaleNum,expression:"scaleNum"}],attrs:{type:"text"},domProps:{value:e.scaleNum},on:{change:e.onScaleNumChange,focus:e.onScaleNumInputFocus,input:function(t){t.target.composing||(e.scaleNum=t.target.value)}}}),e._v("% ")]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("scale.zoomIn"),placement:"top"}},[t("div",{staticClass:"btn el-icon-plus",on:{click:e.enlarge}})])],1)},km=[],Am={name:"Scale",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{scaleNum:100,cacheScaleNum:0}},watch:{mindMap(e,t){e&&!t&&(this.mindMap.on("scale",e=>{this.scaleNum=this.toPer(e)}),this.scaleNum=this.toPer(this.mindMap.view.scale))}},methods:{toPer(e){return(100*e).toFixed(0)},narrow(){this.mindMap.view.narrow()},enlarge(){this.mindMap.view.enlarge()},onScaleNumInputFocus(){this.cacheScaleNum=this.scaleNum},onScaleNumChange(){const e=Number(this.scaleNum);if(Number.isNaN(e)||e<=0)this.scaleNum=this.cacheScaleNum;else{const e=this.mindMap.width/2,t=this.mindMap.height/2;this.mindMap.view.setScale(this.scaleNum/100,e,t)}}}},Cm=Am,Em=(n("6ffb0"),Object(p["a"])(Cm,xm,km,!1,null,"07c47fcc",null)),Sm=Em.exports,Tm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"fullscreenContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenShow"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping",on:{click:e.toFullscreenShow}})]),t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.$t("fullscreen.fullscreenEdit"),placement:"top"}},[t("div",{staticClass:"btn iconfont iconquanping1",on:{click:e.toFullscreenEdit}})])],1)},Nm=[],Mm={name:"Fullscreen",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},created(){document[Ri]=()=>{setTimeout(()=>{this.mindMap.resize()},1e3)}},methods:{toFullscreenShow(){Fi(this.mindMap.el)},toFullscreenEdit(){Fi(document.body)}}},Lm=Mm,Om=(n("7812"),Object(p["a"])(Lm,Tm,Nm,!1,null,"1bcbabda",null)),Dm=Om.exports,Pm=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mouseActionContainer",class:{isDark:e.isDark}},[t("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.useLeftKeySelectionRightKeyDrag?e.$t("mouseAction.tip2"):e.$t("mouseAction.tip1"),placement:"top"}},[t("div",{staticClass:"btn iconfont",class:[e.useLeftKeySelectionRightKeyDrag?"iconmouseR":"iconmouseL"],on:{click:e.toggleAction}})])],1)},Im=[],Rm={name:"MouseAction",props:{mindMap:{type:Object},isDark:{type:Boolean}},data(){return{}},computed:{...Object(se["d"])({useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag})},methods:{...Object(se["c"])(["setLocalConfig"]),toggleAction(){let e=!this.useLeftKeySelectionRightKeyDrag;this.mindMap.updateConfig({useLeftKeySelectionRightKeyDrag:e}),this.setLocalConfig({useLeftKeySelectionRightKeyDrag:e})}}},Fm=Rm,zm=(n("ad01"),Object(p["a"])(Fm,Pm,Im,!1,null,"a1887b1e",null)),Bm=zm.exports,_m=n("9225"),jm=n("a06c"),Hm={name:"NavigatorToolbar",components:{Scale:Sm,Fullscreen:Dm,MouseAction:Bm},props:{mindMap:{type:Object}},data(){return{version:jm.version,langList:Se,lang:"",openMiniMap:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},created(){this.lang=Object(Wi["b"])()},methods:{...Object(se["c"])(["setIsDark","setIsReadonly"]),readonlyChange(){this.setIsReadonly(!this.isReadonly),this.mindMap.setMode(this.isReadonly?"readonly":"edit")},toggleMiniMap(){this.openMiniMap=!this.openMiniMap,this.$bus.$emit("toggle_mini_map",this.openMiniMap)},onLangChange(e){_m["a"].locale=e,Object(Wi["f"])(e),this.$bus.$emit("lang_change")},showSearch(){this.$bus.$emit("show_search")},toggleDark(){this.setIsDark(!this.isDark)},handleCommand(e){let t="";switch(e){case"github":t="https://github.com/wanglin2/mind-map";break;case"helpDoc":t="https://wanglin2.github.io/mind-map/#/help/zh/";break;case"devDoc":t="https://wanglin2.github.io/mind-map/#/doc/zh/introduction/";break;case"site":t="https://wanglin2.github.io/mind-map/#/index";break;case"issue":t="https://github.com/wanglin2/mind-map/issues/new";break;default:break}const n=document.createElement("a");n.href=t,n.target="_blank",n.click()}}},Um=Hm,qm=(n("eb43"),Object(p["a"])(Um,ym,wm,!1,null,"1f9b5dca",null)),Gm=qm.exports,Wm=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("shortcutKey.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},e._l(e.shortcutKeyList,(function(n){return t("div",{key:n.type},[t("div",{staticClass:"title"},[e._v(e._s(n.type))]),e._l(n.list,(function(n){return t("div",{key:n.value,staticClass:"list"},[t("div",{staticClass:"item"},[n.icon?t("span",{staticClass:"icon iconfont",class:[n.icon]}):e._e(),t("span",{staticClass:"name",attrs:{title:n.name}},[e._v(e._s(n.name))]),t("div",{staticClass:"value",attrs:{title:n.value}},[e._v(e._s(n.value))])])])}))],2)})),0)])},Vm=[],Ym={name:"ShortcutKey",components:{Sidebar:cp},data(){return{}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),shortcutKeyList(){return Ze[this.$i18n.locale]||Ze.zh}},watch:{activeSidebar(e){this.$refs.sidebar.show="shortcutKey"===e}}},Zm=Ym,Km=(n("56c4"),Object(p["a"])(Zm,Wm,Vm,!1,null,"cff0b1d2",null)),Xm=Km.exports,Jm=function(){var e=this,t=e._self._c;return e.isShow?t("div",{staticClass:"contextmenuContainer listBox",class:{isDark:e.isDark},style:{left:e.left+"px",top:e.top+"px"}},["node"===e.type?[t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_NODE",e.insertNodeBtnDisabled)}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSiblingNode")))]),t("span",{staticClass:"desc"},[e._v("Enter")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("INSERT_CHILD_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertChildNode")))]),t("span",{staticClass:"desc"},[e._v("Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("INSERT_PARENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertParentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Tab")])]),t("div",{staticClass:"item",class:{disabled:e.insertNodeBtnDisabled},on:{click:function(t){return e.exec("ADD_GENERALIZATION")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.insertSummary")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + G")])]),t("div",{staticClass:"item",class:{disabled:e.upNodeBtnDisabled},on:{click:function(t){return e.exec("UP_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveUpNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↑")])]),t("div",{staticClass:"item",class:{disabled:e.downNodeBtnDisabled},on:{click:function(t){return e.exec("DOWN_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.moveDownNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + ↓")])]),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteNode")))]),t("span",{staticClass:"desc"},[e._v("Delete")])]),t("div",{staticClass:"item danger",on:{click:function(t){return e.exec("REMOVE_CURRENT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.deleteCurrentNode")))]),t("span",{staticClass:"desc"},[e._v("Shift + Backspace")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("COPY_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.copyNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + C")])]),t("div",{staticClass:"item",class:{disabled:e.isGeneralization},on:{click:function(t){return e.exec("CUT_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.cutNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + X")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("PASTE_NODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.pasteNode")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + V")])]),e.hasHyperlink?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_HYPERLINK")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeHyperlink")))])]):e._e(),e.hasNote?t("div",{staticClass:"item",on:{click:function(t){return e.exec("REMOVE_NOTE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.removeNote")))])]):e._e()]:e._e(),"svg"===e.type?[t("div",{staticClass:"item",on:{click:function(t){return e.exec("RETURN_CENTER")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.backCenter")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + Enter")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("EXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandAll")))])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_ALL")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.unExpandAll")))])]),t("div",{staticClass:"item"},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.expandTo")))]),t("div",{staticClass:"subItems listBox",class:{isDark:e.isDark}},e._l(e.expandList,(function(n,r){return t("div",{key:n,staticClass:"item",on:{click:function(t){return e.exec("UNEXPAND_TO_LEVEL",!1,r+1)}}},[e._v(" "+e._s(n)+" ")])})),0)]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("RESET_LAYOUT")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.arrangeLayout")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + L")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("FIT_CANVAS")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.fitCanvas")))]),t("span",{staticClass:"desc"},[e._v("Ctrl + i")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exec("TOGGLE_ZEN_MODE")}}},[t("span",{staticClass:"name"},[e._v(e._s(e.$t("contextmenu.zenMode")))]),e._v(" "+e._s(e.isZenMode?"√":"")+" ")])]:e._e()],2):e._e()},Qm=[],$m={name:"Contextmenu",props:{mindMap:{type:Object}},data(){return{isShow:!1,left:0,top:0,node:null,type:"",isMousedown:!1,mosuedownX:0,mosuedownY:0}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.isDark}),expandList(){return[this.$t("contextmenu.level1"),this.$t("contextmenu.level2"),this.$t("contextmenu.level3"),this.$t("contextmenu.level4"),this.$t("contextmenu.level5"),this.$t("contextmenu.level6")]},insertNodeBtnDisabled(){return!this.node||this.node.isRoot||this.node.isGeneralization},upNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=0===this.node.parent.children.findIndex(e=>e===this.node);return e},downNodeBtnDisabled(){if(!this.node||this.node.isRoot||this.node.isGeneralization)return!0;let e=this.node.parent.children,t=e.findIndex(e=>e===this.node)===e.length-1;return t},isGeneralization(){return this.node.isGeneralization},hasHyperlink(){return!!this.node.getData("hyperlink")},hasNote(){return!!this.node.getData("note")}},created(){this.$bus.$on("node_contextmenu",this.show),this.$bus.$on("node_click",this.hide),this.$bus.$on("draw_click",this.hide),this.$bus.$on("expand_btn_click",this.hide),this.$bus.$on("svg_mousedown",this.onMousedown),this.$bus.$on("mouseup",this.onMouseup)},beforeDestroy(){this.$bus.$off("node_contextmenu",this.show),this.$bus.$off("node_click",this.hide),this.$bus.$off("draw_click",this.hide),this.$bus.$off("expand_btn_click",this.hide),this.$bus.$off("svg_mousedown",this.onMousedown),this.$bus.$off("mouseup",this.onMouseup)},methods:{...Object(se["c"])(["setLocalConfig"]),show(e,t){this.type="node",this.left=e.clientX+10,this.top=e.clientY+10,this.isShow=!0,this.node=t},onMousedown(e){3===e.which&&(this.mosuedownX=e.clientX,this.mosuedownY=e.clientY,this.isMousedown=!0)},onMouseup(e){this.isMousedown&&(this.isMousedown=!1,Math.abs(this.mosuedownX-e.clientX)>3||Math.abs(this.mosuedownY-e.clientY)>3?this.hide():this.show2(e))},show2(e){this.type="svg",this.left=e.clientX+10,this.top=e.clientY+10,this.isShow=!0},hide(){this.isShow=!1,this.left=0,this.top=0,this.type=""},exec(e,t,...n){if(!t){switch(e){case"COPY_NODE":this.mindMap.renderer.copy();break;case"CUT_NODE":this.mindMap.renderer.cut();break;case"PASTE_NODE":this.mindMap.renderer.paste();break;case"RETURN_CENTER":this.mindMap.renderer.setRootNodeCenter();break;case"TOGGLE_ZEN_MODE":this.setLocalConfig({isZenMode:!this.isZenMode});break;case"FIT_CANVAS":this.mindMap.view.fit();break;case"REMOVE_HYPERLINK":this.node.setHyperlink("","");break;case"REMOVE_NOTE":this.node.setNote("");break;default:this.$bus.$emit("execCommand",e,...n);break}this.hide()}}}},eg=$m,tg=(n("fca3"),Object(p["a"])(eg,Jm,Qm,!1,null,"dbfd708e",null)),ng=tg.exports,rg=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showRichTextToolbar,expression:"showRichTextToolbar"}],ref:"richTextToolbar",staticClass:"richTextToolbar",class:{isDark:e.isDark},style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.bold"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.bold},on:{click:e.toggleBold}},[t("span",{staticClass:"icon iconfont iconzitijiacu"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.italic"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.italic},on:{click:e.toggleItalic}},[t("span",{staticClass:"icon iconfont iconzitixieti"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.underline"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.underline},on:{click:e.toggleUnderline}},[t("span",{staticClass:"icon iconfont iconzitixiahuaxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.strike"),placement:"top"}},[t("div",{staticClass:"btn",class:{active:e.formatInfo.strike},on:{click:e.toggleStrike}},[t("span",{staticClass:"icon iconfont iconshanchuxian"})])]),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontFamily"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontFamilyList,(function(n){return t("div",{key:n.value,staticClass:"fontOptionItem",class:{active:e.formatInfo.font===n.value},style:{fontFamily:n.value},on:{click:function(t){return e.changeFontFamily(n.value)}}},[e._v(" "+e._s(n.name)+" ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconxingzhuang-wenzi"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.fontSize"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("div",{staticClass:"fontOptionsList",class:{isDark:e.isDark}},e._l(e.fontSizeList,(function(n){return t("div",{key:n,staticClass:"fontOptionItem",class:{active:e.formatInfo.size===n+"px"},style:{fontSize:n+"px"},on:{click:function(t){return e.changeFontSize(n)}}},[e._v(" "+e._s(n)+"px ")])})),0),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconcase fontColor"})])])],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.color"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontColor},on:{change:e.changeFontColor}}),t("div",{staticClass:"btn",style:{color:e.formatInfo.color},attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconzitiyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.backgroundColor"),placement:"top"}},[t("el-popover",{attrs:{placement:"bottom",trigger:"hover"}},[t("Color",{attrs:{color:e.fontBackgroundColor},on:{change:e.changeFontBackgroundColor}}),t("div",{staticClass:"btn",attrs:{slot:"reference"},slot:"reference"},[t("span",{staticClass:"icon iconfont iconbeijingyanse"})])],1)],1),t("el-tooltip",{attrs:{content:e.$t("richTextToolbar.removeFormat"),placement:"top"}},[t("div",{staticClass:"btn",on:{click:e.removeFormat}},[t("span",{staticClass:"icon iconfont iconqingchu"})])])],1)},ig=[],og={name:"RichTextToolbar",components:{Color:Tp},props:{mindMap:{type:Object}},data(){return{fontSizeList:ce,showRichTextToolbar:!1,style:{left:0,top:0},fontColor:"",fontBackgroundColor:"",formatInfo:{}}},computed:{...Object(se["d"])(["isDark"]),fontFamilyList(){return je[this.$i18n.locale]||je.zh}},created(){this.$bus.$on("rich_text_selection_change",this.onRichTextSelectionChange)},mounted(){document.body.append(this.$refs.richTextToolbar)},beforeDestroy(){this.$bus.$off("rich_text_selection_change",this.onRichTextSelectionChange)},methods:{onRichTextSelectionChange(e,t,n){e&&(this.style.left=t.left+t.width/2+"px",this.style.top=t.top-60+"px",this.formatInfo={...n||{}}),this.showRichTextToolbar=e},toggleBold(){this.formatInfo.bold=!this.formatInfo.bold,this.mindMap.richText.formatText({bold:this.formatInfo.bold})},toggleItalic(){this.formatInfo.italic=!this.formatInfo.italic,this.mindMap.richText.formatText({italic:this.formatInfo.italic})},toggleUnderline(){this.formatInfo.underline=!this.formatInfo.underline,this.mindMap.richText.formatText({underline:this.formatInfo.underline})},toggleStrike(){this.formatInfo.strike=!this.formatInfo.strike,this.mindMap.richText.formatText({strike:this.formatInfo.strike})},changeFontFamily(e){this.formatInfo.font=e,this.mindMap.richText.formatText({font:e})},changeFontSize(e){this.formatInfo.size=e,this.mindMap.richText.formatText({size:e+"px"})},changeFontColor(e){this.formatInfo.color=e,this.mindMap.richText.formatText({color:e})},changeFontBackgroundColor(e){this.formatInfo.background=e,this.mindMap.richText.formatText({background:e})},removeFormat(){this.mindMap.richText.removeFormat()}}},ag=og,sg=(n("146c"),Object(p["a"])(ag,rg,ig,!1,null,"50a360a9",null)),lg=sg.exports,cg=function(){var e=this,t=e._self._c;return t("div",{ref:"noteContentViewer",staticClass:"noteContentViewer",style:{left:this.left+"px",top:this.top+"px",visibility:e.show?"visible":"hidden"},on:{click:function(e){e.stopPropagation()}}})},ug=[],hg=n("f059"),dg=n.n(hg),fg=(n("fe5f"),{name:"NodeNoteContentShow",data(){return{editor:null,show:!1,left:0,top:0,node:null}},created(){this.$bus.$on("showNoteContent",this.onShowNoteContent),this.$bus.$on("hideNoteContent",this.hideNoteContent),document.body.addEventListener("click",this.hideNoteContent),this.$bus.$on("node_active",this.hideNoteContent),this.$bus.$on("scale",this.onScale),this.$bus.$on("svg_mousedown",this.hideNoteContent)},mounted(){this.initEditor()},beforeDestroy(){this.$bus.$off("showNoteContent",this.onShowNoteContent),this.$bus.$off("hideNoteContent",this.hideNoteContent),document.body.removeEventListener("click",this.hideNoteContent),this.$bus.$off("node_active",this.hideNoteContent),this.$bus.$off("scale",this.onScale),this.$bus.$off("svg_mousedown",this.hideNoteContent)},methods:{onShowNoteContent(e,t,n,r){this.node=r,this.editor.setMarkdown(e),this.updateNoteContentPosition(t,n),this.show=!0},updateNoteContentPosition(e,t){this.left=e,this.top=t},onScale(){if(!this.node||!this.show)return;const{left:e,top:t}=this.node.getNoteContentPosition();this.updateNoteContentPosition(e,t)},hideNoteContent(){this.show=!1},initEditor(){this.editor||(this.editor=new dg.a({el:this.$refs.noteContentViewer}))}}}),pg=fg,mg=(n("3aa9"),Object(p["a"])(pg,cg,ug,!1,null,"1484624c",null)),gg=mg.exports,vg=function(){var e=this,t=e._self._c;return e.showMiniMap?t("div",{ref:"navigatorBox",staticClass:"navigatorBox",class:{isDark:e.isDark},on:{mousedown:e.onMousedown,mousemove:e.onMousemove,mouseup:e.onMouseup}},[t("div",{ref:"svgBox",staticClass:"svgBox",style:{transform:`scale(${e.svgBoxScale})`,left:e.svgBoxLeft+"px",top:e.svgBoxTop+"px"}},[t("img",{attrs:{src:e.mindMapImg},on:{mousedown:function(e){e.preventDefault()}}})]),t("div",{staticClass:"windowBox",style:e.viewBoxStyle})]):e._e()},bg=[],yg={props:{mindMap:{type:Object}},data(){return{showMiniMap:!1,timer:null,boxWidth:0,boxHeight:0,svgBoxScale:1,svgBoxLeft:0,svgBoxTop:0,viewBoxStyle:{left:0,top:0,bottom:0,right:0},mindMapImg:""}},computed:{...Object(se["d"])(["isDark"])},mounted(){this.$bus.$on("toggle_mini_map",this.toggle_mini_map),this.$bus.$on("data_change",this.data_change),this.$bus.$on("view_data_change",this.data_change),this.$bus.$on("node_tree_render_end",this.data_change)},destroyed(){this.$bus.$off("toggle_mini_map",this.toggle_mini_map),this.$bus.$off("data_change",this.data_change),this.$bus.$off("view_data_change",this.data_change),this.$bus.$off("node_tree_render_end",this.data_change)},methods:{toggle_mini_map(e){this.showMiniMap=e,this.$nextTick(()=>{this.$refs.navigatorBox&&this.init(),this.$refs.svgBox&&this.drawMiniMap()})},data_change(){this.showMiniMap&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.drawMiniMap()},500))},init(){let{width:e,height:t}=this.$refs.navigatorBox.getBoundingClientRect();this.boxWidth=e,this.boxHeight=t},drawMiniMap(){let{getImgUrl:e,viewBoxStyle:t,miniMapBoxScale:n,miniMapBoxLeft:r,miniMapBoxTop:i}=this.mindMap.miniMap.calculationMiniMap(this.boxWidth,this.boxHeight);e(e=>{this.mindMapImg=e}),this.viewBoxStyle=t,this.svgBoxScale=n,this.svgBoxLeft=r,this.svgBoxTop=i},onMousedown(e){this.mindMap.miniMap.onMousedown(e)},onMousemove(e){this.mindMap.miniMap.onMousemove(e)},onMouseup(e){this.mindMap.miniMap.onMouseup(e)}}},wg=yg,xg=(n("a121"),Object(p["a"])(wg,vg,bg,!1,null,"c41a0b0a",null)),kg=xg.exports,Ag=function(){var e=this,t=e._self._c;return t("viewer",{attrs:{images:e.images}},e._l(e.images,(function(e){return t("img",{key:e,attrs:{src:e}})})),0)},Cg=[],Eg={props:{mindMap:{type:Object,default(){return null}}},data(){return{images:[]}},mounted(){this.mindMap.on("node_img_dblclick",this.onNodeTmgDblclick)},beforeDestroy(){this.mindMap.off("node_img_dblclick",this.onNodeTmgDblclick)},methods:{onNodeTmgDblclick(e,t){t.stopPropagation(),t.preventDefault(),this.images=[e.nodeData.data.image],this.$viewerApi({images:this.images})}}},Sg=Eg,Tg=Object(p["a"])(Sg,Ag,Cg,!1,null,null,null),Ng=Tg.exports,Mg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebarTriggerContainer",class:{hasActive:e.show&&e.activeSidebar,show:e.show,isDark:e.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"toggleShowBtn",class:{hide:!e.show},on:{click:function(t){e.show=!e.show}}},[t("span",{staticClass:"iconfont iconjiantouyou"})]),t("div",{staticClass:"trigger"},e._l(e.triggerList,(function(n){return t("div",{key:n.value,staticClass:"triggerItem",class:{active:e.activeSidebar===n.value},on:{click:function(t){return e.trigger(n)}}},[t("div",{staticClass:"triggerIcon iconfont",class:[n.icon]}),t("div",{staticClass:"triggerName"},[e._v(e._s(n.name))])])})),0)])},Lg=[],Og={name:"SidebarTrigger",data(){return{show:!0}},computed:{...Object(se["d"])(["activeSidebar","isDark"]),triggerList(){return Je[this.$i18n.locale]||Je.zh}},methods:{...Object(se["c"])(["setActiveSidebar"]),trigger(e){this.setActiveSidebar(e.value)}}},Dg=Og,Pg=(n("7100"),Object(p["a"])(Dg,Mg,Lg,!1,null,"7fe703e0",null)),Ig=Pg.exports,Rg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"customNodeContent"},[t("p",[e._v(e._s(e.title))]),t("p",{domProps:{innerHTML:e._s(e.html)}}),t("p",{style:{backgroundColor:e.color},on:{click:e.onClick}},[e._v("点击我会变色")])])},Fg=[],zg={props:{html:{type:String,default:""}},data(){return{title:"我是自定义节点",color:""}},methods:{onClick(){this.color="red"}}},Bg=zg,_g=(n("7cb3"),Object(p["a"])(Bg,Rg,Fg,!1,null,"6ef61ceb",null)),jg=(_g.exports,n("41cb"),n("c0d6"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"searchContainer",class:{isDark:e.isDark,show:e.show},on:{mouseleave:e.onMouseleave}},[t("div",{staticClass:"closeBtnBox"},[t("span",{staticClass:"closeBtn el-icon-close",on:{click:e.close}})]),t("div",{staticClass:"searchInputBox"},[t("el-input",{ref:"searchInputRef",attrs:{placeholder:e.$t("search.searchPlaceholder"),size:"small"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.onSearchNext.apply(null,arguments))},keydown:function(e){e.stopPropagation()}},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"}),e.isUndef(e.searchText)?e._e():t("el-button",{attrs:{slot:"append",size:"small"},on:{click:function(t){e.showReplaceInput=!0}},slot:"append"},[e._v(e._s(e.$t("search.replace")))])],1),e.showSearchInfo?t("div",{staticClass:"searchInfo"},[e._v(" "+e._s(e.currentIndex)+" / "+e._s(e.total)+" ")]):e._e()],1),e.showReplaceInput?t("el-input",{ref:"replaceInputRef",staticStyle:{margin:"12px 0"},attrs:{placeholder:e.$t("search.replacePlaceholder"),size:"small"},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.replaceText,callback:function(t){e.replaceText=t},expression:"replaceText"}},[t("i",{staticClass:"el-input__icon el-icon-edit",attrs:{slot:"prefix"},slot:"prefix"}),t("el-button",{attrs:{slot:"append",size:"small"},on:{click:e.hideReplaceInput},slot:"append"},[e._v(e._s(e.$t("search.cancel")))])],1):e._e(),e.showReplaceInput?t("div",{staticClass:"btnList"},[t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replace}},[e._v(e._s(e.$t("search.replace")))]),t("el-button",{attrs:{size:"small",disabled:e.isReadonly},on:{click:e.replaceAll}},[e._v(e._s(e.$t("search.replaceAll")))])],1):e._e()],1)}),Hg=[],Ug={name:"Search",props:{mindMap:{type:Object}},data(){return{show:!1,searchText:"",replaceText:"",showReplaceInput:!1,currentIndex:0,total:0,showSearchInfo:!1}},computed:{...Object(se["d"])(["isDark","isReadonly"])},watch:{searchText(){Object(v["I"])(this.searchText)&&(this.currentIndex=0,this.total=0,this.showSearchInfo=!1)}},created(){this.$bus.$on("show_search",this.showSearch),this.mindMap.on("search_info_change",this.handleSearchInfoChange),this.mindMap.keyCommand.addShortcut("Control+f",this.showSearch)},beforeDestroy(){this.$bus.$off("show_search",this.showSearch),this.mindMap.off("search_info_change",this.handleSearchInfoChange),this.mindMap.keyCommand.removeShortcut("Control+f",this.showSearch)},methods:{isUndef:v["I"],handleSearchInfoChange(e){this.currentIndex=e.currentIndex+1,this.total=e.total,this.showSearchInfo=!0},showSearch(){this.$bus.$emit("closeSideBar"),this.show=!0},hideReplaceInput(){this.showReplaceInput=!1,this.replaceText=""},onSearchNext(){this.mindMap.search.search(this.searchText,()=>{this.$refs.searchInputRef.focus()})},replace(){this.mindMap.search.replace(this.replaceText,!0)},replaceAll(){this.mindMap.search.replaceAll(this.replaceText)},close(){this.show=!1,this.showSearchInfo=!1,this.total=0,this.currentIndex=0,this.searchText="",this.hideReplaceInput(),this.mindMap.search.endSearch()},onMouseleave(){this.$refs.searchInputRef&&this.$refs.searchInputRef.blur(),this.$refs.replaceInputRef&&this.$refs.replaceInputRef.blur()}}},qg=Ug,Gg=(n("c6fd"),Object(p["a"])(qg,jg,Hg,!1,null,"6455708e",null)),Wg=Gg.exports,Vg=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("nodeIconSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.icon"),name:"icon"}}),t("el-tab-pane",{attrs:{label:e.$t("nodeIconSidebar.sticker"),name:"image"}})],1),t("div",{staticClass:"boxContent"},["icon"===e.activeName?t("div",{staticClass:"iconBox"},e._l(e.nodeIconList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(r){return t("div",{key:r.name,staticClass:"icon",class:{selected:e.iconList.includes(n.type+"_"+r.name)},domProps:{innerHTML:e._s(e.getHtml(r.icon))},on:{click:function(t){return e.setIcon(n.type,r.name)}}})})),0)])})),0):e._e(),"image"===e.activeName?t("div",{staticClass:"imageBox"},e._l(e.nodeImageList,(function(n){return t("div",{key:n.name,staticClass:"item"},[t("div",{staticClass:"title"},[e._v(e._s(n.name))]),t("div",{staticClass:"list"},e._l(n.list,(function(n){return t("div",{key:n.url,staticClass:"icon",class:{selected:e.nodeImage===n.url},on:{click:function(t){return e.setImage(n)}}},[t("img",{attrs:{src:n.url,alt:""}})])})),0)])})),0):e._e()])],1)])},Yg=[],Zg=n("7cc6"),Kg=n.n(Zg),Xg=n("a493"),Jg=n.n(Xg),Qg=n("e921"),$g=n.n(Qg),ev=n("6490"),tv=n.n(ev),nv=n("41c5"),rv=n.n(nv),iv=n("b684"),ov=n.n(iv),av=n("4f5a"),sv=n.n(av),lv=n("9c85"),cv=n.n(lv),uv=n("3247"),hv=n.n(uv),dv=n("26eb"),fv=n.n(dv),pv=n("9f18"),mv=n.n(pv),gv=n("eab8"),vv=n.n(gv),bv=n("ad10"),yv=n.n(bv),wv=n("fe40"),xv=n.n(wv),kv=n("f670"),Av=n.n(kv),Cv=n("b8fe"),Ev=n.n(Cv),Sv=n("a641"),Tv=n.n(Sv),Nv=n("4910"),Mv=n.n(Nv),Lv=n("b765"),Ov=n.n(Lv),Dv=n("347b"),Pv=n.n(Dv),Iv=n("577e6"),Rv=n.n(Iv),Fv=n("c99b"),zv=n.n(Fv),Bv=n("3acd"),_v=n.n(Bv),jv=n("e40b"),Hv=n.n(jv),Uv=n("f6d6"),qv=n.n(Uv),Gv=n("aecb"),Wv=n.n(Gv),Vv=n("299e"),Yv=n.n(Vv),Zv=n("de62"),Kv=n.n(Zv),Xv=n("9537"),Jv=n.n(Xv),Qv=n("ea51"),$v=n.n(Qv),eb=n("e114"),tb=n.n(eb),nb=n("e274"),rb=n.n(nb),ib=n("9643"),ob=n.n(ib),ab=n("ac4f"),sb=n.n(ab),lb=n("f54b"),cb=n.n(lb),ub=n("e8ae"),hb=n.n(ub),db=n("fae8"),fb=n.n(db),pb=n("8763"),mb=n.n(pb),gb=n("5fd6"),vb=n.n(gb),bb=n("33d7"),yb=n.n(bb),wb=n("9cf4"),xb=n.n(wb),kb=n("e34b"),Ab=n.n(kb),Cb=n("ca39"),Eb=n.n(Cb),Sb=n("1faf"),Tb=n.n(Sb),Nb=n("ae00"),Mb=n.n(Nb),Lb=n("eadc"),Ob=n.n(Lb),Db=n("82b0"),Pb=n.n(Db),Ib=n("da5e"),Rb=n.n(Ib),Fb=n("b75f"),zb=n.n(Fb),Bb=n("290f"),_b=n.n(Bb),jb=n("8113"),Hb=n.n(jb),Ub=n("4244"),qb=n.n(Ub),Gb=n("3469"),Wb=n.n(Gb),Vb=n("e531"),Yb=n.n(Vb),Zb=n("8b39"),Kb=n.n(Zb),Xb=n("1bc3"),Jb=n.n(Xb),Qb=n("12b7"),$b=n.n(Qb),ey=n("25cac"),ty=n.n(ey),ny=n("0e5fa"),ry=n.n(ny),iy=n("8cd8"),oy=n.n(iy),ay=n("655f"),sy=n.n(ay),ly=n("e00a"),cy=n.n(ly),uy=n("594c"),hy=n.n(uy),dy=n("8484"),fy=n.n(dy),py=n("a8729"),my=n.n(py),gy=n("b019"),vy=n.n(gy),by=n("8ce6"),yy=n.n(by),wy=n("7d59"),xy=n.n(wy),ky=n("265a"),Ay=n.n(ky),Cy=n("9461"),Ey=n.n(Cy),Sy=n("da72"),Ty=n.n(Sy),Ny=n("b93d"),My=n.n(Ny),Ly=n("8f8b"),Oy=n.n(Ly),Dy=n("9897"),Py=n.n(Dy),Iy=n("c442"),Ry=n.n(Iy),Fy=n("7f93"),zy=n.n(Fy),By=n("24c7"),_y=n.n(By),jy=n("cacf"),Hy=n.n(jy),Uy=n("6ade"),qy=n.n(Uy),Gy=n("5a18"),Wy=n.n(Gy),Vy=n("5b16"),Yy=n.n(Vy),Zy=n("e35d"),Ky=n.n(Zy),Xy=n("3d18"),Jy=n.n(Xy),Qy=n("3bd3"),$y=n.n(Qy),ew=n("0a8f"),tw=n.n(ew),nw=n("318a"),rw=n.n(nw),iw=n("17f2"),ow=n.n(iw),aw=n("1c6b"),sw=n.n(aw),lw=n("482d"),cw=n.n(lw),uw=n("f796"),hw=n.n(uw),dw=n("049e"),fw=n.n(dw),pw=n("1e35"),mw=n.n(pw),gw=n("c97e"),vw=n.n(gw),bw=n("d67c"),yw=n.n(bw),ww=n("369f"),xw=n.n(ww),kw=n("5e32"),Aw=n.n(kw),Cw=n("e362"),Ew=n.n(Cw),Sw=n("6412"),Tw=n.n(Sw),Nw=n("0914"),Mw=n.n(Nw),Lw=n("22a7"),Ow=n.n(Lw),Dw=n("cace"),Pw=n.n(Dw),Iw=n("528d"),Rw=n.n(Iw),Fw=n("43cf"),zw=n.n(Fw),Bw=n("d875"),_w=n.n(Bw),jw=n("c87a"),Hw=n.n(jw),Uw=n("ea46"),qw=n.n(Uw),Gw=n("60fc"),Ww=n.n(Gw),Vw=n("07f3"),Yw=n.n(Vw),Zw=n("5023"),Kw=n.n(Zw),Xw=n("e437"),Jw=n.n(Xw),Qw=n("7f10"),$w=n.n(Qw),ex=n("a747"),tx=n.n(ex),nx=n("b46e"),rx=n.n(nx),ix=n("bd3c"),ox=n.n(ix),ax=n("7a10"),sx=n.n(ax),lx=n("0fb5"),cx=n.n(lx),ux=n("5af9"),hx=n.n(ux),dx=n("ba0f"),fx=n.n(dx),px=n("21cd"),mx=n.n(px),gx=n("35aa"),vx=n.n(gx),bx=n("aee9"),yx=n.n(bx),wx=n("ded7"),xx=n.n(wx),kx=n("aac9"),Ax=n.n(kx),Cx=n("0455"),Ex=n.n(Cx),Sx=n("027d"),Tx=n.n(Sx),Nx=n("f781"),Mx=n.n(Nx),Lx=n("7c97"),Ox=n.n(Lx),Dx=n("d271"),Px=n.n(Dx),Ix=n("cbf7"),Rx=n.n(Ix),Fx=n("a028"),zx=n.n(Fx),Bx=n("ca50"),_x=n.n(Bx),jx=n("ea3b"),Hx=n.n(jx),Ux=n("93af"),qx=n.n(Ux),Gx=n("2710"),Wx=n.n(Gx),Vx=n("3752"),Yx=n.n(Vx),Zx=n("8722"),Kx=n.n(Zx),Xx=n("3b50"),Jx=n.n(Xx),Qx=n("67dd"),$x=n.n(Qx),ek=n("229d"),tk=n.n(ek),nk=n("6d42"),rk=n.n(nk),ik=n("77f4"),ok=n.n(ik),ak=n("c53a"),sk=n.n(ak),lk=n("1485"),ck=n.n(lk),uk=n("b466"),hk=n.n(uk),dk=n("6705"),fk=n.n(dk),pk=n("b467"),mk=n.n(pk),gk=n("ee12"),vk=n.n(gk),bk=n("fee0"),yk=n.n(bk),wk=n("a3e0"),xk=n.n(wk),kk=n("bce0"),Ak=n.n(kk),Ck=n("9c58"),Ek=n.n(Ck),Sk=n("5e35"),Tk=n.n(Sk),Nk=n("6f5c"),Mk=n.n(Nk),Lk=n("a057"),Ok=n.n(Lk),Dk=n("2c41"),Pk=n.n(Dk),Ik=n("4659"),Rk=n.n(Ik),Fk=n("5082"),zk=n.n(Fk),Bk=n("9b17"),_k=n.n(Bk),jk=n("bd4d"),Hk=n.n(jk),Uk=n("0e25"),qk=n.n(Uk),Gk=n("7be0"),Wk=n.n(Gk),Vk=n("29dc"),Yk=n.n(Vk),Zk=n("e4a4"),Kk=n.n(Zk),Xk=n("5edb"),Jk=n.n(Xk),Qk=n("02a0"),$k=n.n(Qk),eA=n("3ec8"),tA=n.n(eA),nA=n("d5e5"),rA=n.n(nA),iA=n("2a43"),oA=n.n(iA),aA=n("ceaa"),sA=n.n(aA),lA=n("325b"),cA=n.n(lA),uA=n("98ee"),hA=n.n(uA),dA=n("0613"),fA=n.n(dA),pA=n("c5b2"),mA=n.n(pA),gA=n("c0b1"),vA=n.n(gA),bA=n("d4e4"),yA=n.n(bA),wA=n("4869"),xA=n.n(wA),kA=n("12a6"),AA=n.n(kA),CA=n("0bf4"),EA=n.n(CA),SA=n("14bd"),TA=n.n(SA),NA=n("a76c"),MA=n.n(NA),LA=n("8121"),OA=n.n(LA),DA=n("2783"),PA=n.n(DA),IA=n("65ee"),RA=n.n(IA),FA=n("db91"),zA=n.n(FA),BA=n("c80c"),_A=n.n(BA),jA=n("9f38"),HA=n.n(jA),UA=n("6c25"),qA=n.n(UA),GA=n("0e50"),WA=n.n(GA),VA=n("cd5f"),YA=n.n(VA),ZA=n("56d3"),KA=n.n(ZA),XA=n("2613"),JA=n.n(XA),QA=n("7e11"),$A=n.n(QA),eC=n("bf26"),tC=n.n(eC),nC=n("89c8"),rC=n.n(nC),iC=n("6d50"),oC=n.n(iC),aC=n("b0d8"),sC=n.n(aC),lC=n("a7fd"),cC=n.n(lC),uC=n("0082"),hC=n.n(uC),dC=n("c8db"),fC=n.n(dC),pC=n("a3cc"),mC=n.n(pC),gC=n("222a"),vC=n.n(gC),bC=n("7718"),yC=n.n(bC),wC=n("c099"),xC=n.n(wC),kC=n("b259"),AC=n.n(kC),CC=n("c605"),EC=n.n(CC),SC=n("6d75"),TC=n.n(SC),NC=n("35ae"),MC=n.n(NC),LC=n("103a"),OC=n.n(LC),DC=n("813c"),PC=n.n(DC),IC=n("b291"),RC=n.n(IC),FC=n("14d4"),zC=n.n(FC),BC=n("be45"),_C=n.n(BC),jC=n("dbfc"),HC=n.n(jC),UC=n("227b"),qC=n.n(UC),GC=n("5227"),WC=n.n(GC),VC=[{name:"商务",list:[{url:Kg.a,width:100,height:100},{url:Jg.a,width:100,height:100},{url:$g.a,width:100,height:100},{url:tv.a,width:100,height:100},{url:rv.a,width:100,height:100},{url:ov.a,width:100,height:100},{url:sv.a,width:100,height:100},{url:cv.a,width:100,height:100},{url:hv.a,width:100,height:100},{url:fv.a,width:100,height:100},{url:mv.a,width:100,height:100},{url:vv.a,width:100,height:100},{url:yv.a,width:100,height:100},{url:xv.a,width:100,height:100},{url:Av.a,width:100,height:100},{url:Ev.a,width:100,height:100},{url:Tv.a,width:100,height:100},{url:Mv.a,width:100,height:100},{url:Ov.a,width:100,height:100},{url:Pv.a,width:100,height:100},{url:Rv.a,width:100,height:100},{url:zv.a,width:100,height:100},{url:_v.a,width:100,height:100},{url:Hv.a,width:100,height:100},{url:qv.a,width:100,height:100},{url:Wv.a,width:100,height:100},{url:Yv.a,width:100,height:100},{url:Kv.a,width:100,height:100},{url:Jv.a,width:100,height:100},{url:$v.a,width:100,height:100},{url:tb.a,width:100,height:100},{url:rb.a,width:100,height:100},{url:ob.a,width:100,height:100},{url:sb.a,width:100,height:100},{url:cb.a,width:100,height:100},{url:hb.a,width:100,height:100},{url:fb.a,width:100,height:100},{url:mb.a,width:100,height:100}]},{name:"教育",list:[{url:vb.a,width:100,height:100},{url:yb.a,width:100,height:100},{url:xb.a,width:100,height:100},{url:Ab.a,width:100,height:100},{url:Eb.a,width:100,height:100},{url:Tb.a,width:100,height:100},{url:Mb.a,width:100,height:100},{url:Ob.a,width:100,height:100},{url:Pb.a,width:100,height:100},{url:Rb.a,width:100,height:100},{url:zb.a,width:100,height:100},{url:_b.a,width:100,height:100},{url:Hb.a,width:100,height:100},{url:qb.a,width:100,height:100},{url:Wb.a,width:100,height:100},{url:Yb.a,width:100,height:100},{url:Kb.a,width:100,height:100},{url:Jb.a,width:100,height:100},{url:$b.a,width:100,height:100},{url:ty.a,width:100,height:100},{url:ry.a,width:100,height:100},{url:oy.a,width:100,height:100},{url:sy.a,width:100,height:100},{url:cy.a,width:100,height:100},{url:hy.a,width:100,height:100},{url:fy.a,width:100,height:100},{url:my.a,width:100,height:100},{url:vy.a,width:100,height:100},{url:yy.a,width:100,height:100},{url:xy.a,width:100,height:100},{url:Ay.a,width:100,height:100},{url:Ey.a,width:100,height:100},{url:Ty.a,width:100,height:100},{url:My.a,width:100,height:100},{url:Oy.a,width:100,height:100},{url:Py.a,width:100,height:100},{url:Ry.a,width:100,height:100},{url:zy.a,width:100,height:100},{url:_y.a,width:100,height:100},{url:Hy.a,width:100,height:100},{url:qy.a,width:100,height:100},{url:Wy.a,width:100,height:100},{url:Yy.a,width:100,height:100},{url:Ky.a,width:100,height:100},{url:Jy.a,width:100,height:100},{url:$y.a,width:100,height:100},{url:tw.a,width:100,height:100},{url:rw.a,width:100,height:100},{url:ow.a,width:100,height:100},{url:sw.a,width:100,height:100},{url:cw.a,width:100,height:100},{url:hw.a,width:100,height:100},{url:fw.a,width:100,height:100},{url:mw.a,width:100,height:100},{url:vw.a,width:100,height:100},{url:yw.a,width:100,height:100},{url:xw.a,width:100,height:100},{url:Aw.a,width:100,height:100},{url:Ew.a,width:100,height:100},{url:Tw.a,width:100,height:100},{url:Mw.a,width:100,height:100},{url:Ow.a,width:100,height:100},{url:Pw.a,width:100,height:100},{url:Rw.a,width:100,height:100},{url:zw.a,width:100,height:100},{url:_w.a,width:100,height:100},{url:Hw.a,width:100,height:100}]},{name:"节日",list:[{url:qw.a,width:100,height:100},{url:Ww.a,width:100,height:100},{url:Yw.a,width:100,height:100},{url:Kw.a,width:100,height:100},{url:Jw.a,width:100,height:100},{url:$w.a,width:100,height:100},{url:tx.a,width:100,height:100},{url:rx.a,width:100,height:100},{url:ox.a,width:100,height:100},{url:sx.a,width:100,height:100},{url:cx.a,width:100,height:100},{url:hx.a,width:100,height:100},{url:fx.a,width:100,height:100},{url:mx.a,width:100,height:100},{url:vx.a,width:100,height:100},{url:yx.a,width:100,height:100},{url:xx.a,width:100,height:100},{url:Ax.a,width:100,height:100},{url:Ex.a,width:100,height:100},{url:Tx.a,width:100,height:100}]},{name:"食物",list:[{url:Mx.a,width:100,height:100},{url:Ox.a,width:100,height:100},{url:Px.a,width:100,height:100},{url:Rx.a,width:100,height:100},{url:zx.a,width:100,height:100},{url:_x.a,width:100,height:100},{url:Hx.a,width:100,height:100},{url:qx.a,width:100,height:100},{url:Wx.a,width:100,height:100},{url:Yx.a,width:100,height:100},{url:Kx.a,width:100,height:100},{url:Jx.a,width:100,height:100},{url:$x.a,width:100,height:100},{url:tk.a,width:100,height:100},{url:rk.a,width:100,height:100},{url:ok.a,width:100,height:100},{url:sk.a,width:100,height:100},{url:ck.a,width:100,height:100},{url:hk.a,width:100,height:100},{url:fk.a,width:100,height:100},{url:mk.a,width:100,height:100},{url:vk.a,width:100,height:100},{url:yk.a,width:100,height:100},{url:xk.a,width:100,height:100},{url:Ak.a,width:100,height:100},{url:Ek.a,width:100,height:100},{url:Tk.a,width:100,height:100},{url:Mk.a,width:100,height:100},{url:Ok.a,width:100,height:100},{url:Pk.a,width:100,height:100}]},{name:"医疗",list:[{url:Rk.a,width:100,height:100},{url:zk.a,width:100,height:100},{url:_k.a,width:100,height:100},{url:Hk.a,width:100,height:100},{url:qk.a,width:100,height:100},{url:Wk.a,width:100,height:100},{url:Yk.a,width:100,height:100},{url:Kk.a,width:100,height:100},{url:Jk.a,width:100,height:100},{url:$k.a,width:100,height:100},{url:tA.a,width:100,height:100},{url:rA.a,width:100,height:100},{url:oA.a,width:100,height:100},{url:sA.a,width:100,height:100},{url:cA.a,width:100,height:100},{url:hA.a,width:100,height:100},{url:fA.a,width:100,height:100},{url:mA.a,width:100,height:100},{url:vA.a,width:100,height:100},{url:yA.a,width:100,height:100}]},{name:"工具",list:[{url:xA.a,width:100,height:100},{url:AA.a,width:100,height:100},{url:EA.a,width:100,height:100},{url:TA.a,width:100,height:100},{url:MA.a,width:100,height:100},{url:OA.a,width:100,height:100},{url:PA.a,width:100,height:100},{url:RA.a,width:100,height:100},{url:zA.a,width:100,height:100},{url:_A.a,width:100,height:100},{url:HA.a,width:100,height:100},{url:qA.a,width:100,height:100},{url:WA.a,width:100,height:100},{url:YA.a,width:100,height:100},{url:KA.a,width:100,height:100},{url:JA.a,width:100,height:100},{url:$A.a,width:100,height:100},{url:tC.a,width:100,height:100},{url:rC.a,width:100,height:100},{url:oC.a,width:100,height:100}]},{name:"旅行",list:[{url:sC.a,width:100,height:100},{url:cC.a,width:100,height:100},{url:hC.a,width:100,height:100},{url:fC.a,width:100,height:100},{url:mC.a,width:100,height:100},{url:vC.a,width:100,height:100},{url:yC.a,width:100,height:100},{url:xC.a,width:100,height:100},{url:AC.a,width:100,height:100},{url:EC.a,width:100,height:100},{url:TC.a,width:100,height:100},{url:MC.a,width:100,height:100},{url:OC.a,width:100,height:100},{url:PC.a,width:100,height:100},{url:RC.a,width:100,height:100},{url:zC.a,width:100,height:100},{url:_C.a,width:100,height:100},{url:HC.a,width:100,height:100},{url:qC.a,width:100,height:100},{url:WC.a,width:100,height:100}]}],YC={name:"NodeIconSidebar",components:{Sidebar:cp},data(){return{activeName:"icon",nodeIconList:Object(v["M"])([...D,...H]),nodeImageList:[...VC],iconList:[],nodeImage:"",activeNodes:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark"])},watch:{activeSidebar(e){this.$refs.sidebar.show="nodeIconSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive),this.$bus.$on("showNodeIcon",this.handleShowNodeIcon)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive),this.$bus.$off("showNodeIcon",this.handleShowNodeIcon)},methods:{handleNodeActive(...e){if(this.activeNodes=[...e[1]],this.activeNodes.length>0)if(1===this.activeNodes.length){let e=this.activeNodes[0];this.nodeImage=e.getData("image")||"",this.iconList=e.getData("icon")||[]}else this.nodeImage=[],this.iconList=[];else this.iconList=[],this.nodeImage=""},handleShowNodeIcon(){this.dialogVisible=!0},getHtml(e){return/^`},setIcon(e,t){this.activeNodes.forEach(n=>{const r=[...n.getData("icon")||[]];let i=e+"_"+t,o=r.findIndex(e=>e===i);if(-1!==o)r.splice(o,1);else{let t=r.findIndex(t=>t.split("_")[0]===e);-1!==t?r.splice(t,1,i):r.push(i)}n.setIcon(r),1===this.activeNodes.length&&(this.iconList=r)})},setImage(e){this.activeNodes.forEach(t=>{this.nodeImage=e.url,t.setImage({...e})})}}},ZC=YC,KC=(n("fff4"),Object(p["a"])(ZC,Vg,Yg,!1,null,"6adf6422",null)),XC=KC.exports,JC=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.showNodeIconToolbar,expression:"showNodeIconToolbar"}],ref:"nodeIconToolbar",staticClass:"nodeIconToolbar",style:e.style,on:{"&click":function(e){e.stopPropagation()}}},[t("div",{staticClass:"iconListBox"},e._l(e.iconList,(function(n){return t("div",{key:n.name,staticClass:"icon",class:{selected:e.nodeIconList.includes(e.iconType+"_"+n.name)},domProps:{innerHTML:e._s(e.getHtml(n.icon))},on:{click:function(t){return e.setIcon(n.name)}}})})),0),t("div",{staticClass:"btnBox"},[t("span",{staticClass:"btn iconfont iconshanchu",on:{click:e.deleteIcon}})])])},QC=[];const $C=[...D,...H];var eE={name:"NodeIconToolbar",components:{},props:{mindMap:{type:Object}},data(){return{showNodeIconToolbar:!1,style:{left:0,top:0},node:null,iconType:"",iconName:"",nodeIconList:[],iconList:[]}},computed:{...Object(se["d"])(["activeSidebar"])},created(){this.mindMap.on("node_icon_click",this.show),this.mindMap.on("draw_click",this.close),this.mindMap.on("svg_mousedown",this.close),this.mindMap.on("node_dblclick",this.close),this.mindMap.on("node_active",this.onNodeActive),this.mindMap.on("scale",this.onScale),this.$bus.$on("close_node_icon_toolbar",this.close)},mounted(){document.body.append(this.$refs.nodeIconToolbar)},beforeDestroy(){this.mindMap.off("node_icon_click",this.show),this.mindMap.off("draw_click",this.close),this.mindMap.off("svg_mousedown",this.close),this.mindMap.off("node_dblclick",this.close),this.mindMap.off("node_active",this.onNodeActive),this.mindMap.off("scale",this.onScale),this.$bus.$off("close_node_icon_toolbar",this.close)},methods:{...Object(se["c"])(["setActiveSidebar"]),show(e,t){this.node=e,this.iconType=t.split("_")[0],this.iconName=t.split("_")[1],this.nodeIconList=e.getData("icon")||[],this.iconList=[...$C.find(e=>e.type===this.iconType).list],this.updatePos(),this.showNodeIconToolbar=!0,"nodeIconSidebar"===this.activeSidebar&&this.setActiveSidebar("")},close(){this.showNodeIconToolbar=!1,this.node=null,this.iconType="",this.iconName="",this.nodeIconList=[],this.iconList=[],this.style.left=0,this.style.top=0},updatePos(){if(!this.node)return;const e=this.node.getRect();this.style.left=e.x+"px",this.style.top=e.y+e.height+"px"},onScale(){this.updatePos()},onNodeActive(e){e!==this.node&&this.close()},deleteIcon(){this.setIcon(this.iconName),this.close()},getHtml(e){return/^`},setIcon(e){let t=this.iconType+"_"+e,n=this.nodeIconList.findIndex(e=>e===t);if(-1!==n)this.nodeIconList.splice(n,1);else{let n=this.nodeIconList.findIndex(e=>e.split("_")[0]===this.iconType);-1!==n?(this.nodeIconList.splice(n,1,t),this.iconName=e):this.nodeIconList.push(t)}this.node.setIcon([...this.nodeIconList])}}},tE=eE,nE=(n("e6d0"),Object(p["a"])(tE,JC,QC,!1,null,"1321abee",null)),rE=nE.exports,iE=function(){var e=this,t=e._self._c;return e.isOutlineEdit?t("div",{ref:"outlineEditContainer",staticClass:"outlineEditContainer",class:{isDark:e.isDark}},[t("div",{staticClass:"closeBtn",on:{click:e.onClose}},[t("span",{staticClass:"icon iconfont iconguanbi"})]),t("div",{ref:"outlineEditBox",staticClass:"outlineEditBox"},[t("div",{staticClass:"outlineEdit"},[t("el-tree",{ref:"tree",staticClass:"outlineTree",class:{isDark:e.isDark},attrs:{"node-key":"uid",draggable:"","default-expand-all":"",data:e.data,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!1,"allow-drag":e.checkAllowDrag},on:{"node-drop":e.onNodeDrop,"current-change":e.onCurrentChange},scopedSlots:e._u([{key:"default",fn:function({node:n,data:r}){return t("span",{staticClass:"customNode",attrs:{"data-id":r.uid}},[t("span",{key:e.getKey(),staticClass:"nodeEdit",attrs:{contenteditable:!e.isReadonly},domProps:{innerHTML:e._s(n.label)},on:{blur:function(t){return e.onBlur(t,n)},keydown:function(t){return t.stopPropagation(),e.onNodeInputKeydown(t,n)},keyup:function(e){e.stopPropagation()},paste:function(t){return e.onPaste(t,n)}}})])}}],null,!1,485109613)})],1)])]):e._e()},oE=[],aE={name:"OutlineEdit",props:{mindMap:{type:Object}},data(){return{data:[],defaultProps:{label:"label"},currentData:null}},computed:{...Object(se["d"])(["isOutlineEdit","isDark","isReadonly"])},watch:{isOutlineEdit(e){e&&(this.refresh(),this.$nextTick(()=>{document.body.appendChild(this.$refs.outlineEditContainer)}))}},created(){window.addEventListener("keydown",this.onKeyDown)},beforeDestroy(){window.removeEventListener("keydown",this.onKeyDown)},methods:{...Object(se["c"])(["setIsOutlineEdit"]),refresh(){let e=this.mindMap.getData();e.root=!0;let t=e=>{let n=(e.data.richText?Object(v["O"])(e.data.text):e.data.text).replaceAll(/\n/g,"
");n=Object(v["E"])(n),e.textCache=n,e.label=n,e.uid=e.data.uid,e.children&&e.children.length>0&&e.children.forEach(e=>{t(e)})};t(e),this.data=[e]},checkAllowDrag(e){return!e.data.root},onNodeDrop(){this.save()},onCurrentChange(e){this.currentData=e},onBlur(e,t){if(t.data.textCache===e.target.innerHTML)return;const n=t.data.data.richText,r=n?e.target.innerHTML:e.target.innerText;t.data.data.text=n?Object(v["bb"])(r):r,n&&(t.data.data.resetRichText=!0),t.data.textCache=e.target.innerHTML,this.save()},onNodeInputKeydown(e,t){const n=!!t.data.data.richText,r=Object(v["m"])(),i=this.$t("outline.nodeDefaultText"),o={textCache:i,uid:r,label:i,data:{text:n?Object(v["bb"])(i):i,uid:r,richText:n},children:[]};if(n&&(o.data.resetRichText=!0),13===e.keyCode&&!e.shiftKey){if(e.preventDefault(),t.data.root)return;this.$refs.tree.insertAfter(o,t)}9===e.keyCode&&(e.preventDefault(),this.$refs.tree.append(o,t)),this.save(),this.$nextTick(()=>{this.$refs.tree.setCurrentKey(r);const e=document.querySelector(`.customNode[data-id="${r}"] .nodeEdit`);if(e){let t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n);let r=e.offsetTop;this.scrollTo(r)}})},onKeyDown(e){this.isOutlineEdit&&[46,8].includes(e.keyCode)&&this.currentData&&(e.stopPropagation(),this.$refs.tree.remove(this.currentData),this.currentData=null,this.save())},onPaste(e){e.preventDefault();const t=window.getSelection();if(!t.rangeCount)return;t.deleteFromDocument();let n=(e.clipboardData||window.clipboardData).getData("text");n=Object(v["z"])(n),n=n.replaceAll(/\n/g,"");const r=document.createTextNode(n);t.getRangeAt(0).insertNode(r),t.collapseToEnd()},getKey(){return Math.random()},onClose(){this.setIsOutlineEdit(!1),this.$bus.$emit("setData",this.getData())},scrollTo(e){let t=this.$refs.outlineEditBox,n=t.offsetHeight,r=t.scrollTop;e+=50,e>r+n&&t.scrollTo(0,e-n/2)},getData(){let e={},t=this.data[0],n=(e,t)=>{t.data=e.data,t.children=[],(e.children||[]).forEach(e=>{const r={};t.children.push(r),n(e,r)})};return n(t,e),Object(v["ab"])(e)},save(){Object(Wi["e"])(this.getData())}}},sE=aE,lE=(n("fdc4"),Object(p["a"])(sE,iE,oE,!1,null,"07021e90",null)),cE=lE.exports;let uE=null;const hE=()=>{uE=qi["Loading"].service({lock:!0})},dE=()=>{uE&&(uE.close(),uE=null)},fE=async e=>{try{try{Array.isArray(e)||(e=String(e).replace("￿\ufeff",""),e=JSON.parse(e))}catch(t){console.log(t)}Array.isArray(e)||(e=[]);const n=[],r=[],i=(e,n)=>{e.forEach(async e=>{let o={};if(n.push(o),o.data={text:e.data.text,hyperlink:e.data.hyperlink,hyperlinkTitle:e.data.hyperlinkTitle,note:e.data.note},e.data.image){let n=null,i=new Promise(e=>{n=e});r.push(i);try{o.data.image=await Object(v["F"])(e.data.image),o.data.imageSize=e.data.imageSize,n()}catch(t){n()}}if(o.children=[],e.children&&e.children.length>0){const t=[];e.children.forEach(e=>{"generalize"===e.data.type?o.data.generalization={text:e.data.text}:t.push(e)}),i(t,o.children)}})};return i(e,n),await Promise.all(r),{simpleMindMap:!0,data:n}}catch(t){return""}},pE=async e=>{try{let t=JSON.parse(e);if(void 0!==t.__c_zx_v){const e=await fE(t.children);return e}}catch(t){}if(e.includes("￿\ufeff")){const t=await fE(e);return t}return""};var mE=pE,gE=function(){var e=this,t=e._self._c;return t("div",{staticClass:"scrollbarContainer",class:{isDark:e.isDark}},[t("div",{ref:"verticalScrollbarRef",staticClass:"scrollbar verticalScrollbar",on:{click:e.onVerticalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.verticalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onVerticalScrollbarMousedown}})]),t("div",{ref:"horizontalScrollbarRef",staticClass:"scrollbar horizontalScrollbar",on:{click:e.onHorizontalScrollbarClick}},[t("div",{staticClass:"scrollbarInner",style:e.horizontalScrollbarStyle,on:{click:function(e){e.stopPropagation()},mousedown:e.onHorizontalScrollbarMousedown}})])])},vE=[],bE={props:{mindMap:{type:Object}},data(){return{timer:null,resizeTimer:null,verticalScrollbarStyle:{},horizontalScrollbarStyle:{}}},computed:{...Object(se["d"])(["isDark"])},mounted(){this.setScrollBarWrapSize(),this.$bus.$on("scrollbar_change",this.updateScrollbar),window.addEventListener("resize",this.onResize)},beforeDestroy(){this.$bus.$off("scrollbar_change",this.updateScrollbar),window.removeEventListener("resize",this.onResize)},methods:{setScrollBarWrapSize(){const{width:e}=this.$refs.horizontalScrollbarRef.getBoundingClientRect(),{height:t}=this.$refs.verticalScrollbarRef.getBoundingClientRect();this.mindMap.scrollbar.setScrollBarWrapSize(e,t)},onResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(()=>{this.setScrollBarWrapSize()},300)},updateScrollbar({vertical:e,horizontal:t}){this.verticalScrollbarStyle={top:e.top+"%",height:e.height+"%"},this.horizontalScrollbarStyle={left:t.left+"%",width:t.width+"%"}},onVerticalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"vertical")},onVerticalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"vertical")},onHorizontalScrollbarMousedown(e){this.mindMap.scrollbar.onMousedown(e,"horizontal")},onHorizontalScrollbarClick(e){this.mindMap.scrollbar.onClick(e,"horizontal")}}},yE=bE,wE=(n("3561"),Object(p["a"])(yE,gE,vE,!1,null,"41219b84",null)),xE=wE.exports,kE=function(){var e=this,t=e._self._c;return t("Sidebar",{ref:"sidebar",attrs:{title:e.$t("formulaSidebar.title")}},[t("div",{staticClass:"box",class:{isDark:e.isDark}},[t("div",{staticClass:"formulaInputBox"},[t("el-input",{attrs:{rows:4,resize:"none",type:"textarea",placeholder:e.$t("formulaSidebar.placeholder")},nativeOn:{keydown:function(e){e.stopPropagation()}},model:{value:e.formulaText,callback:function(t){e.formulaText=t},expression:"formulaText"}}),t("el-button",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{size:"small"},on:{click:e.confirm}},[e._v(e._s(e.$t("formulaSidebar.confirm")))])],1),t("div",{staticClass:"title"},[e._v(e._s(e.$t("formulaSidebar.common")))]),t("div",{staticClass:"formulaList"},e._l(e.list,(function(n,r){return t("div",{key:r,staticClass:"formulaItem"},[t("div",{staticClass:"overview",domProps:{innerHTML:e._s(n.overview)}}),t("div",{staticClass:"text",on:{click:function(t){e.formulaText=n.text}}},[e._v(" "+e._s(n.text)+" ")])])})),0)])])},AE=[],CE={name:"FormulaSidebar",components:{Sidebar:cp},props:{mindMap:{type:Object}},data(){return{formulaText:"",list:[]}},computed:{...Object(se["d"])(["activeSidebar","isDark","localConfig"])},watch:{activeSidebar(e){this.$refs.sidebar.show="formulaSidebar"===e}},created(){this.$bus.$on("node_active",this.handleNodeActive)},beforeDestroy(){this.$bus.$off("node_active",this.handleNodeActive)},mounted(){this.init()},methods:{...Object(se["c"])(["setActiveSidebar"]),init(){this.list=Up.map(e=>({overview:window.katex.renderToString(e,{throwOnError:!1,output:"mathml"}),text:e}))},handleNodeActive(...e){this.activeNodes=[...e[1]],this.activeNodes.length<=0&&"formulaSidebar"===this.activeSidebar&&this.setActiveSidebar(null)},confirm(){if(!this.localConfig.openNodeRichText)return this.$message.warning(this.$t("formulaSidebar.tip"));let e=this.formulaText.trim();e&&this.mindMap.execCommand("INSERT_FORMULA",e)}}},EE=CE,SE=(n("2c02"),Object(p["a"])(EE,kE,AE,!1,null,"24ccf624",null)),TE=SE.exports;wd.usePlugin(kd).usePlugin(Cd).usePlugin(Wd).usePlugin(Sd).usePlugin(Md).usePlugin(Od).usePlugin(qd).usePlugin(Yd).usePlugin(Bf).usePlugin(Uf).usePlugin(jf).usePlugin(Gf).usePlugin(Vf).usePlugin(Zf).usePlugin(Qf),tm.forEach(e=>{wd.defineTheme(e.value,e.theme)});var NE={name:"Edit",components:{OutlineSidebar:yp,Style:Op,BaseStyle:zp,Theme:om,Structure:hm,Count:bm,NavigatorToolbar:Gm,ShortcutKey:Xm,Contextmenu:ng,RichTextToolbar:lg,NodeNoteContentShow:gg,Navigator:kg,NodeImgPreview:Ng,SidebarTrigger:Ig,Search:Wg,NodeIconSidebar:XC,NodeIconToolbar:rE,OutlineEdit:cE,Scrollbar:xE,FormulaSidebar:TE},data(){return{enableShowLoading:!0,mindMap:null,mindMapData:null,prevImg:"",storeConfigTimer:null}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,openNodeRichText:e=>e.localConfig.openNodeRichText,useLeftKeySelectionRightKeyDrag:e=>e.localConfig.useLeftKeySelectionRightKeyDrag,isShowScrollbar:e=>e.localConfig.isShowScrollbar})},watch:{openNodeRichText(){this.openNodeRichText?this.addRichTextPlugin():this.removeRichTextPlugin()}},mounted(){hE(),this.getData(),this.init(),this.$bus.$on("execCommand",this.execCommand),this.$bus.$on("paddingChange",this.onPaddingChange),this.$bus.$on("export",this.export),this.$bus.$on("setData",this.setData),this.$bus.$on("startTextEdit",this.handleStartTextEdit),this.$bus.$on("endTextEdit",this.handleEndTextEdit),this.$bus.$on("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$on("startPainter",this.handleStartPainter),this.$bus.$on("node_tree_render_end",this.handleHideLoading),this.$bus.$on("showLoading",this.handleShowLoading),window.addEventListener("resize",this.handleResize)},beforeDestroy(){this.$bus.$off("execCommand",this.execCommand),this.$bus.$off("paddingChange",this.onPaddingChange),this.$bus.$off("export",this.export),this.$bus.$off("setData",this.setData),this.$bus.$off("startTextEdit",this.handleStartTextEdit),this.$bus.$off("endTextEdit",this.handleEndTextEdit),this.$bus.$off("createAssociativeLine",this.handleCreateLineFromActiveNode),this.$bus.$off("startPainter",this.handleStartPainter),this.$bus.$off("node_tree_render_end",this.handleHideLoading),this.$bus.$off("showLoading",this.handleShowLoading),window.removeEventListener("resize",this.handleResize),this.mindMap.destroy()},methods:{handleStartTextEdit(){this.mindMap.renderer.startTextEdit()},handleEndTextEdit(){this.mindMap.renderer.endTextEdit()},handleCreateLineFromActiveNode(){this.mindMap.associativeLine.createLineFromActiveNode()},handleStartPainter(){this.mindMap.painter.startPainter()},handleResize(){this.mindMap.resize()},handleShowLoading(){this.enableShowLoading=!0,hE()},handleHideLoading(){this.enableShowLoading&&(this.enableShowLoading=!1,dE())},getData(){let e=Object(Wi["a"])();this.mindMapData=e},bindSaveEvent(){this.$bus.$on("data_change",e=>{Object(Wi["e"])(e)}),this.$bus.$on("view_data_change",e=>{clearTimeout(this.storeConfigTimer),this.storeConfigTimer=setTimeout(()=>{Object(Wi["d"])({view:e})},300)})},manualSave(){let e=this.mindMap.getData(!0);Object(Wi["d"])(e)},init(){let e=this.hasFileURL(),{root:t,layout:n,theme:r,view:i,config:o}=this.mindMapData;e&&(t={data:{text:this.$t("edit.root")},children:[]},n=Gi["a"].layout,r=Gi["a"].theme,i=null),this.mindMap=new wd({el:this.$refs.mindMapContainer,data:t,fit:!1,layout:n,theme:r.template,themeConfig:r.config,viewData:i,nodeTextEditZIndex:1e3,nodeNoteTooltipZIndex:1e3,customNoteContentShow:{show:(e,t,n,r)=>{this.$bus.$emit("showNoteContent",e,t,n,r)},hide:()=>{}},...o||{},iconList:[...H],useLeftKeySelectionRightKeyDrag:this.useLeftKeySelectionRightKeyDrag,customInnerElsAppendTo:null,enableAutoEnterTextEditWhenKeydown:!0,customHandleClipboardText:mE,handleIsSplitByWrapOnPasteCreateNewNode:()=>this.$confirm(this.$t("edit.splitByWrap"),this.$t("edit.tip"),{confirmButtonText:this.$t("edit.yes"),cancelButtonText:this.$t("edit.no"),type:"warning"}),errorHandler:(e,t)=>{switch(console.error(t),e){case"export_error":this.$message.error("导出失败");break;default:break}}}),this.openNodeRichText&&this.addRichTextPlugin(),this.mindMap.keyCommand.addShortcut("Control+s",()=>{this.manualSave()}),["node_active","data_change","view_data_change","back_forward","node_contextmenu","node_click","draw_click","expand_btn_click","svg_mousedown","mouseup","mode_change","node_tree_render_end","rich_text_selection_change","transforming-dom-to-images","generalization_node_contextmenu","painter_start","painter_end","scrollbar_change","scale"].forEach(e=>{this.mindMap.on(e,(...t)=>{this.$bus.$emit(e,...t)})}),this.bindSaveEvent(),this.testDynamicCreateNodes(),window.takeOverApp&&this.$bus.$emit("app_inited",this.mindMap),e&&this.$bus.$emit("handle_file_url"),this.cooperateTest()},hasFileURL(){const e=this.$route.query.fileURL;return!!e&&/\.(smm|json|xmind|md|xlsx)$/.test(e)},setData(e){this.handleShowLoading(),e.root?this.mindMap.setFullData(e):this.mindMap.setData(e),this.mindMap.view.reset(),this.manualSave()},reRender(){this.mindMap.reRender()},execCommand(...e){this.mindMap.execCommand(...e)},async export(...e){try{hE(),await this.mindMap.export(...e),dE()}catch(t){console.log(t),dE()}},onPaddingChange(e){this.mindMap.updateConfig(e)},showNewFeatureInfo(){let e=localStorage.getItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1");e||this.$notify.info({title:this.$t("edit.newFeatureNoticeTitle"),message:this.$t("edit.newFeatureNoticeMessage"),duration:0,onClose:()=>{localStorage.setItem("SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1",!0)}})},addRichTextPlugin(){this.mindMap&&this.mindMap.addPlugin(nf)},removeRichTextPlugin(){this.mindMap.removePlugin(nf)},testDynamicCreateNodes(){setTimeout(()=>{},5e3)},cooperateTest(){this.mindMap.cooperate&&this.$route.query.userName&&(this.mindMap.cooperate.setProvider(null,{roomName:"demo-room",signalingList:["ws://192.168.3.125:4444"]}),this.mindMap.cooperate.setUserInfo({id:Math.random(),name:this.$route.query.userName,color:["#409EFF","#67C23A","#E6A23C","#F56C6C","#909399"][Math.floor(5*Math.random())],avatar:Math.random()>.5?"https://img0.baidu.com/it/u=4270674549,2416627993&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1696006800&t=4d32871d14a7224a4591d0c3c7a97311":""}))}}},ME=NE,LE=(n("15ec"),Object(p["a"])(ME,ro,io,!1,null,"b74ec01c",null)),OE=LE.exports,DE={name:"Index",components:{Toolbar:no,Edit:OE},data(){return{show:!1}},computed:{...Object(se["d"])({isZenMode:e=>e.localConfig.isZenMode,isDark:e=>e.isDark,activeSidebar:e=>e.activeSidebar})},watch:{isDark(){this.setBodyDark()}},async created(){this.initLocalConfig();const e=this.$loading({lock:!0,text:this.$t("other.loading")});await this.getUserMindMapData(),this.show=!0,e.close(),this.setBodyDark()},methods:{...Object(se["b"])(["getUserMindMapData"]),...Object(se["c"])(["setLocalConfig"]),initLocalConfig(){let e=Object(Wi["c"])();e&&this.setLocalConfig({...this.$store.state.localConfig,...e})},setBodyDark(){this.isDark?document.body.classList.add("isDark"):document.body.classList.remove("isDark")}}},PE=DE,IE=(n("dd87"),Object(p["a"])(PE,i,o,!1,null,null,null));t["default"]=IE.exports},"5fd6":function(e,t,n){e.exports=n.p+"img/DNA.svg"},6005:function(e,t,n){"use strict";var r=n("a578"),i=n("cc50"),o=n("2f2d"),a=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},"60fc":function(e,t,n){e.exports=n.p+"img/chunjie.svg"},6171:function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},"61d3":function(e,t,n){},"61eb":function(e,t,n){"use strict";var r=n("54be"),i=n("6e16");e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},6276:function(e,t,n){e.exports=n.p+"img/skyGreen.jpg"},6277:function(e,t,n){},"63dc":function(e,t,n){},6412:function(e,t,n){e.exports=n.p+"img/tingzhenqi.svg"},6490:function(e,t,n){e.exports=n.p+"img/-_11.svg"},"655f":function(e,t,n){e.exports=n.p+"img/a-shu2.svg"},"65ee":function(e,t,n){e.exports=n.p+"img/ziyuan_14.svg"},6705:function(e,t,n){e.exports=n.p+"img/quqi.svg"},"67dd":function(e,t,n){e.exports=n.p+"img/kafeibei.svg"},"682c":function(e,t,n){"use strict";var r=function(e){return i(e)&&!o(e)};function i(e){return!!e&&"object"===typeof e}function o(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||l(e)}var a="function"===typeof Symbol&&Symbol.for,s=a?Symbol.for("react.element"):60103;function l(e){return e.$$typeof===s}function c(e){return Array.isArray(e)?[]:{}}function u(e,t){var n=t&&!0===t.clone;return n&&r(e)?f(c(e),e,t):e}function h(e,t,n){var i=e.slice();return t.forEach((function(t,o){"undefined"===typeof i[o]?i[o]=u(t,n):r(t)?i[o]=f(e[o],t,n):-1===e.indexOf(t)&&i.push(u(t,n))})),i}function d(e,t,n){var i={};return r(e)&&Object.keys(e).forEach((function(t){i[t]=u(e[t],n)})),Object.keys(t).forEach((function(o){r(t[o])&&e[o]?i[o]=f(e[o],t[o],n):i[o]=u(t[o],n)})),i}function f(e,t,n){var r=Array.isArray(t),i=Array.isArray(e),o=n||{arrayMerge:h},a=r===i;if(a){if(r){var s=o.arrayMerge||h;return s(e,t,n)}return d(e,t,n)}return u(t,n)}f.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return f(e,n,t)}))};var p=f;e.exports=p},"6ad8":function(e,t,n){e.exports=n.p+"img/lateNightOffice.jpg"},"6ade":function(e,t,n){e.exports=n.p+"img/fanyi.svg"},"6ba1":function(e,t,n){"use strict";var r=n("2f2d"),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},"6c12":function(e,t,n){"use strict";var r=n("46ab"),i=Error,o=r("".replace),a=function(e){return String(new i(e).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,l=s.test(a);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)while(t--)e=o(e,s,"");return e}},"6c25":function(e,t,n){e.exports=n.p+"img/ziyuan_18.svg"},"6c83":function(e,t,n){e.exports=n.p+"img/seaBlueLine.jpg"},"6d42":function(e,t,n){e.exports=n.p+"img/naixi.svg"},"6d50":function(e,t,n){e.exports=n.p+"img/ziyuan_9.svg"},"6d75":function(e,t,n){e.exports=n.p+"img/meishi.svg"},"6eac":function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d}));var r=n("9fd6"),i=n("5ab3"),o=n("9a8c"),a=n("9aca"),s=n("ca2d");const l=(e,t)=>{const n=s["b"](e).buffer,r=s["b"](t).buffer;return crypto.subtle.importKey("raw",n,"PBKDF2",!1,["deriveKey"]).then(e=>crypto.subtle.deriveKey({name:"PBKDF2",salt:r,iterations:1e5,hash:"SHA-256"},e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]))},c=(e,t)=>{if(!t)return o["c"](e);const n=crypto.getRandomValues(new Uint8Array(12));return crypto.subtle.encrypt({name:"AES-GCM",iv:n},t,e).then(e=>{const t=r["e"]();return r["m"](t,"AES-GCM"),r["o"](t,n),r["o"](t,new Uint8Array(e)),r["f"](t)})},u=(e,t)=>{const n=r["e"]();return r["h"](n,e),c(r["f"](n),t)},h=(e,t)=>{if(!t)return o["c"](e);const n=i["e"](e),r=i["j"](n);"AES-GCM"!==r&&o["b"](a["a"]("Unknown encryption algorithm"));const s=i["l"](n),l=i["l"](n);return crypto.subtle.decrypt({name:"AES-GCM",iv:s},t,l).then(e=>new Uint8Array(e))},d=(e,t)=>h(e,t).then(e=>i["g"](i["e"](new Uint8Array(e))))},"6f27":function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"ContentMatch",(function(){return R})),n.d(t,"DOMParser",(function(){return re})),n.d(t,"DOMSerializer",(function(){return ye})),n.d(t,"Fragment",(function(){return s})),n.d(t,"Mark",(function(){return h})),n.d(t,"MarkType",(function(){return ee})),n.d(t,"Node",(function(){return D})),n.d(t,"NodeRange",(function(){return L})),n.d(t,"NodeType",(function(){return Q})),n.d(t,"ReplaceError",(function(){return d})),n.d(t,"ResolvedPos",(function(){return S})),n.d(t,"Schema",(function(){return te})),n.d(t,"Slice",(function(){return f})),r.prototype={constructor:r,find:function(e){for(var t=0;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var i=r;function o(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i!=a){if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=o(i.content,a.content,n+1);if(null!=e)return e}n+=i.nodeSize}else n+=i.nodeSize}}function a(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(0==i||0==o)return i==o?null:{a:n,b:r};let s=e.child(--i),l=t.child(--o),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let e=0,t=Math.min(s.text.length,l.text.length);while(ee&&!1!==n(s,r+a,i||null,o)&&s.content.size){let i=a+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}a=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(a,s)=>{a.isText?(i+=a.text.slice(Math.max(e,s)-s,t-s),o=!n):a.isLeaf?(r?i+="function"===typeof r?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),o=!n):!o&&a.isBlock&&(i+=n,o=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);ie)for(let i=0,o=0;oe&&((ot)&&(a=a.isText?a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),n.push(a),r+=a.nodeSize),o=s}return new s(n,r)}cutByIndex(e,t){return e==t?s.empty:0==e&&t==this.content.length?this:new s(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new s(r,i)}addToStart(e){return new s([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new s(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return s.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new s(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return s.empty;let t,n=0;for(let r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;te.type.rank-t.type.rank),t}}h.none=[];class d extends Error{}class f{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=m(this.content,e+this.openStart,t);return n&&new f(n,this.openStart,this.openEnd)}removeBetween(e,t){return new f(p(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return f.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new f(s.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new f(e,n,r)}}function p(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(i==t||o.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(p(o.content,t-i-1,n-i-1)))}function m(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),a=e.maybeChild(i);if(o==t||a.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=m(a.content,t-o-1,n);return s&&e.replaceChild(i,a.copy(s))}function g(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return v(e,t,n,0)}function v(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function x(e,t,n,r){let i=(t||e).node(n),o=0,a=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(w(e.nodeAfter,r),o++));for(let s=o;si&&y(e,t,i+1),a=r.depth>i&&y(n,r,i+1),l=[];return x(null,e,i,l),o&&a&&t.index(i)==n.index(i)?(b(o,a),w(k(o,A(e,t,n,r,i+1)),l)):(o&&w(k(o,C(e,t,i+1)),l),x(t,n,i,l),a&&w(k(a,C(n,r,i+1)),l)),x(r,null,i,l),new s(l)}function C(e,t,n){let r=[];if(x(null,e,n,r),e.depth>n){let i=y(e,t,n+1);w(k(i,C(e,t,n+1)),r)}return x(t,null,n,r),new s(r)}function E(e,t){let n=t.depth-e.openStart,r=t.node(n),i=r.copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(s.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}f.empty=new f(s.empty,0,0);class S{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return e=this.resolveDepth(e),0==e?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let i=0;i0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new L(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let o=e;;){let{index:e,offset:t}=o.content.findIndex(i),a=i-t;if(n.push(o,e,r+t),!a)break;if(o=o.child(e),o.isText)break;i=a-1,r+=t+1}return new S(t,n,i)}static resolveCached(e,t){for(let r=0;re&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),I(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=s.empty,r=0,i=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,i),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let s=r;se.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=s.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}D.prototype.text=void 0;class P extends D{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):I(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new P(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new P(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function I(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class R{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new F(e,t);if(null==n.next)return R.empty;let r=z(n);n.next&&n.err("Unexpected trailing text");let i=Y(G(r));return Z(i,n),i}matchType(e){for(let t=0;te.createAndFill()));for(let e=0;e=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r{let r=n+(t.validEnd?"*":" ")+" ";for(let i=0;i"+e.indexOf(t.next[i].next);return r}).join("\n")}}R.empty=new R(!0);class F{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function z(e){let t=[];do{t.push(B(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function B(e){let t=[];do{t.push(_(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function _(e){let t=q(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=H(e,t)}return t}function j(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function H(e,t){let n=j(e),r=n;return e.eat(",")&&(r="}"!=e.next?j(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function U(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let e=n[o];e.groups.indexOf(t)>-1&&i.push(e)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i}function q(e){if(e.eat("(")){let t=z(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=U(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}function G(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function o(e,t){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(o(n,t)),[]);if("seq"!=e.type){if("star"==e.type){let a=n();return r(t,a),i(o(e.expr,a),a),[r(a)]}if("plus"==e.type){let a=n();return i(o(e.expr,t),a),i(o(e.expr,a),a),[r(a)]}if("opt"==e.type)return[r(t)].concat(o(e.expr,t));if("range"==e.type){let a=t;for(let t=0;t{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})})});let o=t[r.join(",")]=new R(r.indexOf(e.length-1)>-1);for(let e=0;e-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;tn[e]=new Q(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class ${constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class ee{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=J(r.attrs),this.excluded=null;let i=K(this.attrs);this.instance=i?new h(this,i):null}create(e=null){return!e&&this.instance?this.instance:new h(this,X(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new ee(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t-1}}class te{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=i.from(e.nodes),t.marks=i.from(e.marks||{}),this.nodes=Q.compile(this.spec.nodes,this),this.marks=ee.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let e=this.nodes[r],t=e.spec.content||"",i=e.spec.marks;e.contentMatch=n[t]||(n[t]=R.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==i?null:i?ne(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:ne(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new P(n,n.defaultAttrs,e,h.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return D.fromJSON(this,e)}markFromJSON(e){return h.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function ne(e,t){let n=[];for(let r=0;r-1)&&n.push(a=r)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class re{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new de(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new de(this,t,!0);return n.addAll(e,t.from,t.to),f.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;re.length&&(61!=o.charCodeAt(e.length)||o.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r{n(e=ge(e)),e.mark=r})}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach(e=>{n(e=ge(e)),e.node=r})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new re(e,re.schemaRules(e)))}}const ie={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},oe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ae={ol:!0,ul:!0},se=1,le=2,ce=4;function ue(e,t,n){return null!=t?(t?se:0)|("full"===t?le:0):e&&"pre"==e.whitespace?se|le:n&~ce}class he{constructor(e,t,n,r,i,o,a){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=h.none,this.stashMarks=[],this.match=o||(a&ce?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(s.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&se)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=s.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(s.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;tthis.insertNode(e));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,n){let r=t||0;for(let i=t?e.childNodes[t]:e.firstChild,o=null==n?null:e.childNodes[n];i!=o;i=i.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(i);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],o=i.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,n=i,!o.length))break;if(i.solid)break}if(!t)return!1;this.sync(n);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),o=(e,a)=>{for(;e>=0;e--){let s=t[e];if(""==s){if(e==t.length-1||0==e)continue;for(;a>=i;a--)if(o(e-1,a))return!0;return!1}{let e=a>0||0==a&&r?this.nodes[a].type:n&&a>=i?n.node(a-i).type:null;if(!e||e.name!=s&&-1==e.groups.indexOf(s))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=be(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n],i=r.pendingMarks.lastIndexOf(e);if(i>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function fe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&ae.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}function pe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function me(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];while(t=n.exec(e))r.push(t[1],t[2].trim());return r}function ge(e){let t={};for(let n in e)t[n]=e[n];return t}function ve(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],a=e=>{o.push(e);for(let n=0;n{if(i.length||e.marks.length){let n=0,o=0;while(n=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&ye.renderSpec(xe(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,i=t[0],o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a=n?e.createElementNS(n,i):e.createElement(i),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s)){l=2;for(let e in s)if(null!=s[e]){let t=e.indexOf(" ");t>0?a.setAttributeNS(e.slice(0,t),e.slice(t+1),s[e]):a.setAttribute(e,s[e])}}for(let c=l;cl)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:t,contentDOM:o}=ye.renderSpec(e,i,n);if(a.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:a,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ye(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=we(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return we(e.marks)}}function we(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function xe(e){return e.document||window.document}},"6f5c":function(e,t,n){e.exports=n.p+"img/xilanhua.svg"},"6ffb":function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return p})),n.d(t,"EditorState",(function(){return S})),n.d(t,"NodeSelection",(function(){return d})),n.d(t,"Plugin",(function(){return N})),n.d(t,"PluginKey",(function(){return O})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return s})),n.d(t,"TextSelection",(function(){return u})),n.d(t,"Transaction",(function(){return x}));var r=n("6f27"),i=n("b923");const o=Object.create(null);class a{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new s(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;i--){let r=t<0?g(e.node(0),e.node(i),e.before(i+1),e.index(i),t,n):g(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new p(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new p(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw new RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}a.prototype.visible=!0;class s{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function c(e){l||e.parent.inlineContent||(l=!0,console["warn"]("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends a{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return a.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r["Slice"].empty){if(super.replace(e,t),t==r["Slice"].empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new h(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=a.findFrom(t,n,!0)||a.findFrom(t,-n,!0);if(!e)return a.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(a.findFrom(e,-n,!0)||a.findFrom(e,n,!0)).$anchor,e.pos0?0:1);i>0?a=0;a+=i){let r=t.child(a);if(r.isAtom){if(!o&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function v(e,t,n){let r=e.steps.length-1;if(r{null==s&&(s=r)}),e.setSelection(a.near(e.doc.resolve(s),n))}const b=1,y=2,w=4;class x extends i["e"]{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=y,this}ensureMarks(e){return r["Mark"].sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&y)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~y,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r["Mark"].none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=w,this}get scrolledIntoView(){return(this.updated&w)>0}}function k(e,t){return t&&e?e.bind(t):e}class A{constructor(e,t,n){this.name=e,this.init=k(t.init,n),this.apply=k(t.apply,n)}}const C=[new A("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new A("selection",{init(e,t){return e.selection||a.atStart(t.doc)},apply(e){return e.selection}}),new A("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new A("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class E{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=C.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new A(e.key,e.spec.state,e))})}}class S{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;ne.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new E(e.schema,e.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r["Node"].fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=a.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let a=n[r],s=a.spec.state;if(a.key==i.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,r))return void(o[i.name]=s.fromJSON.call(a,e,t[r],o))}o[i.name]=i.init(e,o)}}),o}}function T(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=T(i,t,{})),n[r]=i}return n}class N{constructor(e){this.spec=e,this.props={},e.props&&T(e.props,this,this.props),this.key=e.key?e.key.key:L("plugin")}getState(e){return e[this.key]}}const M=Object.create(null);function L(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}class O{constructor(e="key"){this.key=L(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},"6ffb0":function(e,t,n){"use strict";n("d4a0")},"703f":function(e,t,n){"use strict";n.r(t),n.d(t,"Decoration",(function(){return An})),n.d(t,"DecorationSet",(function(){return Sn})),n.d(t,"EditorView",(function(){return ir})),n.d(t,"__endComposition",(function(){return rr})),n.d(t,"__parseFromClipboard",(function(){return nr})),n.d(t,"__serializeForClipboard",(function(){return tr}));var r=n("6ffb"),i=n("6f27"),o=n("b923");const a=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},s=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let l=null;const c=function(e,t,n){let r=l||(l=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},u=function(e,t,n,r){return n&&(d(e,t,n,r,-1)||d(e,t,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function d(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:f(e))){let n=e.parentNode;if(!n||1!=n.nodeType||m(e)||h.test(e.nodeName)||"false"==e.contentEditable)return!1;t=a(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(e=e.childNodes[t+(i<0?-1:0)],"false"==e.contentEditable)return!1;t=i<0?f(e):0}}}function f(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function p(e,t,n){for(let r=0==t,i=t==f(e);r||i;){if(e==n)return!0;let t=a(e);if(e=e.parentNode,!e)return!1;r=r&&0==t,i=i&&t==f(e)}}function m(e){let t;for(let n=e;n;n=n.parentNode)if(t=n.pmViewDesc)break;return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const g=function(e){return e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function v(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function b(e){let t=e.activeElement;while(t&&t.shadowRoot)t=t.shadowRoot.activeElement;return t}const y="undefined"!=typeof navigator?navigator:null,w="undefined"!=typeof document?document:null,x=y&&y.userAgent||"",k=/Edge\/(\d+)/.exec(x),A=/MSIE \d/.exec(x),C=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(x),E=!!(A||C||k),S=A?document.documentMode:C?+C[1]:k?+k[1]:0,T=!E&&/gecko\/(\d+)/i.test(x);T&&(/Firefox\/(\d+)/.exec(x)||[0,0])[1];const N=!E&&/Chrome\/(\d+)/.exec(x),M=!!N,L=N?+N[1]:0,O=!E&&!!y&&/Apple Computer/.test(y.vendor),D=O&&(/Mobile\/\w+/.test(x)||!!y&&y.maxTouchPoints>2),P=D||!!y&&/Mac/.test(y.platform),I=/Android \d/.test(x),R=!!w&&"webkitFontSmoothing"in w.documentElement.style,F=R?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function B(e,t){return"number"==typeof e?e:e[t]}function _(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function j(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let a=n||e.dom;;a=s(a)){if(!a)break;if(1!=a.nodeType)continue;let e=a,n=e==o.body,s=n?z(o):_(e),l=0,c=0;if(t.tops.bottom-B(r,"bottom")&&(c=t.bottom-s.bottom+B(i,"bottom")),t.lefts.right-B(r,"right")&&(l=t.right-s.right+B(i,"right")),l||c)if(n)o.defaultView.scrollBy(l,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),l&&(e.scrollLeft+=l);let i=e.scrollLeft-n,o=e.scrollTop-r;t={left:t.left-i,top:t.top-o,right:t.right-i,bottom:t.bottom-o}}if(n)break}}function H(e){let t,n,r=e.dom.getBoundingClientRect(),i=Math.max(0,r.top);for(let o=(r.left+r.right)/2,a=i+1;a=i-20){t=r,n=s.top;break}}return{refDOM:t,refTop:n,stack:U(e.dom)}}function U(e){let t=[],n=e.ownerDocument;for(let r=e;r;r=s(r))if(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e==n)break;return t}function q({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;G(n,0==r?0:r-t)}function G(e,t){for(let n=0;n=s){a=Math.max(h.bottom,a),s=Math.min(h.top,s);let e=h.left>t.left?h.left-t.left:h.right=(h.left+h.right)/2?1:0));continue}}!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(o=u+1)}}return n&&3==n.nodeType?Z(n,r):!n||i&&1==n.nodeType?{node:e,offset:o}:Y(n,r)}function Z(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}function K(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function X(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}function Q(e,t,n,r){let i=-1;for(let o=t;;){if(o==e.dom)break;let t=e.docView.nearestDesc(o,!0);if(!t)return null;if(t.node.isBlock&&t.parent){let e=t.dom.getBoundingClientRect();if(e.left>r.left||e.top>r.top)i=t.posBefore;else{if(!(e.right-1?i:e.docView.posFromDOM(t,n,1)}function $(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&i++}n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?o=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(o=Q(e,n,i,t))}null==o&&(o=J(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:o,inside:l?l.posAtStart-l.border:-1}}function te(e,t){let n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}const ne=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function re(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),a=R||T;if(3==r.nodeType){if(!a||!ne.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let e=i,t=i,o=n<0?1:-1;return n<0&&!i?(t++,o=-1):n>=0&&i==r.nodeValue.length?(e--,o=1):n<0?e--:t++,ie(te(c(r,e,t),1),o<0)}{let e=te(c(r,i,i),n);if(T&&i&&/\s/.test(r.nodeValue[i-1])&&i=0)}if(null==o&&i&&(n<0||i==f(r))){let e=r.childNodes[i-1],t=3==e.nodeType?c(e,f(e)-(a?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return ie(te(t,1),!1)}if(null==o&&i=0)}function ie(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function oe(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ae(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function se(e,t,n){let r=t.selection,i="up"==n?r.$from:r.$to;return ae(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.dom;break}t=n.dom.parentNode}let r=re(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=c(e,0,e.nodeValue.length).getClientRects()}for(let e=0;ei.top+1&&("up"==n?r.top-i.top>2*(i.bottom-r.top):i.bottom-r.bottom>2*(r.bottom-i.top)))return!1}}return!0})}const le=/[\u0590-\u08ac]/;function ce(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,a=i==r.parent.content.size,s=e.domSelection();return le.test(r.parent.textContent)&&s.modify?ae(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:o,anchorOffset:a}=e.domSelectionRange(),l=s.caretBidiLevel;s.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:h}=e.domSelectionRange(),d=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&i==h;try{s.collapse(o,a),t&&(t!=o||i!=a)&&s.extend&&s.extend(t,i)}catch(f){}return null!=l&&(s.caretBidiLevel=l),d}):"left"==n||"backward"==n?o:a}let ue=null,he=null,de=!1;function fe(e,t,n){return ue==t&&he==n?de:(ue=t,he=n,de="up"==n||"down"==n?se(e,t,n):ce(e,t,n))}const pe=0,me=1,ge=2,ve=3;class be{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=pe,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;ta(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i,o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;te||t instanceof Ee){i=e-o;break}o=n}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ye&&n.side>=0;r--);if(t<=0){let e,n=!0;for(;;r--,n=!1)if(e=r?this.children[r-1]:null,!e||e.dom.parentNode==this.contentDOM)break;return e&&t&&n&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?a(e.dom)+1:0}}{let e,n=!0;for(;;r++,n=!1)if(e=r=i&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=o;for(let t=s;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=a(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||s==this.children.length-1)){t=l;for(let e=s+1;eu&&ot){let e=s;s=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r=n:en){let r=n+i.border,a=o-i.border;if(e>=r&&t<=a)return this.dirty=e==n||t==o?ge:me,void(e!=r||t!=a||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-r,t-r):i.dirty=ve);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?ve:ge}n=o}this.dirty=ge}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?ge:me;t.dirtyi?i.parent?i.parent.posBeforeChild(i):void 0:r)),!t.type.spec.raw){if(1!=o.nodeType){let e=document.createElement("span");e.appendChild(o),o=e}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==pe&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class we extends be{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class xe extends be{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],a=o&&o(t,r,n);return a&&a.dom||(a=i["DOMSerializer"].renderSpec(document,t.type.spec.toDOM(t,n))),new xe(e,t,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&ve||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return this.dirty!=ve&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=pe){let e=this.parent;while(!e.node)e=e.parent;e.dirty0&&(i=qe(i,0,e,n));for(let a=0;as?s.parent?s.parent.posBeforeChild(s):void 0:a,n,r),u=c&&c.dom,h=c&&c.contentDOM;if(t.isText)if(u){if(3!=u.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(t.text);else u||({dom:u,contentDOM:h}=i["DOMSerializer"].renderSpec(document,t.type.spec.toDOM(t)));h||t.isText||"BR"==u.nodeName||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let d=u;return u=Pe(u,n,t),c?s=new Se(e,t,n,r,u,h||null,d,c,o,a+1):t.isText?new Ce(e,t,n,r,u,d,o):new ke(e,t,n,r,u,h||null,d,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>i["Fragment"].empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return this.dirty==pe&&e.eq(this.node)&&Ie(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,a=o&&o.pos>-1?o:null,s=o&&o.pos<0,l=new Fe(this,a&&a.node,e);_e(this.node,this.innerDeco,(t,o,a)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&l.syncToMarks(o==this.node.childCount?i["Mark"].none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)},(t,i,a,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,i,a,c)||s&&e.state.selection.from>r&&e.state.selection.to-1&&l.updateNodeAt(t,i,a,u,e)||l.updateNextNode(t,i,a,e,c)||l.addNode(t,i,a,e,r),r+=t.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ge)&&(a&&this.protectLocalComposition(e,a),Te(this.contentDOM,this.children,e),D&&je(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof r["TextSelection"])||nt+this.node.content.size)return null;let o=e.domSelectionRange(),a=He(o.focusNode,o.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let e=a.nodeValue,r=Ue(this.node.content,e,n-t,i-t);return r<0?null:{node:a,pos:r,text:e}}return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;;i=i.parentNode){if(i.parentNode==this.contentDOM)break;while(i.previousSibling)i.parentNode.removeChild(i.previousSibling);while(i.nextSibling)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new we(this,i,t,r);e.input.compositionNodes.push(o),this.children=qe(this.children,n,n+r.length,e,o)}update(e,t,n,r){return!(this.dirty==ve||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=pe}updateOuterDeco(e){if(Ie(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Oe(this.dom,this.nodeDOM,Le(this.outerDeco,this.node,t),Le(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Ae(e,t,n,r,i){return Pe(r,t,e),new ke(void 0,e,t,n,r,r,r,i,0)}class Ce extends ke{constructor(e,t,n,r,i,o,a){super(e,t,n,r,i,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;while(e&&e!=this.dom&&!e.pmIsDeco)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(this.dirty==ve||this.dirty!=pe&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==pe&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=pe,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),i=document.createTextNode(r.text);return new Ce(this.parent,r,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=ve)}get domAtom(){return!1}}class Ee extends be{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==pe&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class Se extends ke{constructor(e,t,n,r,i,o,a,s,l,c){super(e,t,n,r,i,o,a,l,c),this.spec=s}update(e,t,n,r){if(this.dirty==ve)return!1;if(this.spec.update){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Te(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o>1,o=Math.min(i,e.length);while(r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=xe.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i,o=-1;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))o=this.top.children.indexOf(i,this.index);else for(let a=this.index,s=Math.min(this.top.children.length,a+5);a0){let s;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof xe)){s=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(i-1))break;--i,o.set(s,i),a.push(s)}}return{index:i,matched:o,matches:a.reverse()}}function Be(e,t){return e.type.side-t.type.side}function _e(e,t,n,r){let i=t.locals(e),o=0;if(0==i.length){for(let n=0;no)s.push(i[a++]);let d=o+u.nodeSize;if(u.isText){let e=d;a!e.inline):s.slice();r(u,f,t.forChild(o,u),h),o=d}}function je(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function He(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=f(e)}else{if(!(1==e.nodeType&&t=n){let e=s=0&&e+t.length+s>=n)return s+e;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function qe(e,t,n,r,i){let o=[];for(let a=0,s=0;a=n||u<=t?o.push(l):(cn&&o.push(l.slice(n-c,l.size,r)))}return o}function Ge(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l,c,u=i.resolve(s);if(g(n)){l=u;while(o&&!o.node)o=o.parent;let e=o.node;if(o&&e.isAtom&&r["NodeSelection"].isSelectable(e)&&o.parent&&(!e.isInline||!p(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;c=new r["NodeSelection"](s==e?u:i.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;l=i.resolve(t)}if(!c){let n="pointer"==t||e.state.selection.head{n.anchorNode==r&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{We(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")},20))})}function Qe(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i="IMG"==r.nodeName;i?n.setEnd(r.parentNode,a(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&E&&S<=11&&(r.disabled=!0,r.disabled=!1)}function $e(e,t){if(t instanceof r["NodeSelection"]){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(et(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else et(e)}function et(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function tt(e,t,n,i){return e.someProp("createSelectionBetween",r=>r(e,t,n))||r["TextSelection"].between(t,n,i)}function nt(e){return!(e.editable&&!e.hasFocus())&&rt(e)}function rt(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function it(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return u(t.node,t.offset,n.anchorNode,n.anchorOffset)}function ot(e,t){let{$anchor:n,$head:i}=e.selection,o=t>0?n.max(i):n.min(i),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&r["Selection"].findFrom(a,t)}function at(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function st(e,t,n){let i=e.state.selection;if(!(i instanceof r["TextSelection"])){if(i instanceof r["NodeSelection"]&&i.node.isInline)return at(e,new r["TextSelection"](t>0?i.$to:i.$from));{let n=ot(e.state,t);return!!n&&at(e,n)}}if(!i.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=ot(e.state,t);return!!(n&&n instanceof r["NodeSelection"])&&at(e,n)}if(!(P&&n.indexOf("m")>-1)){let n,o=i.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText)return!1;let s=t<0?o.pos-a.nodeSize:o.pos;return!!(a.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(r["NodeSelection"].isSelectable(a)?at(e,new r["NodeSelection"](t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):!!R&&at(e,new r["TextSelection"](e.state.doc.resolve(t<0?s:s+a.nodeSize))))}}function lt(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ct(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function ut(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(T&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(ct(e))i=n,o=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(dt(n))break;{let t=n.previousSibling;while(t&&ct(t))i=n.parentNode,o=a(t),t=t.previousSibling;if(t)n=t,r=lt(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?ft(e,n,r):i&&ft(e,i,o)}function ht(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=lt(n);for(;;)if(r{e.state==i&&Ve(e)},50)}function pt(e,t,n){let i=e.state.selection;if(i instanceof r["TextSelection"]&&!i.empty||n.indexOf("s")>-1)return!1;if(P&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=i;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=ot(e.state,t);if(n&&n instanceof r["NodeSelection"])return at(e,n)}if(!o.parent.inlineContent){let n=t<0?o:a,s=i instanceof r["AllSelection"]?r["Selection"].near(n,t):r["Selection"].findFrom(n,t);return!!s&&at(e,s)}return!1}function mt(e,t){if(!(e.state.selection instanceof r["TextSelection"]))return!0;let{$head:n,$anchor:i,empty:o}=e.state.selection;if(!n.sameParent(i))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function gt(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function vt(e){if(!O||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;gt(e,n,"true"),setTimeout(()=>gt(e,n,"false"),20)}return!1}function bt(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function yt(e,t){let n=t.keyCode,r=bt(t);return 8==n||P&&72==n&&"c"==r?mt(e,-1)||ut(e):46==n||P&&68==n&&"c"==r?mt(e,1)||ht(e):13==n||27==n||(37==n||P&&66==n&&"c"==r?st(e,-1,r)||ut(e):39==n||P&&70==n&&"c"==r?st(e,1,r)||ht(e):38==n||P&&80==n&&"c"==r?pt(e,-1,r)||ut(e):40==n||P&&78==n&&"c"==r?vt(e)||pt(e,1,r)||ht(e):r==(P?"m":"c")&&(66==n||73==n||89==n||90==n))}function wt(e,t){e.someProp("transformCopied",n=>{t=n(t,e)});let n=[],{content:r,openStart:o,openEnd:a}=t;while(o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount){o--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||i["DOMSerializer"].fromSchema(e.state.schema),l=Ot(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));let u,h=c.firstChild,d=0;while(h&&1==h.nodeType&&(u=Mt[h.nodeName.toLowerCase()])){for(let e=u.length-1;e>=0;e--){let t=l.createElement(u[e]);while(c.firstChild)t.appendChild(c.firstChild);c.appendChild(t),d++}h=c.firstChild}h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${o} ${a}${d?" -"+d:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",n=>n(t,e))||t.content.textBetween(0,t.content.size,"\n\n");return{dom:c,text:f}}function xt(e,t,n,r,o){let a,s,l=o.parent.type.spec.code;if(!n&&!t)return null;let c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",n=>{t=n(t,l||r,e)}),l)return t?new i["Slice"](i["Fragment"].from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):i["Slice"].empty;let n=e.someProp("clipboardTextParser",n=>n(t,o,r,e));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=i["DOMSerializer"].fromSchema(r);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))})}}else e.someProp("transformPastedHTML",t=>{n=t(n,e)}),a=Dt(n),R&&Pt(a);let u=a&&a.querySelector("[data-pm-slice]"),h=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let i=+h[3];i>0;i--){let e=a.firstChild;while(e&&1!=e.nodeType)e=e.nextSibling;if(!e)break;a=e}if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||i["DOMParser"].fromSchema(e.state.schema);s=t.parseSlice(a,{preserveWhitespace:!(!c&&!h),context:o,ruleFromNode(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||kt.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)s=It(Nt(s,+h[1],+h[2]),h[4]);else if(s=i["Slice"].maxOpen(At(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let n=s.content.firstChild;e{s=t(s,e)}),s}const kt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function At(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n),a=o.contentMatchAt(t.index(n)),s=[];if(e.forEach(e=>{if(!s)return;let t,n=a.findWrapping(e.type);if(!n)return s=null;if(t=s.length&&r.length&&Et(n,r,e,s[s.length-1],0))s[s.length-1]=t;else{s.length&&(s[s.length-1]=St(s[s.length-1],r.length));let t=Ct(e,n);s.push(t),a=a.matchType(t.type),r=n}}),s)return i["Fragment"].from(s)}return e}function Ct(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,i["Fragment"].from(e));return e}function Et(e,t,n,r,o){if(o=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(i["Fragment"].empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function Nt(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=Ot().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);if((n=i&&Mt[i[1].toLowerCase()])&&(e=n.map(e=>"<"+e+">").join("")+e+n.map(e=>"").reverse().join("")),r.innerHTML=e,n)for(let o=0;o=0;c-=2){let e=r.nodes[n[c]];if(!e||e.hasRequiredAttrs())break;o=i["Fragment"].from(e.create(n[c+1],o)),a++,s++}return new i["Slice"](o,a,s)}const Rt={},Ft={},zt={touchstart:!0,touchmove:!0};class Bt{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _t(e){for(let t in Rt){let n=Rt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!Gt(e,t)||qt(e,t)||!e.editable&&t.type in Ft||n(e,t)},zt[t]?{passive:!0}:void 0)}O&&e.dom.addEventListener("input",()=>null),Ut(e)}function jt(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ht(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Ut(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>qt(e,t))})}function qt(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function Gt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Wt(e,t){qt(e,t)||!Rt[t.type]||!e.editable&&t.type in Ft||Rt[t.type](e,t)}function Vt(e){return{left:e.clientX,top:e.clientY}}function Yt(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Zt(e,t,n,r,i){if(-1==r)return!1;let o=e.state.doc.resolve(r);for(let a=o.depth+1;a>0;a--)if(e.someProp(t,t=>a>o.depth?t(e,n,o.nodeAfter,o.before(a),i,!0):t(e,n,o.node(a),o.before(a),i,!1)))return!0;return!1}function Kt(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Xt(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return!!(i&&i.isAtom&&r["NodeSelection"].isSelectable(i))&&(Kt(e,new r["NodeSelection"](n),"pointer"),!0)}function Jt(e,t){if(-1==t)return!1;let n,i,o=e.state.selection;o instanceof r["NodeSelection"]&&(n=o.node);let a=e.state.doc.resolve(t);for(let s=a.depth+1;s>0;s--){let e=s>a.depth?a.nodeAfter:a.node(s);if(r["NodeSelection"].isSelectable(e)){i=n&&o.$from.depth>0&&s>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(s);break}}return null!=i&&(Kt(e,r["NodeSelection"].create(e.state.doc,i),"pointer"),!0)}function Qt(e,t,n,r,i){return Zt(e,"handleClickOn",t,n,r)||e.someProp("handleClick",n=>n(e,t,r))||(i?Jt(e,n):Xt(e,n))}function $t(e,t,n,r){return Zt(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",n=>n(e,t,r))}function en(e,t,n,r){return Zt(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",n=>n(e,t,r))||tn(e,n,r)}function tn(e,t,n){if(0!=n.button)return!1;let i=e.state.doc;if(-1==t)return!!i.inlineContent&&(Kt(e,r["TextSelection"].create(i,0,i.content.size),"pointer"),!0);let o=i.resolve(t);for(let a=o.depth+1;a>0;a--){let t=a>o.depth?o.nodeAfter:o.node(a),n=o.before(a);if(t.inlineContent)Kt(e,r["TextSelection"].create(i,n+1,n+1+t.content.size),"pointer");else{if(!r["NodeSelection"].isSelectable(t))continue;Kt(e,r["NodeSelection"].create(i,n),"pointer")}return!0}}function nn(e){return hn(e)}Ft.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!an(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!I||!M||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!D||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",t=>t(e,n))||yt(e,n)?n.preventDefault():jt(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",t=>t(e,v(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},Ft.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Ft.keypress=(e,t)=>{let n=t;if(an(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||P&&n.metaKey)return;if(e.someProp("handleKeyPress",t=>t(e,n)))return void n.preventDefault();let i=e.state.selection;if(!(i instanceof r["TextSelection"])||!i.$from.sameParent(i.$to)){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",n=>n(e,i.$from.pos,i.$to.pos,t))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const rn=P?"metaKey":"ctrlKey";Rt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=nn(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&Yt(n,e.input.lastClick)&&!n[rn]&&("singleClick"==e.input.lastClick.type?o="doubleClick":"doubleClick"==e.input.lastClick.type&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let a=e.posAtCoords(Vt(n));a&&("singleClick"==o?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new on(e,a,n,!!r)):("doubleClick"==o?$t:en)(e,a.pos,a.inside,n)?n.preventDefault():jt(e,"pointer"))};class on{constructor(e,t,n,i){let o,a;if(this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[rn],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,a=n.depth?n.before():0}const s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l?l.dom:null;let{selection:c}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof r["NodeSelection"]&&c.from<=a&&c.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!T||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),jt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ve(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Vt(e))),this.updateAllowDefault(e),this.allowDefault||!t?jt(this.view,"pointer"):Qt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||O&&this.mightDrag&&!this.mightDrag.node.isAtom||M&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Kt(this.view,r["Selection"].near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):jt(this.view,"pointer")}move(e){this.updateAllowDefault(e),jt(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function an(e,t){return!!e.composing||!!(O&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Rt.touchstart=e=>{e.input.lastTouch=Date.now(),nn(e),jt(e,"pointer")},Rt.touchmove=e=>{e.input.lastTouch=Date.now(),jt(e,"pointer")},Rt.contextmenu=e=>nn(e);const sn=I?5e3:-1;function ln(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>hn(e),t))}function cn(e){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=un());while(e.input.compositionNodes.length>0)e.input.compositionNodes.pop().markParentsDirty()}function un(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function hn(e,t=!1){if(!(I&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),cn(e),t||e.docView&&e.docView.dirty){let t=Ge(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}function dn(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}Ft.compositionstart=Ft.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>!1===e.type.spec.inclusive)))e.markCursor=e.state.storedMarks||n.marks(),hn(e,!0),e.markCursor=null;else if(hn(e),T&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}ln(e,sn)},Ft.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,ln(e,20))};const fn=E&&S<15||D&&F<604;function pn(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}function mn(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?gn(e,r.value,null,t):gn(e,r.textContent,r.innerHTML,t)},50)}function gn(e,t,n,r){let o=xt(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",t=>t(e,r,o||i["Slice"].empty)))return!0;if(!o)return!1;let a=pn(o),s=a?e.state.tr.replaceSelectionWith(a,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Rt.copy=Ft.cut=(e,t)=>{let n=t,r=e.state.selection,i="cut"==n.type;if(r.empty)return;let o=fn?null:n.clipboardData,a=r.content(),{dom:s,text:l}=wt(e,a);o?(n.preventDefault(),o.clearData(),o.setData("text/html",s.innerHTML),o.setData("text/plain",l)):dn(e,s),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ft.paste=(e,t)=>{let n=t;if(e.composing&&!I)return;let r=fn?null:n.clipboardData;r&&gn(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():mn(e,n)};class vn{constructor(e,t){this.slice=e,this.move=t}}const bn=P?"altKey":"ctrlKey";Rt.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let o=e.state.selection,a=o.empty?null:e.posAtCoords(Vt(n));if(a&&a.pos>=o.from&&a.pos<=(o instanceof r["NodeSelection"]?o.to-1:o.to));else if(i&&i.mightDrag)e.dispatch(e.state.tr.setSelection(r["NodeSelection"].create(e.state.doc,i.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(r["NodeSelection"].create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:l,text:c}=wt(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(fn?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",fn||n.dataTransfer.setData("text/plain",c),e.dragging=new vn(s,!n[bn])},Rt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Ft.dragover=Ft.dragenter=(e,t)=>t.preventDefault(),Ft.drop=(e,t)=>{let n=t,a=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let s=e.posAtCoords(Vt(n));if(!s)return;let l=e.state.doc.resolve(s.pos),c=a&&a.slice;c?e.someProp("transformPasted",t=>{c=t(c,e)}):c=xt(e,n.dataTransfer.getData(fn?"Text":"text/plain"),fn?null:n.dataTransfer.getData("text/html"),!1,l);let u=!(!a||n[bn]);if(e.someProp("handleDrop",t=>t(e,n,c||i["Slice"].empty,u)))return void n.preventDefault();if(!c)return;n.preventDefault();let h=c?Object(o["h"])(e.state.doc,l.pos,c):l.pos;null==h&&(h=l.pos);let d=e.state.tr;u&&d.deleteSelection();let f=d.mapping.map(h),p=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=d.doc;if(p?d.replaceRangeWith(f,f,c.content.firstChild):d.replaceRange(f,f,c),d.doc.eq(m))return;let g=d.doc.resolve(f);if(p&&r["NodeSelection"].isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))d.setSelection(new r["NodeSelection"](g));else{let t=d.mapping.map(h);d.mapping.maps[d.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),d.setSelection(tt(e,g,d.doc.resolve(t)))}e.focus(),e.dispatch(d.setMeta("uiEvent","drop"))},Rt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ve(e)},20))},Rt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Rt.beforeinput=(e,t)=>{let n=t;if(M&&I&&"deleteContentBackward"==n.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",t=>t(e,v(8,"Backspace"))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let dr in Ft)Rt[dr]=Ft[dr];function yn(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class wn{constructor(e,t){this.toDOM=e,this.spec=t||En,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new An(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof wn&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&yn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class xn{constructor(e,t){this.attrs=e,this.spec=t||En}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=o?null:new An(i,o,this)}valid(e,t){return t.from=e&&(!i||i(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(let o=0;oe){let a=this.children[o]+1;this.children[o+2].findInner(e-a,t-a,n,r+a,i)}}map(e,t,n){return this==Tn||0==e.maps.length?this:this.mapInner(e,t,0,0,n||En)}mapInner(e,t,n,r,i){let o;for(let a=0;a{let a,s=o+n;if(a=Dn(t,e,s)){r||(r=this.children.slice());while(io&&t.to=e){this.children[a]==e&&(n=this.children[a+2]);break}let i=e+1,o=i+t.content.size;for(let a=0;ai&&e.type instanceof xn){let t=Math.max(i,e.from)-i,n=Math.min(o,e.to)-i;tn.map(e,t,En));return Nn.from(n)}forChild(e,t){if(t.isLeaf)return Sn.empty;let n=[];for(let r=0;re instanceof Sn)?e:e.reduce((e,t)=>e.concat(t instanceof Sn?t:t.members),[]))}}}function Mn(e,t,n,r,i,o,a){let s=e.slice();for(let c=0,u=o;c{let a=o-r-(n-t);for(let l=0;lo+u-e)continue;let c=s[l]+u-e;n>=c?s[l+1]=t<=c?-2:-1:r>=i&&a&&(s[l]+=a,s[l+1]+=a)}e+=a}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c=r.content.size){l=!0;continue}let h=n.map(e[c+1]+o,-1),d=h-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[c+2].mapInner(n,m,t+1,e[c]+o+1,a);r!=Tn?(s[c]=u,s[c+1]=d,s[c+2]=r):(s[c+1]=-2,l=!0)}else l=!0}if(l){let l=On(s,e,t,n,i,o,a),c=In(l,r,0,a);t=c.local;for(let e=0;en&&o.to{let s=Dn(e,t,a+n);if(s){o=!0;let e=In(s,t,n+a+1,r);e!=Tn&&i.push(a,a+t.nodeSize,e)}});let a=Ln(o?Pn(e):e,-n).sort(Rn);for(let s=0;s0)t++;e.splice(t,0,n)}function Bn(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Tn&&t.push(r)}),e.cursorWrapper&&t.push(Sn.create(e.state.doc,[e.cursorWrapper.deco])),Nn.from(t)}const _n={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jn=E&&S<=11;class Hn{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Un{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Hn,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),jn&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,_n)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nt(this.view)){if(this.suppressingSelectionUpdates)return Ve(this.view);if(E&&S<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&u(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let i=e.focusNode;i;i=s(i))n.add(i);for(let i=e.anchorNode;i;i=s(i))if(n.has(i)){t=i;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&nt(e)&&!this.ignoreSelectionChange(n),o=-1,a=-1,s=!1,l=[];if(e.editable)for(let r=0;r1){let e=l.filter(e=>"BR"==e.nodeName);if(2==e.length){let t=e[0],n=e[1];t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&e.input.lastTouch-1||i)&&(o>-1&&(e.docView.markDirty(o,a),Wn(e)),this.handleDOMChange(o,a,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Ve(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;na;i--){let e=o.childNodes[i-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){s=i;break}if(!t||t.size)break}let d=e.state.doc,f=e.someProp("domParser")||i["DOMParser"].fromSchema(e.state.schema),p=d.resolve(l),m=null,v=f.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:r,ruleFromNode:Zn,context:p});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),m={anchor:e+l,head:t+l}}return{doc:v,sel:m,from:l,to:c}}function Zn(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(O&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||O&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Kn(e,t,n,i,o){if(t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Ge(e,t);if(n&&!e.state.selection.eq(n)){let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),e.dispatch(r)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l,c,u=e.state.selection,h=Yn(e,t,n),d=e.state.doc,f=d.slice(h.from,h.to);8===e.input.lastKeyCode&&Date.now()-100Date.now()-225||I)&&o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName||"LI"==e.nodeName)&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",t=>t(e,v(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!p){if(!(i&&u instanceof r["TextSelection"]&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let t=Xn(e,e.state.doc,h.sel);t&&!t.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(t))}return}p={start:u.from,endA:u.to,endB:u.to}}if(M&&e.cursorWrapper&&h.sel&&h.sel.anchor==e.cursorWrapper.deco.from&&h.sel.head==h.sel.anchor){let e=p.endB-p.start;h.sel={anchor:h.sel.anchor+e,head:h.sel.anchor+e}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=h.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),E&&S<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>h.from&&"  "==h.doc.textBetween(p.start-h.from-1,p.start-h.from+1)&&(p.start--,p.endA--,p.endB--);let m,g=h.doc.resolveNoCache(p.start-h.from),b=h.doc.resolveNoCache(p.endB-h.from),y=d.resolve(p.start),w=g.sameParent(b)&&g.parent.inlineContent&&y.end()>=p.endA;if((D&&e.input.lastIOSEnter>Date.now()-225&&(!w||o.some(e=>"DIV"==e.nodeName||"P"==e.nodeName))||!w&&g.post(e,v(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&Qn(d,p.start,p.endA,g,b)&&e.someProp("handleKeyDown",t=>t(e,v(8,"Backspace"))))return void(I&&M&&e.domObserver.suppressSelectionUpdates());M&&I&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),I&&!w&&g.start()!=b.start()&&0==b.parentOffset&&g.depth==b.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==p.endA&&(p.endB-=2,b=h.doc.resolveNoCache(p.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",(function(t){return t(e,v(13,"Enter"))}))},20));let x,k,A,C=p.start,T=p.endA;if(w)if(g.pos==b.pos)E&&S<=11&&0==g.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ve(e),20)),x=e.state.tr.delete(C,T),k=d.resolve(p.start).marksAcross(d.resolve(p.endA));else if(p.endA==p.endB&&(A=Jn(g.parent.content.cut(g.parentOffset,b.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))x=e.state.tr,"add"==A.type?x.addMark(C,T,A.mark):x.removeMark(C,T,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==b.index()-(b.textOffset?0:1)){let t=g.parent.textBetween(g.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",n=>n(e,C,T,t)))return;x=e.state.tr.insertText(t,C,T)}if(x||(x=e.state.tr.replace(C,T,h.doc.slice(p.start-h.from,p.endB-h.from))),h.sel){let t=Xn(e,x.doc,h.sel);t&&!(M&&I&&e.composing&&t.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:tt(e,t.resolve(n.anchor),t.resolve(n.head))}function Jn(e,t){let n,r,o,a=e.firstChild.marks,s=t.firstChild.marks,l=a,c=s;for(let i=0;ie.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let u=[];for(let i=0;in||$n(a,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount))r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));while(t&&!t.isLeaf)t=t.firstChild,i++}return i}function er(e,t,n,r,i){let o=e.findDiffStart(t,n);if(null==o)return null;let{a:a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){let e=Math.max(0,o-Math.min(a,s));r-=a+e-o}if(a=a?o-r:0;o-=e,s=o+(s-a),a=o}else if(s=s?o-r:0;o-=e,a=o+(a-s),s=o}return{start:o,endA:a,endB:s}}const tr=wt,nr=xt,rr=hn;class ir{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Bt,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(hr),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=sr(this),ar(this),this.nodeViews=cr(this),this.docView=Ae(this.state.doc,or(this),Bn(this),this.dom,this),this.domObserver=new Un(this,(e,t,n,r)=>Kn(this,e,t,n,r)),this.domObserver.start(),_t(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ut(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(hr),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(cn(this),i=!0),this.state=e;let o=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=cr(this);ur(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ut(this),this.editable=sr(this),ar(this);let a=Bn(this),s=or(this),l=n.plugins==e.plugins||n.doc.eq(e.doc)?e.scrollToSelection>n.scrollToSelection?"to selection":"preserve":"reset",c=r||!this.docView.matchesNode(e.doc,s,a);!c&&e.selection.eq(n.selection)||(i=!0);let u="preserve"==l&&i&&null==this.dom.style.overflowAnchor&&H(this);if(i){this.domObserver.stop();let t=c&&(E||M)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&lr(n.selection,e.selection);if(c){let n=M?this.trackWrites=this.domSelectionRange().focusNode:null;!r&&this.docView.update(e.doc,s,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ae(e.doc,s,a,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&it(this))?Ve(this,t):($e(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),"reset"==l?this.dom.scrollTop=0:"to selection"==l?this.scrollToSelection():u&&q(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",e=>e(this)));else if(this.state.selection instanceof r["NodeSelection"]){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&j(this,t.getBoundingClientRect(),e)}else j(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;while(e=this.pluginViews.pop())e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;tt.ownerDocument.getSelection()),this._root=t;return e||document}posAtCoords(e){return ee(this,e)}coordsAtPos(e,t=1){return re(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return fe(this,t||this.state,e)}destroy(){this.docView&&(Ht(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Bn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return Wt(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return O&&11===this.root.nodeType&&b(this.dom.ownerDocument)==this.dom?Vn(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function or(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e&&(t.class+=" "+n[e]),"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))}),[An.node(0,e.state.doc.content.size,t)]}function ar(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:An.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function sr(e){return!e.someProp("editable",t=>!1===t(e.state))}function lr(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function cr(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function ur(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function hr(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},7080:function(e,t,n){e.exports=n.p+"img/vitalityOrange.jpg"},"70b9":function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n("8287"),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{h(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),p=function(e){if("undefined"===typeof window||!f)return h(e);try{return h(e)}catch(t){return!1}};r=function(e){var t=null!==e&&"object"===typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=c&&n;if(s&&e.length>0&&!i.call(e,0))for(var f=0;f0)for(var m=0;m0&&(o=n[0].slice(e-t,e)+o,r=i)}return t.tr.insertText(o,r,i)}}const s=500;function l({rules:e}){let t=new r["Plugin"]({state:{init(){return null},apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,o){return c(n,r,i,o,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&c(n,r.pos,r.pos,"",e,t)})}}},isInputRules:!0});return t}function c(e,t,n,r,i,o){if(e.composing)return!1;let a=e.state,l=a.doc.resolve(t);if(l.parent.type.spec.code)return!1;let c=l.parent.textBetween(Math.max(0,l.parentOffset-s),l.parentOffset,null,"")+r;for(let s=0;s{let n=e.plugins;for(let r=0;r=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(i.text){let t=n.doc.resolve(i.from).marks();n.replaceWith(i.from,i.to,e.schema.text(i.text,t))}else n.delete(i.from,i.to);t(n)}return!0}}return!1},h=new o(/--$/,"—"),d=new o(/\.\.\.$/,"…"),f=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),p=new o(/"$/,"”"),m=new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),g=new o(/'$/,"’"),v=[f,p,m,g];function b(e,t,n=null,r){return new o(e,(e,o,a,s)=>{let l=n instanceof Function?n(o):n,c=e.tr.delete(a,s),u=c.doc.resolve(a),h=u.blockRange(),d=h&&Object(i["i"])(h,t,l);if(!d)return null;c.wrap(h,d);let f=c.doc.resolve(a-1).nodeBefore;return f&&f.type==t&&Object(i["f"])(c.doc,a-1)&&(!r||r(o,f))&&c.join(a-1),c})}function y(e,t,n=null){return new o(e,(e,r,i,o)=>{let a=e.doc.resolve(i),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(i,o).setBlockType(i,i,t,s):null})}},7694:function(e,t,n){},7718:function(e,t,n){e.exports=n.p+"img/huafei.svg"},"77be":function(e,t,n){"use strict";var r=n("5e8c"),i=String,o=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},"77f4":function(e,t,n){e.exports=n.p+"img/niunai.svg"},"780f":function(e,t,n){"use strict";e.exports=o;var r=n("27bf"),i=Object.create(n("3a7c"));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n("3fb5"),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},7812:function(e,t,n){"use strict";n("eb20")},7992:function(e,t,n){e.exports=n.p+"img/mindMap.png"},"7a10":function(e,t,n){e.exports=n.p+"img/laodongjie.svg"},"7a46":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const r=e=>({[Symbol.iterator](){return this},next:e}),i=(e,t)=>r(()=>{let n;do{n=e.next()}while(!n.done&&!t(n.value));return n}),o=(e,t)=>r(()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}})},"7b13":function(e,t,n){"use strict";n("41ab")},"7b4d":function(e,t,n){},"7bbc":function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return v}));var r=n("1651"),i=n("ca2d"),o=n("0e4d"),a=n("5e9b"),s=n("01fd");const l="undefined"!==typeof e&&e.release&&/node|io\.js/.test(e.release.name),c="undefined"!==typeof window&&"undefined"!==typeof document&&!l;"undefined"!==typeof navigator&&/Mac/.test(navigator.platform);let u;const h=[],d=()=>{if(void 0===u)if(l){u=r["c"]();const t=e.argv;let n=null;for(let e=0;e{if(0!==e.length){const[t,n]=e.split("=");u.set("--"+i["c"](t,"-"),n),u.set("-"+i["c"](t,"-"),n)}})):u=r["c"]();return u},f=e=>d().has(e),p=e=>l?o["a"](Object({NODE_ENV:"production",BASE_URL:window.externalPublicPath})[e.toUpperCase()]):o["a"](a["c"].getItem(e)),m=e=>f("--"+e)||null!==p(e),g=(m("production"),l&&s["d"](Object({NODE_ENV:"production",BASE_URL:"dist/"}).FORCE_COLOR,["true","1","2"])),v=!f("no-colors")&&(!l||e.stdout.isTTY||g)&&(!l||f("color")||g||null!==p("COLORTERM")||(p("TERM")||"").includes("color"))}).call(this,n("4362"))},"7be0":function(e,t,n){e.exports=n.p+"img/a-14-zhutingqi.svg"},"7c97":function(e,t,n){e.exports=n.p+"img/binggun.svg"},"7cb3":function(e,t,n){"use strict";n("dfe7")},"7cc6":function(e,t,n){e.exports=n.p+"img/-.svg"},"7d59":function(e,t,n){e.exports=n.p+"img/baichui.svg"},"7d72":function(e,t,n){"use strict";var r=n("8707").Buffer,i=r.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){if(!e)return"utf8";var t;while(1)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function a(e){var t=o(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=a(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=h,t=4;break;case"base64":this.text=g,this.end=v,t=3;break;default:return this.write=b,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function c(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�"}}function h(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function g(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function b(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return o["c"]((this._observers.get(e)||r["c"]()).values()).forEach(e=>e(...t))}destroy(){this._observers=r["c"]()}}},8287:function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},"82b0":function(e,t,n){e.exports=n.p+"img/a-16-yiyuan.svg"},8484:function(e,t,n){e.exports=n.p+"img/a-shuben2.svg"},"860a":function(e,t,n){"use strict";var r=n("f770"),i=n("6c12"),o=n("7e07"),a=Error.captureStackTrace;e.exports=function(e,t,n,s){o&&(a?a(e,t):r(e,"stack",i(n,s)))}},"86d9":function(e,t,n){e.exports=n.p+"img/classic3.jpg"},8707:function(e,t,n){var r=n("b639"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},8722:function(e,t,n){e.exports=n.p+"img/hanbao.svg"},8763:function(e,t,n){e.exports=n.p+"img/zongheshenpi.svg"},8952:function(e,t,n){"use strict";n("0e5f")},8953:function(e,t,n){"use strict";var r=n("cda9"),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},"899a":function(e,t,n){"use strict";var r=n("b2d1");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},"89c8":function(e,t,n){e.exports=n.p+"img/ziyuan_8.svg"},"8b39":function(e,t,n){e.exports=n.p+"img/a-5-mianqian.svg"},"8b92":function(e,t,n){e.exports=n.p+"img/classicBlue.jpg"},"8cd8":function(e,t,n){e.exports=n.p+"img/a-bitong1.svg"},"8ce6":function(e,t,n){e.exports=n.p+"img/a-xueshimao1.svg"},"8d05":function(e,t,n){},"8f14":function(e,t,n){e.exports=n.p+"img/earthYellow.jpg"},"8f8b":function(e,t,n){e.exports=n.p+"img/citie.svg"},"90d8":function(e,t,n){var r=n("c65b"),i=n("1a2d"),o=n("3a9b"),a=n("ad6d"),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||i(e,"flags")||!o(s,e)?t:r(a,e)}},9152:function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},9192:function(e,t,n){e.exports=n.p+"img/morandi.jpg"},"91d2":function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0===--e._eventsCount?e._events=new o:delete e._events[t]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r"}function h(e,t,n){if(t.ignoreInstruction)return"";var o;for(o in e)if(e.hasOwnProperty(o))break;var a="instructionNameFn"in t?t.instructionNameFn(o,e[o],i,r):o;if("object"===typeof e[o])return r=e,i=a,"";var s=e[o]?e[o]:"";return"instructionFn"in t&&(s=t.instructionFn(s,o,i,r)),""}function d(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,i,r):e)+"--\x3e"}function f(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function p(e,t){return t.ignoreDoctype?"":""}function m(e,t){return t.ignoreText?"":(e=""+e,e=e.replace(/&/g,"&"),e=e.replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,i,r):e)}function g(e,t){var n;if(e.elements&&e.elements.length)for(n=0;n"),e[t.elementsKey]&&e[t.elementsKey].length&&(o.push(b(e[t.elementsKey],t,n+1)),r=e,i=e.name),o.push(t.spaces&&g(e,t)?"\n"+Array(n+1).join(t.spaces):""),o.push("")):o.push("/>"),o.join("")}function b(e,t,n,r){return e.reduce((function(e,i){var o=l(t,n,r&&!e);switch(i.type){case"element":return e+o+v(i,t,n);case"comment":return e+o+d(i[t.commentKey],t);case"doctype":return e+o+p(i[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?o:"")+f(i[t.cdataKey],t);case"text":return e+(t.indentText?o:"")+m(i[t.textKey],t);case"instruction":var a={};return a[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],e+(t.indentInstruction?o:"")+h(a,t,n)}}),"")}function y(e,t,n){var r;for(r in e)if(e.hasOwnProperty(r))switch(r){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||n)return!0;break;case t.cdataKey:if(t.indentCdata||n)return!0;break;case t.instructionKey:if(t.indentInstruction||n)return!0;break;case t.doctypeKey:case t.commentKey:return!0;default:return!0}return!1}function w(e,t,n,o,a){r=e,i=t;var s="elementNameFn"in n?n.elementNameFn(t,e):t;if("undefined"===typeof e||null===e||""===e)return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(t,e)||n.fullTagEmptyElement?"<"+s+">":"<"+s+"/>";var u=[];if(t){if(u.push("<"+s),"object"!==typeof e)return u.push(">"+m(e,n)+""),u.join("");e[n.attributesKey]&&u.push(c(e[n.attributesKey],n,o));var h=y(e,n,!0)||e[n.attributesKey]&&"preserve"===e[n.attributesKey]["xml:space"];if(h||(h="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(t,e):n.fullTagEmptyElement),!h)return u.push("/>"),u.join("");u.push(">")}return u.push(x(e,n,o+1,!1)),r=e,i=t,t&&u.push((a?l(n,o,!1):"")+""),u.join("")}function x(e,t,n,r){var i,o,s,c=[];for(o in e)if(e.hasOwnProperty(o))for(s=a(e[o])?e[o]:[e[o]],i=0;inew Promise(e),i=(Promise.all.bind(Promise),e=>Promise.reject(e)),o=e=>Promise.resolve(e)},"9aca":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));const r=e=>new Error(e),i=()=>{throw r("Method unimplemented")},o=()=>{throw r("Unexpected case")}},"9b17":function(e,t,n){e.exports=n.p+"img/a-11-yiyongweishengzhi.svg"},"9bc2":function(e,t,n){"use strict";n("b866")},"9c58":function(e,t,n){e.exports=n.p+"img/xiangjiao.svg"},"9c85":function(e,t,n){e.exports=n.p+"img/-_15.svg"},"9cf4":function(e,t,n){e.exports=n.p+"img/a-10-yiliaoxiang.svg"},"9ddb":function(e,t,n){},"9ed8":function(e,t,n){e.exports=n.p+"img/greenLeaf.jpg"},"9f18":function(e,t,n){e.exports=n.p+"img/-_18.svg"},"9f38":function(e,t,n){e.exports=n.p+"img/ziyuan_17.svg"},"9fd6":function(e,t,n){"use strict";n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"j",(function(){return m})),n.d(t,"n",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"m",(function(){return k})),n.d(t,"i",(function(){return A})),n.d(t,"k",(function(){return C})),n.d(t,"o",(function(){return E})),n.d(t,"h",(function(){return D})),n.d(t,"b",(function(){return P})),n.d(t,"d",(function(){return R})),n.d(t,"a",(function(){return z})),n.d(t,"c",(function(){return B}));var r=n("efdf"),i=n("fa98"),o=n("cbe8"),a=n("23dd"),s=n("ca2d"),l=n("c4f9");class c{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const u=()=>new c,h=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(h(e));let n=0;for(let r=0;r{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},m=p,g=(e,t)=>{while(t>a["m"])p(e,a["g"]|a["m"]&t),t=i["d"](t/128);p(e,a["m"]&t)},v=(e,t)=>{const n=i["e"](t);n&&(t=-t),p(e,(t>a["l"]?a["g"]:0)|(n?a["f"]:0)|a["l"]&t),t=i["d"](t/64);while(t>0)p(e,(t>a["m"]?a["g"]:0)|a["m"]&t),t=i["d"](t/128)},b=new Uint8Array(3e4),y=b.length/3,w=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),r=n.length;g(e,r);for(let i=0;iC(e,d(t)),C=(e,t)=>{const n=e.cbuf.length,r=e.cpos,o=i["h"](n-r,t.length),a=t.length-o;e.cbuf.set(t.subarray(0,o),r),e.cpos+=o,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(i["g"](2*n,a)),e.cbuf.set(t.subarray(o)),e.cpos=a)},E=(e,t)=>{g(e,t.byteLength),C(e,t)},S=(e,t)=>{f(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},T=(e,t)=>S(e,4).setFloat32(0,t,!1),N=(e,t)=>S(e,8).setFloat64(0,t,!1),M=(e,t)=>S(e,8).setBigInt64(0,t,!1),L=new DataView(new ArrayBuffer(4)),O=e=>(L.setFloat32(0,e),L.getFloat32(0)===e),D=(e,t)=>{switch(typeof t){case"string":p(e,119),k(e,t);break;case"number":o["b"](t)&&i["a"](t)<=a["i"]?(p(e,125),v(e,t)):O(t)?(p(e,124),T(e,t)):(p(e,123),N(e,t));break;case"bigint":p(e,122),M(e,t);break;case"object":if(null===t)p(e,126);else if(l["d"](t)){p(e,117),g(e,t.length);for(let n=0;n0&&g(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const I=e=>{e.count>0&&(v(e.encoder,1===e.count?e.s:-e.s),e.count>1&&g(e.encoder,e.count-2))};class R{constructor(){this.encoder=new c,this.s=0,this.count=0}write(e){this.s===e?this.count++:(I(this),this.count=1,this.s=e)}toUint8Array(){return I(this),d(this.encoder)}}const F=e=>{if(e.count>0){const t=2*e.diff+(1===e.count?0:1);v(e.encoder,t),e.count>1&&g(e.encoder,e.count-2)}};class z{constructor(){this.encoder=new c,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(F(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return F(this),d(this.encoder)}}class B{constructor(){this.sarr=[],this.s="",this.lensE=new R}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new c;return this.sarr.push(this.s),this.s="",k(e,this.sarr.join("")),C(e,this.lensE.toUint8Array()),d(e)}}},a028:function(e,t,n){e.exports=n.p+"img/caomei.svg"},a057:function(e,t,n){e.exports=n.p+"img/yingtao.svg"},a06c:function(e){e.exports=JSON.parse('{"name":"simple-mind-map","version":"0.9.0","description":"一个简单的web在线思维导图","authors":[{"name":"街角小林","email":"1013335014@qq.com"},{"name":"理想青年实验室","url":"http://lxqnsys.com/"}],"types":"./types/index.d.ts","typings":"./types/index.d.ts","license":"MIT","repository":{"type":"git","url":"https://github.com/wanglin2/mind-map"},"scripts":{"lint":"eslint src/","format":"prettier --write .","types":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types --target es2017 --skipLibCheck","wsServe":"node ./bin/wsServer.mjs"},"module":"index.js","main":"./dist/simpleMindMap.umd.min.js","dependencies":{"@svgdotjs/svg.js":"^3.0.16","deepmerge":"^1.5.2","eventemitter3":"^4.0.7","jspdf":"^2.5.1","jszip":"^3.10.1","katex":"^0.16.8","mdast-util-from-markdown":"^1.3.0","quill":"^1.3.6","tern":"^0.24.3","uuid":"^9.0.0","xml-js":"^1.6.11","y-webrtc":"^10.2.5","yjs":"^13.6.8"},"keywords":["javascript","svg","mind-map","mindMap","MindMap"],"devDependencies":{"eslint":"^8.25.0","prettier":"^2.7.1"}}')},a121:function(e,t,n){"use strict";n("8d05")},a2b5:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u}));const r=Object.assign,i=Object.keys,o=(e,t)=>{for(const n in e)t(e[n],n)},a=e=>i(e).length,s=e=>{for(const t in e)return!1;return!0},l=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},c=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u=(e,t)=>e===t||a(e)===a(t)&&l(e,(e,n)=>(void 0!==e||c(t,n))&&t[n]===e)},a3cc:function(e,t,n){e.exports=n.p+"img/gonglve.svg"},a3df:function(e,t,n){"use strict";var r=n("3475"),i=n("ac5f").right,o=n("5afb"),a=n("23a2"),s=n("364c"),l=!s&&a>79&&a<83,c=l||!o("reduceRight");r({target:"Array",proto:!0,forced:c},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},a3e0:function(e,t,n){e.exports=n.p+"img/taozi.svg"},a493:function(e,t,n){e.exports=n.p+"img/-_1.svg"},a578:function(e,t,n){"use strict";var r=n("424c"),i=n("46ab");e.exports=function(e){if("Function"===r(e))return i(e)}},a57a:function(e,t,n){e.exports=n.p+"img/minions.jpg"},a641:function(e,t,n){e.exports=n.p+"img/-_7.svg"},a747:function(e,t,n){e.exports=n.p+"img/gongju.svg"},a76c:function(e,t,n){e.exports=n.p+"img/ziyuan_11.svg"},a7a61:function(e,t,n){e.exports=n.p+"img/dark3.jpg"},a7fd:function(e,t,n){e.exports=n.p+"img/chuhangshijian.svg"},a83d:function(e,t,n){(function(e){(function(t){t.parser=function(e,t){return new o(e,t)},t.SAXParser=o,t.SAXStream=h,t.createStream=u,t.MAX_BUFFER_LENGTH=65536;var r,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function o(e,n){if(!(this instanceof o))return new o(e,n);var r=this;s(r),r.q=r.c="",r.bufferCheckPosition=t.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=S.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(g)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),N(r,"onready")}function a(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,o=0,a=i.length;on)switch(i[o]){case"textNode":L(e);break;case"cdata":M(e,"oncdata",e.cdata),e.cdata="";break;case"script":M(e,"onscript",e.script),e.script="";break;default:D(e,"Max buffer length exceeded: "+i[o])}r=Math.max(r,s)}var l=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=l+e.position}function s(e){for(var t=0,n=i.length;t"===e||x(e)}function C(e,t){return e.test(t)}function E(e,t){return!C(e,t)}var S=0;for(var T in t.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"===typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[T]]=T;function N(e,t,n){e[t]&&e[t](n)}function M(e,t,n){e.textNode&&L(e),N(e,t,n)}function L(e){e.textNode=O(e.opt,e.textNode),e.textNode&&N(e,"ontext",e.textNode),e.textNode=""}function O(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function D(e,t){return L(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,N(e,"onerror",t),e}function P(e){return e.sawRoot&&!e.closedRoot&&I(e,"Unclosed root tag"),e.state!==S.BEGIN&&e.state!==S.BEGIN_WHITESPACE&&e.state!==S.TEXT&&D(e,"Unexpected end"),L(e),e.c="",e.closed=!0,N(e,"onend"),o.call(e,e.strict,e.opt),e}function I(e,t){if("object"!==typeof e||!(e instanceof o))throw new Error("bad call to strictFail");e.strict&&D(e,t)}function R(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,M(e,"onopentagstart",n)}function F(e,t){var n=e.indexOf(":"),r=n<0?["",e]:e.split(":"),i=r[0],o=r[1];return t&&"xmlns"===e&&(i="xmlns",o=""),{prefix:i,local:o}}function z(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=F(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==p)I(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==m)I(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,M(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function B(e,t){if(e.opt.xmlns){var n=e.tag,r=F(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(I(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){M(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var o=0,a=e.attribList.length;o",e.tagName="",void(e.state=S.SCRIPT);M(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());var r=n;while(t--){var i=e.tags[t];if(i.name===r)break;I(e,"Unexpected close tag")}if(t<0)return I(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=S.TEXT);e.tagName=n;var o=e.tags.length;while(o-- >t){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,M(e,"onclosetag",e.tagName);var s={};for(var l in a.ns)s[l]=a.ns[l];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach((function(t){var n=a.ns[t];M(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=S.TEXT}function j(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==n?(I(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function H(e,t){"<"===t?(e.state=S.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(I(e,"Non-whitespace before first tag."),e.textNode=t,e.state=S.TEXT)}function U(e,t){var n="";return t"===r?(M(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=S.TEXT):k(r)?(t.state=S.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case S.SGML_DECL_QUOTED:r===t.q&&(t.state=S.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case S.DOCTYPE:">"===r?(t.state=S.TEXT,M(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=S.DOCTYPE_DTD:k(r)&&(t.state=S.DOCTYPE_QUOTED,t.q=r));continue;case S.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=S.DOCTYPE:k(r)&&(t.state=S.DOCTYPE_DTD_QUOTED,t.q=r);continue;case S.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=S.DOCTYPE_DTD,t.q="");continue;case S.COMMENT:"-"===r?t.state=S.COMMENT_ENDING:t.comment+=r;continue;case S.COMMENT_ENDING:"-"===r?(t.state=S.COMMENT_ENDED,t.comment=O(t.opt,t.comment),t.comment&&M(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==r?(I(t,"Malformed comment"),t.comment+="--"+r,t.state=S.COMMENT):t.state=S.TEXT;continue;case S.CDATA:"]"===r?t.state=S.CDATA_ENDING:t.cdata+=r;continue;case S.CDATA_ENDING:"]"===r?t.state=S.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===r?(t.cdata&&M(t,"oncdata",t.cdata),M(t,"onclosecdata"),t.cdata="",t.state=S.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=S.CDATA);continue;case S.PROC_INST:"?"===r?t.state=S.PROC_INST_ENDING:x(r)?t.state=S.PROC_INST_BODY:t.procInstName+=r;continue;case S.PROC_INST_BODY:if(!t.procInstBody&&x(r))continue;"?"===r?t.state=S.PROC_INST_ENDING:t.procInstBody+=r;continue;case S.PROC_INST_ENDING:">"===r?(M(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=S.TEXT):(t.procInstBody+="?"+r,t.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:C(b,r)?t.tagName+=r:(R(t),">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:(x(r)||I(t,"Invalid character in tag name"),t.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===r?(B(t,!0),_(t)):(I(t,"Forward-slash in opening tag not followed by >"),t.state=S.ATTRIB);continue;case S.ATTRIB:if(x(r))continue;">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:C(v,r)?(t.attribName=r,t.attribValue="",t.state=S.ATTRIB_NAME):I(t,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===r?t.state=S.ATTRIB_VALUE:">"===r?(I(t,"Attribute without value"),t.attribValue=t.attribName,z(t),B(t)):x(r)?t.state=S.ATTRIB_NAME_SAW_WHITE:C(b,r)?t.attribName+=r:I(t,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=S.ATTRIB_VALUE;else{if(x(r))continue;I(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",M(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?B(t):C(v,r)?(t.attribName=r,t.state=S.ATTRIB_NAME):(I(t,"Invalid attribute name"),t.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(x(r))continue;k(r)?(t.q=r,t.state=S.ATTRIB_VALUE_QUOTED):(I(t,"Unquoted attribute value"),t.state=S.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case S.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=S.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}z(t),t.q="",t.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:x(r)?t.state=S.ATTRIB:">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:C(v,r)?(I(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=S.ATTRIB_NAME):I(t,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(!A(r)){"&"===r?t.state=S.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}z(t),">"===r?B(t):t.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(t.tagName)">"===r?_(t):C(b,r)?t.tagName+=r:t.script?(t.script+=""===r?_(t):I(t,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var s,l;switch(t.state){case S.TEXT_ENTITY:s=S.TEXT,l="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:s=S.ATTRIB_VALUE_QUOTED,l="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:s=S.ATTRIB_VALUE_UNQUOTED,l="attribValue";break}";"===r?(t[l]+=j(t),t.entity="",t.state=s):C(t.entity.length?w:y,r)?t.entity+=r:(I(t,"Invalid character in entity name"),t[l]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&a(t),t} +t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+h>=1?d/l:d*Math.pow(2,1-h),t*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},9192:function(e,t,n){e.exports=n.p+"img/morandi.jpg"},"91d2":function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0===--e._eventsCount?e._events=new o:delete e._events[t]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r"}function h(e,t,n){if(t.ignoreInstruction)return"";var o;for(o in e)if(e.hasOwnProperty(o))break;var a="instructionNameFn"in t?t.instructionNameFn(o,e[o],i,r):o;if("object"===typeof e[o])return r=e,i=a,"";var s=e[o]?e[o]:"";return"instructionFn"in t&&(s=t.instructionFn(s,o,i,r)),""}function d(e,t){return t.ignoreComment?"":"\x3c!--"+("commentFn"in t?t.commentFn(e,i,r):e)+"--\x3e"}function f(e,t){return t.ignoreCdata?"":"","]]]]>"))+"]]>"}function p(e,t){return t.ignoreDoctype?"":""}function m(e,t){return t.ignoreText?"":(e=""+e,e=e.replace(/&/g,"&"),e=e.replace(/&/g,"&").replace(//g,">"),"textFn"in t?t.textFn(e,i,r):e)}function g(e,t){var n;if(e.elements&&e.elements.length)for(n=0;n"),e[t.elementsKey]&&e[t.elementsKey].length&&(o.push(b(e[t.elementsKey],t,n+1)),r=e,i=e.name),o.push(t.spaces&&g(e,t)?"\n"+Array(n+1).join(t.spaces):""),o.push("")):o.push("/>"),o.join("")}function b(e,t,n,r){return e.reduce((function(e,i){var o=l(t,n,r&&!e);switch(i.type){case"element":return e+o+v(i,t,n);case"comment":return e+o+d(i[t.commentKey],t);case"doctype":return e+o+p(i[t.doctypeKey],t);case"cdata":return e+(t.indentCdata?o:"")+f(i[t.cdataKey],t);case"text":return e+(t.indentText?o:"")+m(i[t.textKey],t);case"instruction":var a={};return a[i[t.nameKey]]=i[t.attributesKey]?i:i[t.instructionKey],e+(t.indentInstruction?o:"")+h(a,t,n)}}),"")}function y(e,t,n){var r;for(r in e)if(e.hasOwnProperty(r))switch(r){case t.parentKey:case t.attributesKey:break;case t.textKey:if(t.indentText||n)return!0;break;case t.cdataKey:if(t.indentCdata||n)return!0;break;case t.instructionKey:if(t.indentInstruction||n)return!0;break;case t.doctypeKey:case t.commentKey:return!0;default:return!0}return!1}function w(e,t,n,o,a){r=e,i=t;var s="elementNameFn"in n?n.elementNameFn(t,e):t;if("undefined"===typeof e||null===e||""===e)return"fullTagEmptyElementFn"in n&&n.fullTagEmptyElementFn(t,e)||n.fullTagEmptyElement?"<"+s+">":"<"+s+"/>";var u=[];if(t){if(u.push("<"+s),"object"!==typeof e)return u.push(">"+m(e,n)+""),u.join("");e[n.attributesKey]&&u.push(c(e[n.attributesKey],n,o));var h=y(e,n,!0)||e[n.attributesKey]&&"preserve"===e[n.attributesKey]["xml:space"];if(h||(h="fullTagEmptyElementFn"in n?n.fullTagEmptyElementFn(t,e):n.fullTagEmptyElement),!h)return u.push("/>"),u.join("");u.push(">")}return u.push(x(e,n,o+1,!1)),r=e,i=t,t&&u.push((a?l(n,o,!1):"")+""),u.join("")}function x(e,t,n,r){var i,o,s,c=[];for(o in e)if(e.hasOwnProperty(o))for(s=a(e[o])?e[o]:[e[o]],i=0;inew Promise(e),i=(Promise.all.bind(Promise),e=>Promise.reject(e)),o=e=>Promise.resolve(e)},"9aca":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));const r=e=>new Error(e),i=()=>{throw r("Method unimplemented")},o=()=>{throw r("Unexpected case")}},"9b17":function(e,t,n){e.exports=n.p+"img/a-11-yiyongweishengzhi.svg"},"9bc2":function(e,t,n){"use strict";n("b866")},"9c58":function(e,t,n){e.exports=n.p+"img/xiangjiao.svg"},"9c85":function(e,t,n){e.exports=n.p+"img/-_15.svg"},"9cf4":function(e,t,n){e.exports=n.p+"img/a-10-yiliaoxiang.svg"},"9ddb":function(e,t,n){},"9ed8":function(e,t,n){e.exports=n.p+"img/greenLeaf.jpg"},"9f18":function(e,t,n){e.exports=n.p+"img/-_18.svg"},"9f38":function(e,t,n){e.exports=n.p+"img/ziyuan_17.svg"},"9fd6":function(e,t,n){"use strict";n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"j",(function(){return m})),n.d(t,"n",(function(){return g})),n.d(t,"l",(function(){return v})),n.d(t,"m",(function(){return k})),n.d(t,"i",(function(){return A})),n.d(t,"k",(function(){return C})),n.d(t,"o",(function(){return E})),n.d(t,"h",(function(){return D})),n.d(t,"b",(function(){return P})),n.d(t,"d",(function(){return R})),n.d(t,"a",(function(){return z})),n.d(t,"c",(function(){return B}));var r=n("efdf"),i=n("fa98"),o=n("cbe8"),a=n("23dd"),s=n("ca2d"),l=n("c4f9");class c{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const u=()=>new c,h=e=>{let t=e.cpos;for(let n=0;n{const t=new Uint8Array(h(e));let n=0;for(let r=0;r{const n=e.cbuf.length;n-e.cpos{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},m=p,g=(e,t)=>{while(t>a["m"])p(e,a["g"]|a["m"]&t),t=i["d"](t/128);p(e,a["m"]&t)},v=(e,t)=>{const n=i["e"](t);n&&(t=-t),p(e,(t>a["l"]?a["g"]:0)|(n?a["f"]:0)|a["l"]&t),t=i["d"](t/64);while(t>0)p(e,(t>a["m"]?a["g"]:0)|a["m"]&t),t=i["d"](t/128)},b=new Uint8Array(3e4),y=b.length/3,w=(e,t)=>{if(t.length{const n=unescape(encodeURIComponent(t)),r=n.length;g(e,r);for(let i=0;iC(e,d(t)),C=(e,t)=>{const n=e.cbuf.length,r=e.cpos,o=i["h"](n-r,t.length),a=t.length-o;e.cbuf.set(t.subarray(0,o),r),e.cpos+=o,a>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(i["g"](2*n,a)),e.cbuf.set(t.subarray(o)),e.cpos=a)},E=(e,t)=>{g(e,t.byteLength),C(e,t)},S=(e,t)=>{f(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},T=(e,t)=>S(e,4).setFloat32(0,t,!1),N=(e,t)=>S(e,8).setFloat64(0,t,!1),M=(e,t)=>S(e,8).setBigInt64(0,t,!1),L=new DataView(new ArrayBuffer(4)),O=e=>(L.setFloat32(0,e),L.getFloat32(0)===e),D=(e,t)=>{switch(typeof t){case"string":p(e,119),k(e,t);break;case"number":o["b"](t)&&i["a"](t)<=a["i"]?(p(e,125),v(e,t)):O(t)?(p(e,124),T(e,t)):(p(e,123),N(e,t));break;case"bigint":p(e,122),M(e,t);break;case"object":if(null===t)p(e,126);else if(l["d"](t)){p(e,117),g(e,t.length);for(let n=0;n0&&g(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const I=e=>{e.count>0&&(v(e.encoder,1===e.count?e.s:-e.s),e.count>1&&g(e.encoder,e.count-2))};class R{constructor(){this.encoder=new c,this.s=0,this.count=0}write(e){this.s===e?this.count++:(I(this),this.count=1,this.s=e)}toUint8Array(){return I(this),d(this.encoder)}}const F=e=>{if(e.count>0){const t=2*e.diff+(1===e.count?0:1);v(e.encoder,t),e.count>1&&g(e.encoder,e.count-2)}};class z{constructor(){this.encoder=new c,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(F(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return F(this),d(this.encoder)}}class B{constructor(){this.sarr=[],this.s="",this.lensE=new R}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new c;return this.sarr.push(this.s),this.s="",k(e,this.sarr.join("")),C(e,this.lensE.toUint8Array()),d(e)}}},a028:function(e,t,n){e.exports=n.p+"img/caomei.svg"},a057:function(e,t,n){e.exports=n.p+"img/yingtao.svg"},a06c:function(e){e.exports=JSON.parse('{"name":"simple-mind-map","version":"0.9.1","description":"一个简单的web在线思维导图","authors":[{"name":"街角小林","email":"1013335014@qq.com"},{"name":"理想青年实验室","url":"http://lxqnsys.com/"}],"types":"./types/index.d.ts","typings":"./types/index.d.ts","license":"MIT","repository":{"type":"git","url":"https://github.com/wanglin2/mind-map"},"scripts":{"lint":"eslint src/","format":"prettier --write .","types":"npx -p typescript tsc index.js --declaration --allowJs --emitDeclarationOnly --outDir types --target es2017 --skipLibCheck","wsServe":"node ./bin/wsServer.mjs"},"module":"index.js","main":"./dist/simpleMindMap.umd.min.js","dependencies":{"@svgdotjs/svg.js":"^3.0.16","deepmerge":"^1.5.2","eventemitter3":"^4.0.7","jspdf":"^2.5.1","jszip":"^3.10.1","katex":"^0.16.8","mdast-util-from-markdown":"^1.3.0","quill":"^1.3.6","tern":"^0.24.3","uuid":"^9.0.0","xml-js":"^1.6.11","y-webrtc":"^10.2.5","yjs":"^13.6.8"},"keywords":["javascript","svg","mind-map","mindMap","MindMap"],"devDependencies":{"eslint":"^8.25.0","prettier":"^2.7.1"}}')},a121:function(e,t,n){"use strict";n("8d05")},a2b5:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u}));const r=Object.assign,i=Object.keys,o=(e,t)=>{for(const n in e)t(e[n],n)},a=e=>i(e).length,s=e=>{for(const t in e)return!1;return!0},l=(e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0},c=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u=(e,t)=>e===t||a(e)===a(t)&&l(e,(e,n)=>(void 0!==e||c(t,n))&&t[n]===e)},a3cc:function(e,t,n){e.exports=n.p+"img/gonglve.svg"},a3df:function(e,t,n){"use strict";var r=n("3475"),i=n("ac5f").right,o=n("5afb"),a=n("23a2"),s=n("364c"),l=!s&&a>79&&a<83,c=l||!o("reduceRight");r({target:"Array",proto:!0,forced:c},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},a3e0:function(e,t,n){e.exports=n.p+"img/taozi.svg"},a493:function(e,t,n){e.exports=n.p+"img/-_1.svg"},a578:function(e,t,n){"use strict";var r=n("424c"),i=n("46ab");e.exports=function(e){if("Function"===r(e))return i(e)}},a57a:function(e,t,n){e.exports=n.p+"img/minions.jpg"},a641:function(e,t,n){e.exports=n.p+"img/-_7.svg"},a747:function(e,t,n){e.exports=n.p+"img/gongju.svg"},a76c:function(e,t,n){e.exports=n.p+"img/ziyuan_11.svg"},a7a61:function(e,t,n){e.exports=n.p+"img/dark3.jpg"},a7fd:function(e,t,n){e.exports=n.p+"img/chuhangshijian.svg"},a83d:function(e,t,n){(function(e){(function(t){t.parser=function(e,t){return new o(e,t)},t.SAXParser=o,t.SAXStream=h,t.createStream=u,t.MAX_BUFFER_LENGTH=65536;var r,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function o(e,n){if(!(this instanceof o))return new o(e,n);var r=this;s(r),r.q=r.c="",r.bufferCheckPosition=t.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!e,r.noscript=!(!e&&!r.opt.noscript),r.state=S.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(g)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),N(r,"onready")}function a(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,o=0,a=i.length;on)switch(i[o]){case"textNode":L(e);break;case"cdata":M(e,"oncdata",e.cdata),e.cdata="";break;case"script":M(e,"onscript",e.script),e.script="";break;default:D(e,"Max buffer length exceeded: "+i[o])}r=Math.max(r,s)}var l=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=l+e.position}function s(e){for(var t=0,n=i.length;t"===e||x(e)}function C(e,t){return e.test(t)}function E(e,t){return!C(e,t)}var S=0;for(var T in t.STATE={BEGIN:S++,BEGIN_WHITESPACE:S++,TEXT:S++,TEXT_ENTITY:S++,OPEN_WAKA:S++,SGML_DECL:S++,SGML_DECL_QUOTED:S++,DOCTYPE:S++,DOCTYPE_QUOTED:S++,DOCTYPE_DTD:S++,DOCTYPE_DTD_QUOTED:S++,COMMENT_STARTING:S++,COMMENT:S++,COMMENT_ENDING:S++,COMMENT_ENDED:S++,CDATA:S++,CDATA_ENDING:S++,CDATA_ENDING_2:S++,PROC_INST:S++,PROC_INST_BODY:S++,PROC_INST_ENDING:S++,OPEN_TAG:S++,OPEN_TAG_SLASH:S++,ATTRIB:S++,ATTRIB_NAME:S++,ATTRIB_NAME_SAW_WHITE:S++,ATTRIB_VALUE:S++,ATTRIB_VALUE_QUOTED:S++,ATTRIB_VALUE_CLOSED:S++,ATTRIB_VALUE_UNQUOTED:S++,ATTRIB_VALUE_ENTITY_Q:S++,ATTRIB_VALUE_ENTITY_U:S++,CLOSE_TAG:S++,CLOSE_TAG_SAW_WHITE:S++,SCRIPT:S++,SCRIPT_ENDING:S++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"===typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[T]]=T;function N(e,t,n){e[t]&&e[t](n)}function M(e,t,n){e.textNode&&L(e),N(e,t,n)}function L(e){e.textNode=O(e.opt,e.textNode),e.textNode&&N(e,"ontext",e.textNode),e.textNode=""}function O(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function D(e,t){return L(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,N(e,"onerror",t),e}function P(e){return e.sawRoot&&!e.closedRoot&&I(e,"Unclosed root tag"),e.state!==S.BEGIN&&e.state!==S.BEGIN_WHITESPACE&&e.state!==S.TEXT&&D(e,"Unexpected end"),L(e),e.c="",e.closed=!0,N(e,"onend"),o.call(e,e.strict,e.opt),e}function I(e,t){if("object"!==typeof e||!(e instanceof o))throw new Error("bad call to strictFail");e.strict&&D(e,t)}function R(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,M(e,"onopentagstart",n)}function F(e,t){var n=e.indexOf(":"),r=n<0?["",e]:e.split(":"),i=r[0],o=r[1];return t&&"xmlns"===e&&(i="xmlns",o=""),{prefix:i,local:o}}function z(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=F(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==p)I(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==m)I(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,M(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function B(e,t){if(e.opt.xmlns){var n=e.tag,r=F(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(I(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(t){M(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var o=0,a=e.attribList.length;o",e.tagName="",void(e.state=S.SCRIPT);M(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());var r=n;while(t--){var i=e.tags[t];if(i.name===r)break;I(e,"Unexpected close tag")}if(t<0)return I(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=S.TEXT);e.tagName=n;var o=e.tags.length;while(o-- >t){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,M(e,"onclosetag",e.tagName);var s={};for(var l in a.ns)s[l]=a.ns[l];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&Object.keys(a.ns).forEach((function(t){var n=a.ns[t];M(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=S.TEXT}function j(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,"#"===n.charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,""),isNaN(t)||i.toLowerCase()!==n?(I(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function H(e,t){"<"===t?(e.state=S.OPEN_WAKA,e.startTagPosition=e.position):x(t)||(I(e,"Non-whitespace before first tag."),e.textNode=t,e.state=S.TEXT)}function U(e,t){var n="";return t"===r?(M(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=S.TEXT):k(r)?(t.state=S.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case S.SGML_DECL_QUOTED:r===t.q&&(t.state=S.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case S.DOCTYPE:">"===r?(t.state=S.TEXT,M(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=S.DOCTYPE_DTD:k(r)&&(t.state=S.DOCTYPE_QUOTED,t.q=r));continue;case S.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=S.DOCTYPE);continue;case S.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=S.DOCTYPE:k(r)&&(t.state=S.DOCTYPE_DTD_QUOTED,t.q=r);continue;case S.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=S.DOCTYPE_DTD,t.q="");continue;case S.COMMENT:"-"===r?t.state=S.COMMENT_ENDING:t.comment+=r;continue;case S.COMMENT_ENDING:"-"===r?(t.state=S.COMMENT_ENDED,t.comment=O(t.opt,t.comment),t.comment&&M(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=S.COMMENT);continue;case S.COMMENT_ENDED:">"!==r?(I(t,"Malformed comment"),t.comment+="--"+r,t.state=S.COMMENT):t.state=S.TEXT;continue;case S.CDATA:"]"===r?t.state=S.CDATA_ENDING:t.cdata+=r;continue;case S.CDATA_ENDING:"]"===r?t.state=S.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=S.CDATA);continue;case S.CDATA_ENDING_2:">"===r?(t.cdata&&M(t,"oncdata",t.cdata),M(t,"onclosecdata"),t.cdata="",t.state=S.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=S.CDATA);continue;case S.PROC_INST:"?"===r?t.state=S.PROC_INST_ENDING:x(r)?t.state=S.PROC_INST_BODY:t.procInstName+=r;continue;case S.PROC_INST_BODY:if(!t.procInstBody&&x(r))continue;"?"===r?t.state=S.PROC_INST_ENDING:t.procInstBody+=r;continue;case S.PROC_INST_ENDING:">"===r?(M(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=S.TEXT):(t.procInstBody+="?"+r,t.state=S.PROC_INST_BODY);continue;case S.OPEN_TAG:C(b,r)?t.tagName+=r:(R(t),">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:(x(r)||I(t,"Invalid character in tag name"),t.state=S.ATTRIB));continue;case S.OPEN_TAG_SLASH:">"===r?(B(t,!0),_(t)):(I(t,"Forward-slash in opening tag not followed by >"),t.state=S.ATTRIB);continue;case S.ATTRIB:if(x(r))continue;">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:C(v,r)?(t.attribName=r,t.attribValue="",t.state=S.ATTRIB_NAME):I(t,"Invalid attribute name");continue;case S.ATTRIB_NAME:"="===r?t.state=S.ATTRIB_VALUE:">"===r?(I(t,"Attribute without value"),t.attribValue=t.attribName,z(t),B(t)):x(r)?t.state=S.ATTRIB_NAME_SAW_WHITE:C(b,r)?t.attribName+=r:I(t,"Invalid attribute name");continue;case S.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=S.ATTRIB_VALUE;else{if(x(r))continue;I(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",M(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?B(t):C(v,r)?(t.attribName=r,t.state=S.ATTRIB_NAME):(I(t,"Invalid attribute name"),t.state=S.ATTRIB)}continue;case S.ATTRIB_VALUE:if(x(r))continue;k(r)?(t.q=r,t.state=S.ATTRIB_VALUE_QUOTED):(I(t,"Unquoted attribute value"),t.state=S.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case S.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=S.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}z(t),t.q="",t.state=S.ATTRIB_VALUE_CLOSED;continue;case S.ATTRIB_VALUE_CLOSED:x(r)?t.state=S.ATTRIB:">"===r?B(t):"/"===r?t.state=S.OPEN_TAG_SLASH:C(v,r)?(I(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=S.ATTRIB_NAME):I(t,"Invalid attribute name");continue;case S.ATTRIB_VALUE_UNQUOTED:if(!A(r)){"&"===r?t.state=S.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}z(t),">"===r?B(t):t.state=S.ATTRIB;continue;case S.CLOSE_TAG:if(t.tagName)">"===r?_(t):C(b,r)?t.tagName+=r:t.script?(t.script+=""===r?_(t):I(t,"Invalid characters in closing tag");continue;case S.TEXT_ENTITY:case S.ATTRIB_VALUE_ENTITY_Q:case S.ATTRIB_VALUE_ENTITY_U:var s,l;switch(t.state){case S.TEXT_ENTITY:s=S.TEXT,l="textNode";break;case S.ATTRIB_VALUE_ENTITY_Q:s=S.ATTRIB_VALUE_QUOTED,l="attribValue";break;case S.ATTRIB_VALUE_ENTITY_U:s=S.ATTRIB_VALUE_UNQUOTED,l="attribValue";break}";"===r?(t[l]+=j(t),t.entity="",t.state=s):C(t.entity.length?w:y,r)?t.entity+=r:(I(t,"Invalid character in entity name"),t[l]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&a(t),t} /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S=t.STATE,String.fromCodePoint||function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=16384,o=[],a=-1,s=arguments.length;if(!s)return"";var l="";while(++a1114111||t(c)!==c)throw RangeError("Invalid code point: "+c);c<=65535?o.push(c):(c-=65536,n=55296+(c>>10),r=c%1024+56320,o.push(n,r)),(a+1===s||o.length>i)&&(l+=e.apply(null,o),o.length=0)}return l};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()})(t)}).call(this,n("b639").Buffer)},a872:function(e,t,n){var r=n("e71d"),i=n("5841"),o=n("0a21"),a=n("19bf"),s=String.fromCharCode(0),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype["delete"]=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"===typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"===typeof n){if("number"===typeof e["delete"]&&"number"===typeof n["delete"])return this.ops[t-1]={delete:n["delete"]+e["delete"]},this;if("number"===typeof n["delete"]&&null!=e.insert&&(t-=1,n=this.ops[t-1],"object"!==typeof n))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"===typeof e.insert&&"string"===typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"===typeof e.retain&&"number"===typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"===typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach((function(r){var i=e(r)?t:n;i.push(r)})),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce((function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e}),0)},l.prototype.length=function(){return this.reduce((function(e,t){return e+a.length(t)}),0)},l.prototype.slice=function(e,t){e=e||0,"number"!==typeof t&&(t=1/0);var n=[],r=a.iterator(this.ops),i=0;while(i0&&n.next(o.retain-s)}var c=new l(r);while(t.hasNext()||n.hasNext())if("insert"===n.peekType())c.push(n.next());else if("delete"===t.peekType())c.push(t.next());else{var u=Math.min(t.peekLength(),n.peekLength()),h=t.next(u),d=n.next(u);if("number"===typeof d.retain){var f={};"number"===typeof h.retain?f.retain=u:f.insert=h.insert;var p=a.attributes.compose(h.attributes,d.attributes,"number"===typeof h.retain);if(p&&(f.attributes=p),c.push(f),!n.hasNext()&&i(c.ops[c.ops.length-1],f)){var m=new l(t.rest());return c.concat(m).chop()}}else"number"===typeof d["delete"]&&"number"===typeof h.retain&&c.push(d)}return c.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"===typeof n.insert?n.insert:s;var r=t===e?"on":"with";throw new Error("diff() called "+r+" non-document")})).join("")})),o=new l,c=r(n[0],n[1],t),u=a.iterator(this.ops),h=a.iterator(e.ops);return c.forEach((function(e){var t=e[1].length;while(t>0){var n=0;switch(e[0]){case r.INSERT:n=Math.min(h.peekLength(),t),o.push(h.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),o["delete"](n);break;case r.EQUAL:n=Math.min(u.peekLength(),h.peekLength(),t);var s=u.next(n),l=h.next(n);i(s.insert,l.insert)?o.retain(n,a.attributes.diff(s.attributes,l.attributes)):o.push(l)["delete"](n);break}t-=n}})),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";var n=a.iterator(this.ops),r=new l,i=0;while(n.hasNext()){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),c="string"===typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(c<0)r.push(n.next());else if(c>0)r.push(n.next(c));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"===typeof e)return this.transformPosition(e,t);var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;while(n.hasNext()||r.hasNext())if("insert"!==n.peekType()||!t&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),c=r.next(o);if(s["delete"])continue;c["delete"]?i.push(c):i.retain(o,a.attributes.transform(s.attributes,c.attributes,t))}else i.retain(a.length(n.next()));return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;var n=a.iterator(this.ops),r=0;while(n.hasNext()&&r<=e){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(rr(new Uint32Array(1))[0],a=[1e7]+-1e3+-4e3+-8e3+-1e11,s=()=>a.replace(/[018]/g,e=>(e^o()&15>>e/4).toString(16))},ac4f:function(e,t,n){e.exports=n.p+"img/xiangmuguanli.svg"},ad01:function(e,t,n){"use strict";n("63dc")},ad10:function(e,t,n){e.exports=n.p+"img/-_3.svg"},ad6d:function(e,t,n){"use strict";var r=n("825a");e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},ad71:function(e,t,n){"use strict";(function(t,r){var i=n("966d");e.exports=k;var o,a=n("e3db");k.ReadableState=x;n("faa1").EventEmitter;var s=function(e,t){return e.listeners(t).length},l=n("429b"),c=n("8707").Buffer,u=t.Uint8Array||function(){};function h(e){return c.from(e)}function d(e){return c.isBuffer(e)||e instanceof u}var f=Object.create(n("3a7c"));f.inherits=n("3fb5");var p=n(1),m=void 0;m=p&&p.debuglog?p.debuglog("stream"):function(){};var g,v=n("5e1a"),b=n("4681");f.inherits(k,l);var y=["error","close","destroy","pause","resume"];function w(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function x(e,t){o=o||n("b19a"),e=e||{};var r=t instanceof o;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(g||(g=n("7d72").StringDecoder),this.decoder=new g(e.encoding),this.encoding=e.encoding)}function k(e){if(o=o||n("b19a"),!(this instanceof k))return new k(e);this._readableState=new x(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function A(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,L(e,a)):(i||(o=E(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):C(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?C(e,a,t,!1):P(e,a)):C(e,a,t,!1))):r||(a.reading=!1));return S(a)}function C(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),P(e,t)}function E(e,t){var n;return d(t)||"string"===typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function S(e){return!e.ended&&(e.needReadable||e.length=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=N(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function L(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,O(e)}}function O(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(D,e):D(e))}function D(e){m("emit readable"),e.emit("readable"),_(e)}function P(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(I,e,t))}function I(e,t){var n=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=H(e,t.buffer,t.decoder),n);var n}function H(e,t,n){var r;return eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),e-=a,0===e){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}function q(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;while(r=r.next){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),e-=a,0===e){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function G(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function V(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return m("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?G(this):O(this),null;if(e=M(e,t),0===e&&t.ended)return 0===t.length&&G(this),null;var r,i=t.needReadable;return m("need readable",i),(0===t.length||t.length-e0?j(e,t):null,null===r?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&G(this)),null!==r&&this.emit("data",r),r},k.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},k.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e);break}o.pipesCount+=1,m("pipe count=%d opts=%j",o.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,l=a?u:x;function c(e,t){m("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,f())}function u(){m("onend"),e.end()}o.endEmitted?i.nextTick(l):n.once("end",l),e.on("unpipe",c);var h=R(n);e.on("drain",h);var d=!1;function f(){m("cleanup"),e.removeListener("close",b),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",v),e.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",x),n.removeListener("data",g),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h()}var p=!1;function g(t){m("ondata"),p=!1;var r=e.write(t);!1!==r||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==V(o.pipes,e))&&!d&&(m("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function v(t){m("onerror",t),x(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",y),x()}function y(){m("onfinish"),e.removeListener("close",b),x()}function x(){m("unpipe"),n.unpipe(e)}return n.on("data",g),w(e,"error",v),e.once("close",b),e.once("finish",y),e.emit("pipe",n),o.flowing||(m("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o{const e=o["a"]();null!==this.getLocalState()&&c/2<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&c<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&h(this,t,"timeout")},a["d"](c/10)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const t=this.clientID,n=this.meta.get(t),r=void 0===n?0:n.clock+1,i=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:o["a"]()});const a=[],s=[],c=[],u=[];null===e?u.push(t):null==i?null!=e&&a.push(t):(s.push(t),l["b"](i,e)||c.push(t)),(a.length>0||c.length>0||u.length>0)&&this.emit("change",[{added:a,updated:c,removed:u},"local"]),this.emit("update",[{added:a,updated:s,removed:u},"local"])}setLocalStateField(e,t){const n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}const h=(e,t,n)=>{const r=[];for(let i=0;i0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},d=(e,t,n=e.states)=>{const i=t.length,o=r["e"]();r["n"](o,i);for(let a=0;a{const r=i["e"](t),a=o["a"](),s=[],c=[],u=[],h=[],d=i["k"](r);for(let o=0;o0||u.length>0||h.length>0)&&e.emit("change",[{added:s,updated:u,removed:h},n]),(s.length>0||c.length>0||h.length>0)&&e.emit("update",[{added:s,updated:c,removed:h},n])}},b291:function(e,t,n){e.exports=n.p+"img/shangdian.svg"},b38c:function(e,t,n){"use strict";var r=n("3f29"),i=r("%Object.defineProperty%",!0),o=function(){if(i)try{return i({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==i([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},b466:function(e,t,n){e.exports=n.p+"img/putao.svg"},b467:function(e,t,n){e.exports=n.p+"img/regou.svg"},b46e:function(e,t,n){e.exports=n.p+"img/hushijie.svg"},b47d:function(e,t,n){e.exports=n.p+"img/verticalTimeline.png"},b51b:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n("81ad"),i=n("04a8"),o=n("fa98");const a=1200,s=2500,l=3e4,c=e=>{if(e.shouldConnect&&null===e.ws){const t=new WebSocket(e.url),n=e.binaryType;let r=null;n&&(t.binaryType=n),e.ws=t,e.connecting=!0,e.connected=!1,t.onmessage=t=>{e.lastMessageReceived=i["a"]();const n=t.data,o="string"===typeof n?JSON.parse(n):n;o&&"pong"===o.type&&(clearTimeout(r),r=setTimeout(h,l/2)),e.emit("message",[o,e])};const u=t=>{null!==e.ws&&(e.ws=null,e.connecting=!1,e.connected?(e.connected=!1,e.emit("disconnect",[{type:"disconnect",error:t},e])):e.unsuccessfulReconnects++,setTimeout(c,o["h"](o["f"](e.unsuccessfulReconnects+1)*a,s),e)),clearTimeout(r)},h=()=>{e.ws===t&&e.send({type:"ping"})};t.onclose=()=>u(null),t.onerror=e=>u(e),t.onopen=()=>{e.lastMessageReceived=i["a"](),e.connecting=!1,e.connected=!0,e.unsuccessfulReconnects=0,e.emit("connect",[{type:"connect"},e]),r=setTimeout(h,l/2)}}};class u extends r["a"]{constructor(e,{binaryType:t}={}){super(),this.url=e,this.ws=null,this.binaryType=t||null,this.connected=!1,this.connecting=!1,this.unsuccessfulReconnects=0,this.lastMessageReceived=0,this.shouldConnect=!0,this._checkInterval=setInterval(()=>{this.connected&&l{const t=[],n=[];let r=0;for(;r{const n=v[b],r=o["a"]("log"),s=null!==r&&("*"===r||"true"===r||new RegExp(r,"gi").test(t));return b=(b+1)%v.length,t+=": ",s?(...r)=>{const o=i["a"](),a=o-y;y=o,e(n,t,m,...r.map(e=>"string"===typeof e||"symbol"===typeof e?e:JSON.stringify(e)),n," +"+a+"ms")}:a["e"]}},b639:function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. diff --git a/index.html b/index.html index 3b744fa6..13fe2aaa 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ 思绪思维导图

\ No newline at end of file + } \ No newline at end of file diff --git a/simple-mind-map/package.json b/simple-mind-map/package.json index e891c782..8307280f 100644 --- a/simple-mind-map/package.json +++ b/simple-mind-map/package.json @@ -1,6 +1,6 @@ { "name": "simple-mind-map", - "version": "0.9.1", + "version": "0.9.1-fix.1", "description": "一个简单的web在线思维导图", "authors": [ {