mind-elixir 4.1.3 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +7 -7
- package/dist/MindElixir.js +482 -489
- package/dist/MindElixirLite.iife.js +5 -5
- package/dist/MindElixirLite.js +388 -395
- package/dist/types/arrow.d.ts +31 -0
- package/dist/types/const.d.ts +8 -0
- package/dist/types/dev.d.ts +1 -0
- package/dist/types/docs.d.ts +9 -0
- package/dist/types/exampleData/1.cn.d.ts +125 -0
- package/dist/types/exampleData/1.d.ts +3 -0
- package/dist/types/exampleData/2.d.ts +3 -0
- package/dist/types/exampleData/3.d.ts +3 -0
- package/dist/types/exampleData/htmlText.d.ts +3 -0
- package/dist/types/i18n.d.ts +16 -0
- package/dist/types/index.d.ts +107 -0
- package/dist/types/interact.d.ts +132 -0
- package/dist/types/linkDiv.d.ts +15 -0
- package/dist/types/methods.d.ts +86 -0
- package/dist/types/mouse.d.ts +2 -0
- package/dist/types/nodeOperation.d.ts +18 -0
- package/dist/types/plugin/contextMenu.d.ts +3 -0
- package/dist/types/plugin/exportImage.d.ts +3 -0
- package/dist/types/plugin/keypress.d.ts +2 -0
- package/dist/types/plugin/mobileMenu.d.ts +3 -0
- package/dist/types/plugin/nodeDraggable.d.ts +2 -0
- package/dist/types/plugin/operationHistory.d.ts +2 -0
- package/dist/types/plugin/selection.d.ts +2 -0
- package/dist/types/plugin/toolBar.d.ts +3 -0
- package/dist/types/summary.d.ts +18 -0
- package/dist/types/types/dom.d.ts +50 -0
- package/dist/types/types/global.d.ts +7 -0
- package/dist/types/types/index.d.ts +169 -0
- package/dist/types/utils/LinkDragMoveHelper.d.ts +28 -0
- package/dist/types/utils/dom.d.ts +18 -0
- package/dist/types/utils/domManipulation.d.ts +5 -0
- package/dist/types/utils/dragMoveHelper.d.ts +7 -0
- package/dist/types/utils/generateBranch.d.ts +27 -0
- package/dist/types/utils/index.d.ts +30 -0
- package/dist/types/utils/layout.d.ts +4 -0
- package/dist/types/utils/objectManipulation.d.ts +7 -0
- package/dist/types/utils/pubsub.d.ts +80 -0
- package/dist/types/utils/svg.d.ts +7 -0
- package/dist/types/utils/theme.d.ts +4 -0
- package/package.json +2 -2
package/dist/MindElixir.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
(function(e) {
|
|
3
3
|
var t, n, o, s, i, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (l && !e.__iconfont__svg__cssinject__) {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
i || (i = !0, o());
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
|
-
var a,
|
|
18
|
-
(
|
|
17
|
+
var a, d, u, g;
|
|
18
|
+
(g = document.createElement("div")).innerHTML = c, c = null, (u = g.getElementsByTagName("svg")[0]) && (u.setAttribute("aria-hidden", "true"), u.style.position = "absolute", u.style.width = 0, u.style.height = 0, u.style.overflow = "hidden", a = u, (d = document.body).firstChild ? (g = a, (u = d.firstChild).parentNode.insertBefore(g, u)) : d.appendChild(a));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
21
|
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
s.readyState == "complete" && (s.onreadystatechange = null, h());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
|
-
const L = 0,
|
|
32
|
+
const L = 0, R = 1, ce = 2, D = 30, $e = {
|
|
33
33
|
name: "Latte",
|
|
34
34
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
35
35
|
cssVar: {
|
|
@@ -41,7 +41,7 @@ const L = 0, z = 1, ce = 2, D = 30, $e = {
|
|
|
41
41
|
"--panel-bgcolor": "#ffffff",
|
|
42
42
|
"--panel-border-color": "#eaeaea"
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, Pe = {
|
|
45
45
|
name: "Dark",
|
|
46
46
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
47
47
|
cssVar: {
|
|
@@ -57,7 +57,7 @@ const L = 0, z = 1, ce = 2, D = 30, $e = {
|
|
|
57
57
|
function oe(e) {
|
|
58
58
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const nt = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), se = function(e, t) {
|
|
61
61
|
if (t.id === e)
|
|
62
62
|
return t;
|
|
63
63
|
if (t.children && t.children.length) {
|
|
@@ -69,23 +69,23 @@ const tt = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/
|
|
|
69
69
|
return null;
|
|
70
70
|
} else
|
|
71
71
|
return null;
|
|
72
|
-
},
|
|
72
|
+
}, O = (e, t) => {
|
|
73
73
|
if (e.parent = t, e.children)
|
|
74
74
|
for (let n = 0; n < e.children.length; n++)
|
|
75
|
-
|
|
75
|
+
O(e.children[n], e);
|
|
76
76
|
};
|
|
77
77
|
function ue(e) {
|
|
78
78
|
if (e.id = G(), e.children)
|
|
79
79
|
for (let t = 0; t < e.children.length; t++)
|
|
80
80
|
ue(e.children[t]);
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const ot = (e, t) => {
|
|
83
83
|
let n = Date.now();
|
|
84
84
|
return function(...o) {
|
|
85
85
|
Date.now() - n < t || (e(...o), n = Date.now());
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function He(e, t, n, o) {
|
|
89
89
|
const s = o - t, i = e - n;
|
|
90
90
|
let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
|
|
91
91
|
i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
|
|
@@ -100,7 +100,7 @@ function Pe(e, t, n, o) {
|
|
|
100
100
|
function G() {
|
|
101
101
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const st = function() {
|
|
104
104
|
const e = G();
|
|
105
105
|
return {
|
|
106
106
|
topic: this.newTopicName,
|
|
@@ -115,7 +115,7 @@ function fe(e) {
|
|
|
115
115
|
})
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const $ = (e, t) => {
|
|
119
119
|
let n = 0, o = 0;
|
|
120
120
|
for (; t && t !== e; )
|
|
121
121
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
@@ -146,7 +146,7 @@ const O = (e, t) => {
|
|
|
146
146
|
this.moved = !1, this.mousedown = !1;
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
function
|
|
149
|
+
function it(e) {
|
|
150
150
|
e.map.addEventListener("click", (t) => {
|
|
151
151
|
var o, s;
|
|
152
152
|
if (t.button !== 0)
|
|
@@ -193,7 +193,7 @@ function st(e) {
|
|
|
193
193
|
t.preventDefault();
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const rt = {
|
|
197
197
|
create() {
|
|
198
198
|
return {
|
|
199
199
|
handlers: {},
|
|
@@ -221,7 +221,7 @@ const it = {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
}, ie = document,
|
|
224
|
+
}, ie = document, ct = function() {
|
|
225
225
|
this.nodes.innerHTML = "";
|
|
226
226
|
const e = this.createTopic(this.nodeData);
|
|
227
227
|
pe(e, this.nodeData), e.draggable = !1;
|
|
@@ -231,11 +231,11 @@ const it = {
|
|
|
231
231
|
if (this.direction === ce) {
|
|
232
232
|
let o = 0, s = 0;
|
|
233
233
|
n.map((i) => {
|
|
234
|
-
i.direction === L ? o += 1 : i.direction ===
|
|
234
|
+
i.direction === L ? o += 1 : i.direction === R ? s += 1 : o <= s ? (i.direction = L, o += 1) : (i.direction = R, s += 1);
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
},
|
|
237
|
+
lt(this, n, t);
|
|
238
|
+
}, lt = function(e, t, n) {
|
|
239
239
|
const o = ie.createElement("me-main");
|
|
240
240
|
o.className = "lhs";
|
|
241
241
|
const s = ie.createElement("me-main");
|
|
@@ -245,7 +245,7 @@ const it = {
|
|
|
245
245
|
e.direction === ce ? r.direction === L ? o.appendChild(c) : s.appendChild(c) : e.direction === L ? o.appendChild(c) : s.appendChild(c);
|
|
246
246
|
}
|
|
247
247
|
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
248
|
-
},
|
|
248
|
+
}, at = function(e, t) {
|
|
249
249
|
const n = ie.createElement("me-children");
|
|
250
250
|
for (let o = 0; o < t.length; o++) {
|
|
251
251
|
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
@@ -289,37 +289,37 @@ const it = {
|
|
|
289
289
|
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${oe(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
290
290
|
} else
|
|
291
291
|
e.tags && (e.tags = void 0);
|
|
292
|
-
},
|
|
292
|
+
}, dt = function(e, t) {
|
|
293
293
|
const n = S.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
294
294
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
295
295
|
const i = me(e.expanded);
|
|
296
296
|
if (o.appendChild(i), e.expanded !== !1) {
|
|
297
|
-
const r =
|
|
297
|
+
const r = at(this, e.children);
|
|
298
298
|
n.appendChild(r);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return { grp: n, top: o, tpc: s };
|
|
302
|
-
},
|
|
302
|
+
}, ht = function(e) {
|
|
303
303
|
const t = S.createElement("me-parent"), n = this.createTopic(e);
|
|
304
304
|
return pe(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
305
|
-
},
|
|
305
|
+
}, ut = function(e) {
|
|
306
306
|
const t = S.createElement("me-children");
|
|
307
307
|
return t.append(...e), t;
|
|
308
|
-
},
|
|
308
|
+
}, ft = function(e) {
|
|
309
309
|
const t = S.createElement("me-tpc");
|
|
310
310
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
311
311
|
};
|
|
312
|
-
function
|
|
312
|
+
function Be(e) {
|
|
313
313
|
const t = S.createRange();
|
|
314
314
|
t.selectNodeContents(e);
|
|
315
315
|
const n = window.getSelection();
|
|
316
316
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const pt = function(e) {
|
|
319
319
|
if (!e)
|
|
320
320
|
return;
|
|
321
321
|
const t = S.createElement("div"), n = e.text.textContent;
|
|
322
|
-
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === L && (t.style.right = "0"), t.focus(),
|
|
322
|
+
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === L && (t.style.right = "0"), t.focus(), Be(t), this.bus.fire("operation", {
|
|
323
323
|
name: "beginEdit",
|
|
324
324
|
obj: e.nodeObj
|
|
325
325
|
}), t.addEventListener("keydown", (o) => {
|
|
@@ -344,7 +344,7 @@ const ft = function(e) {
|
|
|
344
344
|
}, me = function(e) {
|
|
345
345
|
const t = S.createElement("me-epd");
|
|
346
346
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
347
|
-
}, K = document, V = "http://www.w3.org/2000/svg",
|
|
347
|
+
}, K = document, V = "http://www.w3.org/2000/svg", ze = function(e, t, n) {
|
|
348
348
|
const o = K.createElementNS(V, "path");
|
|
349
349
|
return N(o, {
|
|
350
350
|
d: e,
|
|
@@ -358,7 +358,7 @@ const ft = function(e) {
|
|
|
358
358
|
}, ye = function() {
|
|
359
359
|
const e = K.createElementNS(V, "line");
|
|
360
360
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
361
|
-
},
|
|
361
|
+
}, mt = function(e, t) {
|
|
362
362
|
const n = {
|
|
363
363
|
stroke: "rgb(235, 95, 82)",
|
|
364
364
|
fill: "none",
|
|
@@ -373,7 +373,7 @@ const ft = function(e) {
|
|
|
373
373
|
...n,
|
|
374
374
|
"stroke-dasharray": "8,2"
|
|
375
375
|
}), o.appendChild(s), o.appendChild(i), o;
|
|
376
|
-
},
|
|
376
|
+
}, Re = function(e, t, n) {
|
|
377
377
|
if (!t)
|
|
378
378
|
return;
|
|
379
379
|
const o = document.createElement("div");
|
|
@@ -383,7 +383,7 @@ const ft = function(e) {
|
|
|
383
383
|
const i = t.getAttribute("x"), r = t.getAttribute("y");
|
|
384
384
|
o.style.cssText = `min-width:88px;position:absolute;left:${i}px;top:${r}px;`;
|
|
385
385
|
const c = t.getAttribute("text-anchor");
|
|
386
|
-
c === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : c === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(),
|
|
386
|
+
c === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : c === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), Be(o), o.addEventListener("keydown", (l) => {
|
|
387
387
|
l.stopPropagation();
|
|
388
388
|
const h = l.key;
|
|
389
389
|
if (h === "Enter" || h === "Tab") {
|
|
@@ -394,36 +394,36 @@ const ft = function(e) {
|
|
|
394
394
|
}), o.addEventListener("blur", () => {
|
|
395
395
|
o && n(o);
|
|
396
396
|
});
|
|
397
|
-
},
|
|
397
|
+
}, gt = function(e) {
|
|
398
398
|
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight;
|
|
399
399
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - s / 2}px`;
|
|
400
400
|
const r = this.map.querySelectorAll("me-main > me-wrapper");
|
|
401
401
|
this.lines.innerHTML = "";
|
|
402
402
|
for (let c = 0; c < r.length; c++) {
|
|
403
|
-
const l = r[c], h = l.querySelector("me-tpc"), { offsetLeft: a, offsetTop:
|
|
404
|
-
h.style.borderColor = v, this.lines.appendChild(
|
|
403
|
+
const l = r[c], h = l.querySelector("me-tpc"), { offsetLeft: a, offsetTop: d } = $(this.nodes, h), u = h.offsetWidth, g = h.offsetHeight, p = l.parentNode.className, m = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: d, cL: a, cW: u, cH: g, direction: p, containerHeight: this.nodes.offsetHeight }), f = this.theme.palette, v = h.nodeObj.branchColor || f[c % f.length];
|
|
404
|
+
h.style.borderColor = v, this.lines.appendChild(ze(m, v, "3"));
|
|
405
405
|
const b = l.children[0].children[1];
|
|
406
|
-
if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px",
|
|
406
|
+
if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px", p === "lhs" ? b.style.left = "-10px" : b.style.right = "-10px"), e && e !== l)
|
|
407
407
|
continue;
|
|
408
408
|
const y = X("subLines"), x = l.lastChild;
|
|
409
|
-
x.tagName === "svg" && x.remove(), l.appendChild(y),
|
|
409
|
+
x.tagName === "svg" && x.remove(), l.appendChild(y), qe(this, y, v, l, p, !0);
|
|
410
410
|
}
|
|
411
411
|
this.renderArrow(), this.renderSummary();
|
|
412
|
-
},
|
|
412
|
+
}, qe = function(e, t, n, o, s, i) {
|
|
413
413
|
const r = o.firstChild, c = o.children[1].children;
|
|
414
414
|
if (c.length === 0)
|
|
415
415
|
return;
|
|
416
|
-
const l = r.offsetTop, h = r.offsetLeft, a = r.offsetWidth,
|
|
417
|
-
for (let
|
|
418
|
-
const
|
|
419
|
-
t.appendChild(
|
|
420
|
-
const w =
|
|
416
|
+
const l = r.offsetTop, h = r.offsetLeft, a = r.offsetWidth, d = r.offsetHeight;
|
|
417
|
+
for (let u = 0; u < c.length; u++) {
|
|
418
|
+
const g = c[u], p = g.firstChild, m = p.offsetTop, f = p.offsetLeft, v = p.offsetWidth, b = p.offsetHeight, y = p.firstChild.nodeObj.branchColor || n, x = e.generateSubBranch({ pT: l, pL: h, pW: a, pH: d, cT: m, cL: f, cW: v, cH: b, direction: s, isFirst: i });
|
|
419
|
+
t.appendChild(ze(x, y, "2"));
|
|
420
|
+
const w = p.children[1];
|
|
421
421
|
if (w) {
|
|
422
422
|
if (w.style.bottom = -(w.offsetHeight / 2) + "px", s === "lhs" ? w.style.left = "10px" : s === "rhs" && (w.style.right = "10px"), !w.expanded)
|
|
423
423
|
continue;
|
|
424
424
|
} else
|
|
425
425
|
continue;
|
|
426
|
-
|
|
426
|
+
qe(e, t, y, g, s);
|
|
427
427
|
}
|
|
428
428
|
}, xe = {
|
|
429
429
|
addChild: "插入子节点",
|
|
@@ -532,15 +532,15 @@ const ft = function(e) {
|
|
|
532
532
|
summary: "Resumen"
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
|
-
function
|
|
535
|
+
function vt(e, t) {
|
|
536
536
|
const n = (y) => {
|
|
537
537
|
const x = document.createElement("div");
|
|
538
538
|
return x.innerText = y, x.className = "tips", x;
|
|
539
539
|
}, o = (y, x, w) => {
|
|
540
540
|
const _ = document.createElement("li");
|
|
541
541
|
return _.id = y, _.innerHTML = `<span>${oe(x)}</span><span>${oe(w)}</span>`, _;
|
|
542
|
-
}, s = we[e.locale] ? e.locale : "en", i = we[s], r = o("cm-add_child", i.addChild, "tab"), c = o("cm-add_parent", i.addParent, ""), l = o("cm-add_sibling", i.addSibling, "enter"), h = o("cm-remove_child", i.removeNode, "delete"), a = o("cm-fucus", i.focus, ""),
|
|
543
|
-
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(h), (!t || t.focus) && (f.appendChild(a), f.appendChild(
|
|
542
|
+
}, s = we[e.locale] ? e.locale : "en", i = we[s], r = o("cm-add_child", i.addChild, "tab"), c = o("cm-add_parent", i.addParent, ""), l = o("cm-add_sibling", i.addSibling, "enter"), h = o("cm-remove_child", i.removeNode, "delete"), a = o("cm-fucus", i.focus, ""), d = o("cm-unfucus", i.cancelFocus, ""), u = o("cm-up", i.moveUp, "PgUp"), g = o("cm-down", i.moveDown, "Pgdn"), p = o("cm-link", i.link, ""), m = o("cm-summary", i.summary, ""), f = document.createElement("ul");
|
|
543
|
+
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(h), (!t || t.focus) && (f.appendChild(a), f.appendChild(d)), f.appendChild(u), f.appendChild(g), f.appendChild(m), (!t || t.link) && f.appendChild(p), t && t.extend)
|
|
544
544
|
for (let y = 0; y < t.extend.length; y++) {
|
|
545
545
|
const x = t.extend[y], w = o(x.name, x.name, x.key || "");
|
|
546
546
|
f.appendChild(w), w.onclick = (_) => {
|
|
@@ -555,7 +555,7 @@ function gt(e, t) {
|
|
|
555
555
|
return;
|
|
556
556
|
const x = y.target;
|
|
557
557
|
if (ae(x)) {
|
|
558
|
-
x.parentElement.tagName === "ME-ROOT" ? b = !0 : b = !1, b ? (a.className = "disabled",
|
|
558
|
+
x.parentElement.tagName === "ME-ROOT" ? b = !0 : b = !1, b ? (a.className = "disabled", u.className = "disabled", g.className = "disabled", c.className = "disabled", l.className = "disabled", h.className = "disabled") : (a.className = "", u.className = "", g.className = "", c.className = "", l.className = "", h.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, k.mousedown && (k.mousedown = !1), f.style.top = "", f.style.bottom = "", f.style.left = "", f.style.right = "";
|
|
559
559
|
const w = f.getBoundingClientRect(), _ = f.offsetHeight, P = f.offsetWidth, U = y.clientY - w.top, H = y.clientX - w.left;
|
|
560
560
|
_ + U > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = U + 15 + "px"), P + H > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = H + 10 + "px");
|
|
561
561
|
}
|
|
@@ -571,13 +571,13 @@ function gt(e, t) {
|
|
|
571
571
|
b || (e.removeNode(), v.hidden = !0);
|
|
572
572
|
}, a.onclick = () => {
|
|
573
573
|
b || (e.focusNode(e.currentNode), v.hidden = !0);
|
|
574
|
-
}, u.onclick = () => {
|
|
575
|
-
e.cancelFocus(), v.hidden = !0;
|
|
576
574
|
}, d.onclick = () => {
|
|
575
|
+
e.cancelFocus(), v.hidden = !0;
|
|
576
|
+
}, u.onclick = () => {
|
|
577
577
|
b || (e.moveUpNode(), v.hidden = !0);
|
|
578
|
-
}, m.onclick = () => {
|
|
579
|
-
b || (e.moveDownNode(), v.hidden = !0);
|
|
580
578
|
}, g.onclick = () => {
|
|
579
|
+
b || (e.moveDownNode(), v.hidden = !0);
|
|
580
|
+
}, p.onclick = () => {
|
|
581
581
|
v.hidden = !0;
|
|
582
582
|
const y = e.currentNode, x = n(i.clickTips);
|
|
583
583
|
e.container.appendChild(x), e.map.addEventListener(
|
|
@@ -591,27 +591,27 @@ function gt(e, t) {
|
|
|
591
591
|
once: !0
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
|
-
},
|
|
594
|
+
}, m.onclick = () => {
|
|
595
595
|
v.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
596
596
|
}, () => {
|
|
597
|
-
r.onclick = null, c.onclick = null, l.onclick = null, h.onclick = null, a.onclick = null,
|
|
597
|
+
r.onclick = null, c.onclick = null, l.onclick = null, h.onclick = null, a.onclick = null, d.onclick = null, u.onclick = null, g.onclick = null, p.onclick = null, m.onclick = null, v.onclick = null, e.container.oncontextmenu = null;
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
|
-
const
|
|
600
|
+
const bt = (e) => {
|
|
601
601
|
const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
|
|
602
602
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
603
|
-
},
|
|
603
|
+
}, yt = (e) => {
|
|
604
604
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
605
605
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
606
|
-
},
|
|
606
|
+
}, xt = (e) => {
|
|
607
607
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
608
|
-
},
|
|
608
|
+
}, wt = function(e, t) {
|
|
609
609
|
const n = t.parentElement.parentElement.parentElement.previousSibling;
|
|
610
610
|
if (n) {
|
|
611
611
|
const o = n.firstChild;
|
|
612
612
|
e.selectNode(o);
|
|
613
613
|
}
|
|
614
|
-
},
|
|
614
|
+
}, Et = function(e, t) {
|
|
615
615
|
const n = t.parentElement.nextSibling;
|
|
616
616
|
if (n && n.firstChild) {
|
|
617
617
|
const o = n.firstChild.firstChild.firstChild;
|
|
@@ -623,7 +623,7 @@ const vt = (e) => {
|
|
|
623
623
|
if (!n)
|
|
624
624
|
return;
|
|
625
625
|
const o = n.nodeObj, s = n.offsetParent.offsetParent.parentElement;
|
|
626
|
-
o.parent ? s.className === t ?
|
|
626
|
+
o.parent ? s.className === t ? Et(e, n) : (r = o.parent) != null && r.parent ? wt(e, n) : xt(e) : t === "lhs" ? bt(e) : yt(e);
|
|
627
627
|
}, Ne = function(e, t) {
|
|
628
628
|
var r;
|
|
629
629
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
@@ -644,7 +644,7 @@ const vt = (e) => {
|
|
|
644
644
|
e.scale(e.scaleVal -= 0.2);
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
|
-
function
|
|
647
|
+
function Nt(e) {
|
|
648
648
|
const t = () => {
|
|
649
649
|
e.currentArrow ? e.removeArrow() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
|
|
650
650
|
}, n = {
|
|
@@ -720,44 +720,44 @@ function Et(e) {
|
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
const n = (
|
|
725
|
-
const
|
|
726
|
-
return
|
|
727
|
-
<use xlink:href="#icon-${
|
|
728
|
-
</svg>`,
|
|
723
|
+
function Ct(e, t) {
|
|
724
|
+
const n = (u, g) => {
|
|
725
|
+
const p = document.createElement("div");
|
|
726
|
+
return p.id = u, p.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
727
|
+
<use xlink:href="#icon-${g}"></use>
|
|
728
|
+
</svg>`, p;
|
|
729
729
|
}, o = n("cm-add_child", "zijiedian"), s = n("cm-add_sibling", "tongjijiedian-"), i = n("cm-remove_child", "shanchu2"), r = n("cm-up", "rising"), c = n("cm-down", "falling"), l = n("cm-edit", "edit"), h = document.createElement("ul");
|
|
730
730
|
if (h.className = "menu-list", t && t.extend)
|
|
731
|
-
for (let
|
|
732
|
-
const
|
|
733
|
-
h.appendChild(
|
|
734
|
-
|
|
731
|
+
for (let u = 0; u < t.extend.length; u++) {
|
|
732
|
+
const g = t.extend[u], p = n(g.name, g.name);
|
|
733
|
+
h.appendChild(p), p.onclick = (m) => {
|
|
734
|
+
g.onclick(m);
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
const a = document.createElement("mmenu");
|
|
738
738
|
a.className = "mobile-menu", a.appendChild(o), a.appendChild(s), a.appendChild(i), a.appendChild(r), a.appendChild(c), a.appendChild(l), a.hidden = !0, e.container.append(a);
|
|
739
|
-
let
|
|
739
|
+
let d = !0;
|
|
740
740
|
e.bus.addListener("unselectNode", function() {
|
|
741
741
|
a.hidden = !0;
|
|
742
|
-
}), e.bus.addListener("selectNode", function(
|
|
743
|
-
a.hidden = !1,
|
|
744
|
-
}), a.onclick = (
|
|
745
|
-
|
|
742
|
+
}), e.bus.addListener("selectNode", function(u) {
|
|
743
|
+
a.hidden = !1, u.parent ? d = !1 : d = !0;
|
|
744
|
+
}), a.onclick = (u) => {
|
|
745
|
+
u.target === a && (a.hidden = !0);
|
|
746
746
|
}, o.onclick = () => {
|
|
747
747
|
e.addChild();
|
|
748
748
|
}, s.onclick = () => {
|
|
749
|
-
|
|
749
|
+
d || e.insertSibling("after");
|
|
750
750
|
}, i.onclick = () => {
|
|
751
|
-
|
|
752
|
-
}, r.onclick = (
|
|
753
|
-
|
|
754
|
-
}, c.onclick = (
|
|
755
|
-
|
|
756
|
-
}, l.onclick = (
|
|
751
|
+
d || e.removeNode();
|
|
752
|
+
}, r.onclick = (u) => {
|
|
753
|
+
d || e.moveUpNode();
|
|
754
|
+
}, c.onclick = (u) => {
|
|
755
|
+
d || e.moveDownNode();
|
|
756
|
+
}, l.onclick = (u) => {
|
|
757
757
|
e.beginEdit();
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
const de = document,
|
|
760
|
+
const de = document, _t = function(e, t) {
|
|
761
761
|
if (!t)
|
|
762
762
|
return he(e), e;
|
|
763
763
|
let n = e.querySelector(".insert-preview");
|
|
@@ -776,13 +776,13 @@ const de = document, Ct = function(e, t) {
|
|
|
776
776
|
return !1;
|
|
777
777
|
}
|
|
778
778
|
return !0;
|
|
779
|
-
},
|
|
779
|
+
}, St = function(e) {
|
|
780
780
|
const t = document.createElement("div");
|
|
781
781
|
return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
|
|
782
782
|
};
|
|
783
|
-
function
|
|
783
|
+
function Mt(e) {
|
|
784
784
|
let t = null, n = null, o = null;
|
|
785
|
-
const s =
|
|
785
|
+
const s = St(e), i = 12;
|
|
786
786
|
e.map.addEventListener("dragstart", (r) => {
|
|
787
787
|
var l, h;
|
|
788
788
|
const c = r.target;
|
|
@@ -803,7 +803,7 @@ function St(e) {
|
|
|
803
803
|
c.style.opacity = "", o && (he(o), n === "before" ? e.moveNodeBefore(t, o) : n === "after" ? e.moveNodeAfter(t, o) : n === "in" && e.moveNodeIn(t, o), t = null);
|
|
804
804
|
}), e.map.addEventListener(
|
|
805
805
|
"dragover",
|
|
806
|
-
|
|
806
|
+
ot(function(r) {
|
|
807
807
|
if (!t)
|
|
808
808
|
return;
|
|
809
809
|
he(o);
|
|
@@ -821,11 +821,11 @@ function St(e) {
|
|
|
821
821
|
} else
|
|
822
822
|
n = o = null;
|
|
823
823
|
}
|
|
824
|
-
o &&
|
|
824
|
+
o && _t(o, n);
|
|
825
825
|
}, 100)
|
|
826
826
|
);
|
|
827
827
|
}
|
|
828
|
-
const
|
|
828
|
+
const kt = function(e) {
|
|
829
829
|
return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
|
|
830
830
|
type: "summary",
|
|
831
831
|
value: e.obj.id
|
|
@@ -840,14 +840,14 @@ const Mt = function(e) {
|
|
|
840
840
|
value: e.obj.id
|
|
841
841
|
};
|
|
842
842
|
};
|
|
843
|
-
function
|
|
843
|
+
function Lt(e) {
|
|
844
844
|
let t = [], n = -1, o = e.getData();
|
|
845
845
|
e.bus.addListener("operation", (s) => {
|
|
846
846
|
if (s.name === "beginEdit")
|
|
847
847
|
return;
|
|
848
848
|
t = t.slice(0, n + 1);
|
|
849
849
|
const i = e.getData();
|
|
850
|
-
t.push({ prev: o, currentObject:
|
|
850
|
+
t.push({ prev: o, currentObject: kt(s), next: i }), o = i, n = t.length - 1;
|
|
851
851
|
}), e.undo = function() {
|
|
852
852
|
if (n > -1) {
|
|
853
853
|
const s = t[n];
|
|
@@ -869,14 +869,14 @@ function kt(e) {
|
|
|
869
869
|
(s.metaKey || s.ctrlKey) && s.shiftKey && s.key === "Z" ? e.redo() : (s.metaKey || s.ctrlKey) && s.key === "z" && e.undo();
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
|
-
const
|
|
872
|
+
const q = (e, t) => {
|
|
873
873
|
const n = document.createElement("span");
|
|
874
874
|
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
875
875
|
<use xlink:href="#icon-${t}"></use>
|
|
876
876
|
</svg>`, n;
|
|
877
877
|
};
|
|
878
|
-
function
|
|
879
|
-
const t = document.createElement("div"), n =
|
|
878
|
+
function Tt(e) {
|
|
879
|
+
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"), s = q("zoomout", "move"), i = q("zoomin", "add"), r = document.createElement("span");
|
|
880
880
|
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
881
881
|
e.mindElixirBox.requestFullscreen();
|
|
882
882
|
}, o.onclick = () => {
|
|
@@ -887,8 +887,8 @@ function Lt(e) {
|
|
|
887
887
|
e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
|
|
888
888
|
}, t;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
891
|
-
const t = document.createElement("div"), n =
|
|
890
|
+
function At(e) {
|
|
891
|
+
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"), s = q("tblts", "side");
|
|
892
892
|
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
893
893
|
e.initLeft();
|
|
894
894
|
}, o.onclick = () => {
|
|
@@ -897,11 +897,11 @@ function Tt(e) {
|
|
|
897
897
|
e.initSide();
|
|
898
898
|
}, t;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
e.container.append(
|
|
900
|
+
function jt(e) {
|
|
901
|
+
e.container.append(Tt(e)), e.container.append(At(e));
|
|
902
902
|
}
|
|
903
|
-
/*! @viselect/vanilla v3.
|
|
904
|
-
var
|
|
903
|
+
/*! @viselect/vanilla v3.6.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
904
|
+
var Dt = Object.defineProperty, Ot = (e, t, n) => t in e ? Dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => Ot(e, typeof t != "symbol" ? t + "" : t, n);
|
|
905
905
|
class $t {
|
|
906
906
|
constructor() {
|
|
907
907
|
E(this, "_listeners", /* @__PURE__ */ new Map()), E(this, "on", this.addEventListener), E(this, "off", this.removeEventListener), E(this, "emit", this.dispatchEvent);
|
|
@@ -925,21 +925,21 @@ class $t {
|
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
const _e = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
928
|
-
function
|
|
928
|
+
function j({ style: e }, t, n) {
|
|
929
929
|
if (typeof t == "object")
|
|
930
930
|
for (const [o, s] of Object.entries(t))
|
|
931
931
|
s !== void 0 && (e[o] = _e(s));
|
|
932
932
|
else
|
|
933
933
|
n !== void 0 && (e[t] = _e(n));
|
|
934
934
|
}
|
|
935
|
-
const
|
|
935
|
+
const Fe = (e) => (t, n, o, s = {}) => {
|
|
936
936
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
937
937
|
for (const i of t)
|
|
938
938
|
if (i)
|
|
939
939
|
for (const r of n)
|
|
940
940
|
i[e](r, o, { capture: !1, ...s });
|
|
941
941
|
return [t, n, o, s];
|
|
942
|
-
},
|
|
942
|
+
}, B = Fe("addEventListener"), T = Fe("removeEventListener"), ee = (e) => {
|
|
943
943
|
var t;
|
|
944
944
|
const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
945
945
|
return { x: n, y: o, target: s };
|
|
@@ -965,7 +965,7 @@ function F(e, t = document) {
|
|
|
965
965
|
}
|
|
966
966
|
return o;
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const Pt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ht = () => "safari" in window, Bt = (e) => {
|
|
969
969
|
let t, n = -1, o = !1;
|
|
970
970
|
return {
|
|
971
971
|
next(...s) {
|
|
@@ -978,7 +978,7 @@ const Ot = () => matchMedia("(hover: none), (pointer: coarse)").matches, Pt = ()
|
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
980
|
};
|
|
981
|
-
function
|
|
981
|
+
function zt(e, t) {
|
|
982
982
|
for (const n of t) {
|
|
983
983
|
if (typeof n == "number")
|
|
984
984
|
return e.button === n;
|
|
@@ -998,21 +998,16 @@ function Bt(e, t) {
|
|
|
998
998
|
}
|
|
999
999
|
return !1;
|
|
1000
1000
|
}
|
|
1001
|
-
const { abs:
|
|
1002
|
-
|
|
1001
|
+
const { abs: z, max: Me, min: ke, ceil: Le } = Math, Te = (e = []) => ({
|
|
1002
|
+
stored: e,
|
|
1003
|
+
selected: [],
|
|
1004
|
+
touched: [],
|
|
1005
|
+
changed: { added: [], removed: [] }
|
|
1006
|
+
});
|
|
1007
|
+
class Ie extends $t {
|
|
1003
1008
|
constructor(t) {
|
|
1004
1009
|
var n, o, s, i, r;
|
|
1005
|
-
super(), E(this, "_options"), E(this, "_selection", {
|
|
1006
|
-
stored: [],
|
|
1007
|
-
selected: [],
|
|
1008
|
-
touched: [],
|
|
1009
|
-
changed: {
|
|
1010
|
-
added: [],
|
|
1011
|
-
// Added elements since last selection
|
|
1012
|
-
removed: []
|
|
1013
|
-
// Removed elements since last selection
|
|
1014
|
-
}
|
|
1015
|
-
}), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaRect", new DOMRect()), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._bindStartEvents.bind(this, !1)), E(this, "enable", this._bindStartEvents), this._options = {
|
|
1010
|
+
super(), E(this, "_options"), E(this, "_selection", Te()), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetBoundary"), E(this, "_targetBoundaryScrolled", !0), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_areaRect", new DOMRect()), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._toggleStartEvents.bind(this, !1)), E(this, "enable", this._toggleStartEvents), this._options = {
|
|
1016
1011
|
selectionAreaClass: "selection-area",
|
|
1017
1012
|
selectionContainerClass: void 0,
|
|
1018
1013
|
selectables: [],
|
|
@@ -1041,6 +1036,7 @@ class Fe extends $t {
|
|
|
1041
1036
|
features: {
|
|
1042
1037
|
range: !0,
|
|
1043
1038
|
touch: !0,
|
|
1039
|
+
deselectOnBlur: !1,
|
|
1044
1040
|
...t.features,
|
|
1045
1041
|
singleTap: {
|
|
1046
1042
|
allow: !0,
|
|
@@ -1052,42 +1048,40 @@ class Fe extends $t {
|
|
|
1052
1048
|
for (const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1053
1049
|
typeof this[a] == "function" && (this[a] = this[a].bind(this));
|
|
1054
1050
|
const { document: c, selectionAreaClass: l, selectionContainerClass: h } = this._options;
|
|
1055
|
-
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), h && this._clippingElement.classList.add(h),
|
|
1051
|
+
this._area = c.createElement("div"), this._clippingElement = c.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(l), h && this._clippingElement.classList.add(h), j(this._area, {
|
|
1056
1052
|
willChange: "top, left, bottom, right, width, height",
|
|
1057
1053
|
top: 0,
|
|
1058
1054
|
left: 0,
|
|
1059
1055
|
position: "fixed"
|
|
1060
|
-
}),
|
|
1056
|
+
}), j(this._clippingElement, {
|
|
1061
1057
|
overflow: "hidden",
|
|
1062
1058
|
position: "fixed",
|
|
1063
1059
|
transform: "translate3d(0, 0, 0)",
|
|
1064
1060
|
// https://stackoverflow.com/a/38268846
|
|
1065
1061
|
pointerEvents: "none",
|
|
1066
1062
|
zIndex: "1"
|
|
1067
|
-
}), this._frame =
|
|
1063
|
+
}), this._frame = Bt((a) => {
|
|
1068
1064
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", a), this._redrawSelectionArea();
|
|
1069
1065
|
}), this.enable();
|
|
1070
1066
|
}
|
|
1071
|
-
|
|
1072
|
-
const { document: n, features: o } = this._options, s = t ?
|
|
1073
|
-
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, {
|
|
1074
|
-
passive: !1
|
|
1075
|
-
});
|
|
1067
|
+
_toggleStartEvents(t = !0) {
|
|
1068
|
+
const { document: n, features: o } = this._options, s = t ? B : T;
|
|
1069
|
+
s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
|
|
1076
1070
|
}
|
|
1077
1071
|
_onTapStart(t, n = !1) {
|
|
1078
|
-
const { x: o, y: s, target: i } = ee(t), {
|
|
1079
|
-
if (t instanceof MouseEvent && !
|
|
1072
|
+
const { x: o, y: s, target: i } = ee(t), { document: r, startAreas: c, boundaries: l, features: h, behaviour: a } = this._options, d = i.getBoundingClientRect();
|
|
1073
|
+
if (t instanceof MouseEvent && !zt(t, a.triggers))
|
|
1080
1074
|
return;
|
|
1081
|
-
const
|
|
1082
|
-
this._targetElement =
|
|
1083
|
-
(
|
|
1075
|
+
const u = F(c, r), g = F(l, r);
|
|
1076
|
+
this._targetElement = g.find(
|
|
1077
|
+
(v) => Se(v.getBoundingClientRect(), d)
|
|
1084
1078
|
);
|
|
1085
|
-
const
|
|
1086
|
-
if (
|
|
1079
|
+
const p = t.composedPath(), m = u.find((v) => p.includes(v));
|
|
1080
|
+
if (this._targetBoundary = g.find((v) => p.includes(v)), !this._targetElement || !m || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
|
|
1087
1081
|
return;
|
|
1088
1082
|
this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
|
|
1089
|
-
const
|
|
1090
|
-
this._scrollDelta = { x:
|
|
1083
|
+
const f = r.scrollingElement ?? r.body;
|
|
1084
|
+
this._scrollDelta = { x: f.scrollLeft, y: f.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), B(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), B(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), B(r, "scroll", this._onScroll), h.deselectOnBlur && (this._targetBoundaryScrolled = !1, B(this._targetBoundary, "scroll", this._onStartAreaScroll));
|
|
1091
1085
|
}
|
|
1092
1086
|
_onSingleTap(t) {
|
|
1093
1087
|
const { singleTap: { intersect: n }, range: o } = this._options.features, s = ee(t);
|
|
@@ -1098,21 +1092,23 @@ class Fe extends $t {
|
|
|
1098
1092
|
this.resolveSelectables();
|
|
1099
1093
|
const { x: c, y: l } = s;
|
|
1100
1094
|
i = this._selectables.find((h) => {
|
|
1101
|
-
const { right: a, left:
|
|
1102
|
-
return c < a && c >
|
|
1095
|
+
const { right: a, left: d, top: u, bottom: g } = h.getBoundingClientRect();
|
|
1096
|
+
return c < a && c > d && l < g && l > u;
|
|
1103
1097
|
});
|
|
1104
1098
|
}
|
|
1105
1099
|
if (!i)
|
|
1106
1100
|
return;
|
|
1107
|
-
for (this.resolveSelectables(); !this._selectables.includes(i); )
|
|
1108
|
-
if (
|
|
1101
|
+
for (this.resolveSelectables(); !this._selectables.includes(i); )
|
|
1102
|
+
if (i.parentElement)
|
|
1103
|
+
i = i.parentElement;
|
|
1104
|
+
else {
|
|
1105
|
+
this._targetBoundaryScrolled || this.clearSelection();
|
|
1109
1106
|
return;
|
|
1110
|
-
|
|
1111
|
-
}
|
|
1107
|
+
}
|
|
1112
1108
|
const { stored: r } = this._selection;
|
|
1113
1109
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1114
1110
|
const c = this._latestElement, [l, h] = c.compareDocumentPosition(i) & 4 ? [i, c] : [c, i], a = [...this._selectables.filter(
|
|
1115
|
-
(
|
|
1111
|
+
(d) => d.compareDocumentPosition(l) & 4 && d.compareDocumentPosition(h) & 2
|
|
1116
1112
|
), l, h];
|
|
1117
1113
|
this.select(a), this._latestElement = c;
|
|
1118
1114
|
} else
|
|
@@ -1122,73 +1118,76 @@ class Fe extends $t {
|
|
|
1122
1118
|
const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: c, y: l } = ee(t);
|
|
1123
1119
|
if (
|
|
1124
1120
|
// Single number for both coordinates
|
|
1125
|
-
typeof s == "number" &&
|
|
1126
|
-
typeof s == "object" &&
|
|
1121
|
+
typeof s == "number" && z(c + l - (i + r)) >= s || // Different x and y threshold
|
|
1122
|
+
typeof s == "object" && z(c - i) >= s.x || z(l - r) >= s.y
|
|
1127
1123
|
) {
|
|
1128
|
-
if (
|
|
1129
|
-
|
|
1124
|
+
if (T(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1125
|
+
T(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1130
1126
|
return;
|
|
1131
1127
|
}
|
|
1132
|
-
|
|
1128
|
+
B(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), F(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (B(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((h) => this._targetElement.contains(h))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1133
1129
|
}
|
|
1134
1130
|
this._handleMoveEvent(t);
|
|
1135
1131
|
}
|
|
1136
1132
|
_setupSelectionArea() {
|
|
1137
1133
|
const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
1138
|
-
this._scrollAvailable ? (
|
|
1134
|
+
this._scrollAvailable ? (j(t, {
|
|
1139
1135
|
top: s.top,
|
|
1140
1136
|
left: s.left,
|
|
1141
1137
|
width: s.width,
|
|
1142
1138
|
height: s.height
|
|
1143
|
-
}),
|
|
1139
|
+
}), j(o, {
|
|
1144
1140
|
marginTop: -s.top,
|
|
1145
1141
|
marginLeft: -s.left
|
|
1146
|
-
})) : (
|
|
1142
|
+
})) : (j(t, {
|
|
1147
1143
|
top: 0,
|
|
1148
1144
|
left: 0,
|
|
1149
1145
|
width: "100%",
|
|
1150
1146
|
height: "100%"
|
|
1151
|
-
}),
|
|
1147
|
+
}), j(o, {
|
|
1152
1148
|
marginTop: 0,
|
|
1153
1149
|
marginLeft: 0
|
|
1154
1150
|
}));
|
|
1155
1151
|
}
|
|
1156
1152
|
_onTapMove(t) {
|
|
1157
|
-
const {
|
|
1158
|
-
if (
|
|
1153
|
+
const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, c = this._targetElement, { x: l, y: h } = ee(t);
|
|
1154
|
+
if (o.x2 = l, o.y2 = h, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
|
|
1159
1155
|
this._scrollingActive = !0;
|
|
1160
1156
|
const a = () => {
|
|
1161
|
-
if (!
|
|
1157
|
+
if (!n.x && !n.y) {
|
|
1162
1158
|
this._scrollingActive = !1;
|
|
1163
1159
|
return;
|
|
1164
1160
|
}
|
|
1165
|
-
const { scrollTop:
|
|
1166
|
-
|
|
1161
|
+
const { scrollTop: d, scrollLeft: u } = c;
|
|
1162
|
+
n.y && (c.scrollTop += Le(n.y / r), o.y1 -= c.scrollTop - d), n.x && (c.scrollLeft += Le(n.x / r), o.x1 -= c.scrollLeft - u), i.next(t), requestAnimationFrame(a);
|
|
1167
1163
|
};
|
|
1168
1164
|
requestAnimationFrame(a);
|
|
1169
1165
|
} else
|
|
1170
|
-
|
|
1166
|
+
i.next(t);
|
|
1171
1167
|
this._handleMoveEvent(t);
|
|
1172
1168
|
}
|
|
1173
1169
|
_handleMoveEvent(t) {
|
|
1174
1170
|
const { features: n } = this._options;
|
|
1175
|
-
(n.touch &&
|
|
1171
|
+
(n.touch && Pt() || this._scrollAvailable && Ht()) && t.preventDefault();
|
|
1176
1172
|
}
|
|
1177
1173
|
_onScroll() {
|
|
1178
1174
|
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
1179
1175
|
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1180
1176
|
}
|
|
1177
|
+
_onStartAreaScroll() {
|
|
1178
|
+
this._targetBoundaryScrolled = !0, T(this._targetElement, "scroll", this._onStartAreaScroll);
|
|
1179
|
+
}
|
|
1181
1180
|
_manualScroll(t) {
|
|
1182
1181
|
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1183
1182
|
this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
1184
1183
|
}
|
|
1185
1184
|
_recalculateSelectionAreaRect() {
|
|
1186
|
-
const { _scrollSpeed: t, _areaLocation: n,
|
|
1187
|
-
let { x2: p, y2:
|
|
1188
|
-
const { behaviour: { scrolling: { startScrollMargins:
|
|
1189
|
-
p < d.left +
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1185
|
+
const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: c, scrollLeft: l, scrollWidth: h, clientWidth: a } = o, d = this._targetRect, { x1: u, y1: g } = n;
|
|
1186
|
+
let { x2: p, y2: m } = n;
|
|
1187
|
+
const { behaviour: { scrolling: { startScrollMargins: f } } } = s;
|
|
1188
|
+
p < d.left + f.x ? (t.x = l ? -z(d.left - p + f.x) : 0, p = p < d.left ? d.left : p) : p > d.right - f.x ? (t.x = h - l - a ? z(d.left + d.width - p - f.x) : 0, p = p > d.right ? d.right : p) : t.x = 0, m < d.top + f.y ? (t.y = i ? -z(d.top - m + f.y) : 0, m = m < d.top ? d.top : m) : m > d.bottom - f.y ? (t.y = r - i - c ? z(d.top + d.height - m - f.y) : 0, m = m > d.bottom ? d.bottom : m) : t.y = 0;
|
|
1189
|
+
const v = ke(u, p), b = ke(g, m), y = Me(u, p), x = Me(g, m);
|
|
1190
|
+
this._areaRect = new DOMRect(v, b, y - v, x - b);
|
|
1192
1191
|
}
|
|
1193
1192
|
_redrawSelectionArea() {
|
|
1194
1193
|
const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
|
|
@@ -1197,32 +1196,32 @@ class Fe extends $t {
|
|
|
1197
1196
|
_onTapStop(t, n) {
|
|
1198
1197
|
var o;
|
|
1199
1198
|
const { document: s, features: i } = this._options, { _singleClick: r } = this;
|
|
1200
|
-
|
|
1199
|
+
T(this._targetElement, "scroll", this._onStartAreaScroll), T(s, ["mousemove", "touchmove"], this._delayedTapMove), T(s, ["touchmove", "mousemove"], this._onTapMove), T(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), T(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, T(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
|
|
1201
1200
|
}
|
|
1202
1201
|
_updateElementSelection() {
|
|
1203
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: h } = n.behaviour, a = h === "invert",
|
|
1204
|
-
for (let
|
|
1205
|
-
const f = t[
|
|
1202
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: c } = o, { intersect: l, overlap: h } = n.behaviour, a = h === "invert", d = [], u = [], g = [];
|
|
1203
|
+
for (let m = 0; m < t.length; m++) {
|
|
1204
|
+
const f = t[m];
|
|
1206
1205
|
if (Se(s, f.getBoundingClientRect(), l)) {
|
|
1207
1206
|
if (r.includes(f))
|
|
1208
1207
|
i.includes(f) && !c.includes(f) && c.push(f);
|
|
1209
1208
|
else if (a && i.includes(f)) {
|
|
1210
|
-
|
|
1209
|
+
g.push(f);
|
|
1211
1210
|
continue;
|
|
1212
1211
|
} else
|
|
1213
|
-
|
|
1214
|
-
|
|
1212
|
+
u.push(f);
|
|
1213
|
+
d.push(f);
|
|
1215
1214
|
}
|
|
1216
1215
|
}
|
|
1217
|
-
a &&
|
|
1218
|
-
const
|
|
1219
|
-
for (let
|
|
1220
|
-
const f = r[
|
|
1221
|
-
!
|
|
1216
|
+
a && u.push(...i.filter((m) => !r.includes(m)));
|
|
1217
|
+
const p = h === "keep";
|
|
1218
|
+
for (let m = 0; m < r.length; m++) {
|
|
1219
|
+
const f = r[m];
|
|
1220
|
+
!d.includes(f) && !// Check if the user wants to keep previously selected elements, e.g.,
|
|
1222
1221
|
// not make them part of the current selection as soon as they're touched.
|
|
1223
|
-
(
|
|
1222
|
+
(p && i.includes(f)) && g.push(f);
|
|
1224
1223
|
}
|
|
1225
|
-
o.selected =
|
|
1224
|
+
o.selected = d, o.changed = { added: u, removed: g }, this._latestElement = void 0;
|
|
1226
1225
|
}
|
|
1227
1226
|
_emitEvent(t, n) {
|
|
1228
1227
|
return this.emit(t, {
|
|
@@ -1262,7 +1261,7 @@ class Fe extends $t {
|
|
|
1262
1261
|
}
|
|
1263
1262
|
/**
|
|
1264
1263
|
* Manually triggers the start of a selection
|
|
1265
|
-
* @param evt A MouseEvent / TouchEvent
|
|
1264
|
+
* @param evt A MouseEvent / TouchEvent-like object
|
|
1266
1265
|
* @param silent If beforestart should be fired,
|
|
1267
1266
|
*/
|
|
1268
1267
|
trigger(t, n = !0) {
|
|
@@ -1270,13 +1269,13 @@ class Fe extends $t {
|
|
|
1270
1269
|
}
|
|
1271
1270
|
/**
|
|
1272
1271
|
* Can be used if during a selection elements have been added.
|
|
1273
|
-
* Will update everything
|
|
1272
|
+
* Will update everything that can be selected.
|
|
1274
1273
|
*/
|
|
1275
1274
|
resolveSelectables() {
|
|
1276
1275
|
this._selectables = F(this._options.selectables, this._options.document);
|
|
1277
1276
|
}
|
|
1278
1277
|
/**
|
|
1279
|
-
* Same as
|
|
1278
|
+
* Same as deselecting, but for all elements currently selected.
|
|
1280
1279
|
* @param includeStored If the store should also get cleared
|
|
1281
1280
|
* @param quiet If move / stop events should be fired
|
|
1282
1281
|
*/
|
|
@@ -1285,12 +1284,7 @@ class Fe extends $t {
|
|
|
1285
1284
|
i.added = [], i.removed.push(
|
|
1286
1285
|
...o,
|
|
1287
1286
|
...t ? s : []
|
|
1288
|
-
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection =
|
|
1289
|
-
stored: t ? [] : s,
|
|
1290
|
-
selected: [],
|
|
1291
|
-
touched: [],
|
|
1292
|
-
changed: { added: [], removed: [] }
|
|
1293
|
-
};
|
|
1287
|
+
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = Te(t ? [] : s);
|
|
1294
1288
|
}
|
|
1295
1289
|
/**
|
|
1296
1290
|
* @returns {Array} Selected elements
|
|
@@ -1305,8 +1299,7 @@ class Fe extends $t {
|
|
|
1305
1299
|
return this._area;
|
|
1306
1300
|
}
|
|
1307
1301
|
/**
|
|
1308
|
-
* Cancel the current selection process.
|
|
1309
|
-
* @param keepEvent {boolean} true to fire a stop event after cancel.
|
|
1302
|
+
* Cancel the current selection process, pass true to fire a stop event after cancel.
|
|
1310
1303
|
*/
|
|
1311
1304
|
cancel(t = !1) {
|
|
1312
1305
|
this._onTapStop(null, !t);
|
|
@@ -1342,9 +1335,9 @@ class Fe extends $t {
|
|
|
1342
1335
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
1343
1336
|
}
|
|
1344
1337
|
}
|
|
1345
|
-
E(
|
|
1346
|
-
function
|
|
1347
|
-
const t = new
|
|
1338
|
+
E(Ie, "version", "3.6.0");
|
|
1339
|
+
function Rt(e) {
|
|
1340
|
+
const t = new Ie({
|
|
1348
1341
|
selectables: [".map-container me-tpc"],
|
|
1349
1342
|
boundaries: [e.container],
|
|
1350
1343
|
container: "body",
|
|
@@ -1388,7 +1381,7 @@ function zt(e) {
|
|
|
1388
1381
|
});
|
|
1389
1382
|
e.selection = t;
|
|
1390
1383
|
}
|
|
1391
|
-
const
|
|
1384
|
+
const qt = function(e, t = !0) {
|
|
1392
1385
|
this.theme = e;
|
|
1393
1386
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1394
1387
|
for (let s = 0; s < o.length; s++) {
|
|
@@ -1401,14 +1394,14 @@ const Rt = function(e, t = !0) {
|
|
|
1401
1394
|
const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
|
|
1402
1395
|
return { siblings: t, index: n };
|
|
1403
1396
|
};
|
|
1404
|
-
function
|
|
1397
|
+
function Ft(e) {
|
|
1405
1398
|
const { siblings: t, index: n } = W(e);
|
|
1406
1399
|
if (t === void 0)
|
|
1407
1400
|
return;
|
|
1408
1401
|
const o = t[n];
|
|
1409
1402
|
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1410
1403
|
}
|
|
1411
|
-
function
|
|
1404
|
+
function It(e) {
|
|
1412
1405
|
const { siblings: t, index: n } = W(e);
|
|
1413
1406
|
if (t === void 0)
|
|
1414
1407
|
return;
|
|
@@ -1419,15 +1412,15 @@ function ge(e) {
|
|
|
1419
1412
|
const { siblings: t, index: n } = W(e);
|
|
1420
1413
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1421
1414
|
}
|
|
1422
|
-
function
|
|
1415
|
+
function Kt(e, t, n) {
|
|
1423
1416
|
const { siblings: o, index: s } = W(n);
|
|
1424
1417
|
o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
|
|
1425
1418
|
}
|
|
1426
|
-
function
|
|
1419
|
+
function Vt(e, t) {
|
|
1427
1420
|
const { siblings: n, index: o } = W(e);
|
|
1428
1421
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1429
1422
|
}
|
|
1430
|
-
function
|
|
1423
|
+
function Ke(e, t, n) {
|
|
1431
1424
|
if (ge(t), e === "in")
|
|
1432
1425
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1433
1426
|
else {
|
|
@@ -1438,17 +1431,17 @@ function Ie(e, t, n) {
|
|
|
1438
1431
|
e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
|
|
1439
1432
|
}
|
|
1440
1433
|
}
|
|
1441
|
-
const
|
|
1434
|
+
const Wt = function(e, t) {
|
|
1442
1435
|
var n, o;
|
|
1443
1436
|
if (e === L)
|
|
1444
1437
|
return L;
|
|
1445
|
-
if (e ===
|
|
1446
|
-
return
|
|
1438
|
+
if (e === R)
|
|
1439
|
+
return R;
|
|
1447
1440
|
if (e === ce) {
|
|
1448
1441
|
const s = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, i = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1449
|
-
return s <= i ? (t.direction = L, L) : (t.direction =
|
|
1442
|
+
return s <= i ? (t.direction = L, L) : (t.direction = R, R);
|
|
1450
1443
|
}
|
|
1451
|
-
},
|
|
1444
|
+
}, Ve = function(e, t, n) {
|
|
1452
1445
|
var i, r;
|
|
1453
1446
|
const o = n.children[0].children[0], s = t.parentElement;
|
|
1454
1447
|
if (s.tagName === "ME-PARENT") {
|
|
@@ -1460,21 +1453,21 @@ const Vt = function(e, t) {
|
|
|
1460
1453
|
}
|
|
1461
1454
|
e.linkDiv(n.offsetParent);
|
|
1462
1455
|
} else
|
|
1463
|
-
s.tagName === "ME-ROOT" && (
|
|
1464
|
-
},
|
|
1456
|
+
s.tagName === "ME-ROOT" && (Wt(e.direction, o.nodeObj) === L ? (i = e.container.querySelector(".lhs")) == null || i.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1457
|
+
}, We = function(e, t) {
|
|
1465
1458
|
const n = e.parentNode;
|
|
1466
1459
|
if (t === 0) {
|
|
1467
1460
|
const o = n.parentNode.parentNode;
|
|
1468
1461
|
o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
|
|
1469
1462
|
}
|
|
1470
1463
|
n.parentNode.remove();
|
|
1471
|
-
},
|
|
1464
|
+
}, Ue = {
|
|
1472
1465
|
before: "beforebegin",
|
|
1473
1466
|
after: "afterend"
|
|
1474
1467
|
}, J = function(e) {
|
|
1475
1468
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1476
1469
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1477
|
-
},
|
|
1470
|
+
}, Ut = function(e, t) {
|
|
1478
1471
|
const n = e.nodeObj, o = fe(n);
|
|
1479
1472
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1480
1473
|
const s = Object.assign(n, t);
|
|
@@ -1489,17 +1482,17 @@ const Vt = function(e, t) {
|
|
|
1489
1482
|
const o = t.nodeObj;
|
|
1490
1483
|
o.expanded === !1 && (e.expandNode(t, !0), t = C(o.id));
|
|
1491
1484
|
const s = n || e.generateNewObj();
|
|
1492
|
-
o.children ? o.children.push(s) : o.children = [s],
|
|
1485
|
+
o.children ? o.children.push(s) : o.children = [s], O(e.nodeData);
|
|
1493
1486
|
const { grp: i, top: r } = e.createWrapper(s);
|
|
1494
|
-
return
|
|
1495
|
-
},
|
|
1496
|
-
var h, a,
|
|
1487
|
+
return Ve(e, t, i), { newTop: r, newNodeObj: s };
|
|
1488
|
+
}, Yt = function(e, t, n) {
|
|
1489
|
+
var h, a, d;
|
|
1497
1490
|
const o = t || this.currentNode;
|
|
1498
1491
|
if (!o)
|
|
1499
1492
|
return;
|
|
1500
1493
|
const s = o.nodeObj;
|
|
1501
1494
|
if (s.parent) {
|
|
1502
|
-
if (!((h = s.parent) != null && h.parent) && ((
|
|
1495
|
+
if (!((h = s.parent) != null && h.parent) && ((d = (a = s.parent) == null ? void 0 : a.children) == null ? void 0 : d.length) === 1) {
|
|
1503
1496
|
this.addChild(C(s.parent.id), n);
|
|
1504
1497
|
return;
|
|
1505
1498
|
}
|
|
@@ -1508,14 +1501,14 @@ const Vt = function(e, t) {
|
|
|
1508
1501
|
return;
|
|
1509
1502
|
}
|
|
1510
1503
|
const i = n || this.generateNewObj();
|
|
1511
|
-
|
|
1504
|
+
Kt(i, e, s), O(this.nodeData);
|
|
1512
1505
|
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(i);
|
|
1513
|
-
r.parentElement.insertAdjacentElement(
|
|
1506
|
+
r.parentElement.insertAdjacentElement(Ue[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1514
1507
|
name: "insertSibling",
|
|
1515
1508
|
type: e,
|
|
1516
1509
|
obj: i
|
|
1517
1510
|
});
|
|
1518
|
-
},
|
|
1511
|
+
}, Xt = function(e, t) {
|
|
1519
1512
|
const n = e || this.currentNode;
|
|
1520
1513
|
if (!n)
|
|
1521
1514
|
return;
|
|
@@ -1524,7 +1517,7 @@ const Vt = function(e, t) {
|
|
|
1524
1517
|
if (!o.parent)
|
|
1525
1518
|
return;
|
|
1526
1519
|
const s = t || this.generateNewObj();
|
|
1527
|
-
|
|
1520
|
+
Vt(o, s), O(this.nodeData);
|
|
1528
1521
|
const i = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(s, !0);
|
|
1529
1522
|
c.appendChild(me(!0)), i.insertAdjacentElement("afterend", r);
|
|
1530
1523
|
const l = this.createChildren([i]);
|
|
@@ -1532,7 +1525,7 @@ const Vt = function(e, t) {
|
|
|
1532
1525
|
name: "insertParent",
|
|
1533
1526
|
obj: s
|
|
1534
1527
|
});
|
|
1535
|
-
},
|
|
1528
|
+
}, Gt = function(e, t) {
|
|
1536
1529
|
const n = e || this.currentNode;
|
|
1537
1530
|
if (!n)
|
|
1538
1531
|
return;
|
|
@@ -1544,7 +1537,7 @@ const Vt = function(e, t) {
|
|
|
1544
1537
|
name: "addChild",
|
|
1545
1538
|
obj: i
|
|
1546
1539
|
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1547
|
-
},
|
|
1540
|
+
}, Jt = function(e, t) {
|
|
1548
1541
|
const n = fe(e.nodeObj);
|
|
1549
1542
|
ue(n);
|
|
1550
1543
|
const o = ve(this, t, n);
|
|
@@ -1555,7 +1548,7 @@ const Vt = function(e, t) {
|
|
|
1555
1548
|
name: "copyNode",
|
|
1556
1549
|
obj: s
|
|
1557
1550
|
});
|
|
1558
|
-
},
|
|
1551
|
+
}, Zt = function(e, t) {
|
|
1559
1552
|
e = le(e);
|
|
1560
1553
|
const n = [];
|
|
1561
1554
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -1571,29 +1564,29 @@ const Vt = function(e, t) {
|
|
|
1571
1564
|
name: "copyNodes",
|
|
1572
1565
|
objs: n
|
|
1573
1566
|
});
|
|
1574
|
-
},
|
|
1567
|
+
}, Qt = function(e) {
|
|
1575
1568
|
const t = e || this.currentNode;
|
|
1576
1569
|
if (!t)
|
|
1577
1570
|
return;
|
|
1578
1571
|
const n = t.nodeObj;
|
|
1579
|
-
|
|
1572
|
+
Ft(n);
|
|
1580
1573
|
const o = t.parentNode.parentNode;
|
|
1581
1574
|
o.parentNode.insertBefore(o, o.previousSibling), this.linkDiv(), this.bus.fire("operation", {
|
|
1582
1575
|
name: "moveUpNode",
|
|
1583
1576
|
obj: n
|
|
1584
1577
|
});
|
|
1585
|
-
},
|
|
1578
|
+
}, en = function(e) {
|
|
1586
1579
|
const t = e || this.currentNode;
|
|
1587
1580
|
if (!t)
|
|
1588
1581
|
return;
|
|
1589
1582
|
const n = t.nodeObj;
|
|
1590
|
-
|
|
1583
|
+
It(n);
|
|
1591
1584
|
const o = t.parentNode.parentNode;
|
|
1592
1585
|
o.nextSibling ? o.nextSibling.insertAdjacentElement("afterend", o) : o.parentNode.prepend(o), this.linkDiv(), this.bus.fire("operation", {
|
|
1593
1586
|
name: "moveDownNode",
|
|
1594
1587
|
obj: n
|
|
1595
1588
|
});
|
|
1596
|
-
},
|
|
1589
|
+
}, tn = function(e) {
|
|
1597
1590
|
var r;
|
|
1598
1591
|
const t = e || this.currentNode;
|
|
1599
1592
|
if (!t)
|
|
@@ -1602,7 +1595,7 @@ const Vt = function(e, t) {
|
|
|
1602
1595
|
if (!n.parent)
|
|
1603
1596
|
throw new Error("Can not remove root node");
|
|
1604
1597
|
const o = n.parent.children, s = o.findIndex((c) => c === n), i = ge(n);
|
|
1605
|
-
if (
|
|
1598
|
+
if (We(t, i), o.length !== 0) {
|
|
1606
1599
|
const c = o[s] || o[s - 1];
|
|
1607
1600
|
this.selectNode(C(c.id));
|
|
1608
1601
|
} else
|
|
@@ -1613,77 +1606,77 @@ const Vt = function(e, t) {
|
|
|
1613
1606
|
originIndex: s,
|
|
1614
1607
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1615
1608
|
});
|
|
1616
|
-
},
|
|
1609
|
+
}, nn = function(e) {
|
|
1617
1610
|
e = le(e);
|
|
1618
1611
|
for (const t of e) {
|
|
1619
1612
|
const n = t.nodeObj;
|
|
1620
1613
|
if (!n.parent)
|
|
1621
1614
|
continue;
|
|
1622
1615
|
const o = ge(n);
|
|
1623
|
-
|
|
1616
|
+
We(t, o);
|
|
1624
1617
|
}
|
|
1625
1618
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1626
1619
|
name: "removeNodes",
|
|
1627
1620
|
objs: e.map((t) => t.nodeObj)
|
|
1628
1621
|
});
|
|
1629
|
-
},
|
|
1622
|
+
}, on = function(e, t) {
|
|
1630
1623
|
e = le(e);
|
|
1631
1624
|
const n = t.nodeObj;
|
|
1632
1625
|
n.expanded === !1 && (this.expandNode(t, !0), t = C(n.id));
|
|
1633
1626
|
for (const o of e) {
|
|
1634
1627
|
const s = o.nodeObj;
|
|
1635
|
-
|
|
1628
|
+
Ke("in", s, n), O(this.nodeData);
|
|
1636
1629
|
const i = o.parentElement;
|
|
1637
|
-
|
|
1630
|
+
Ve(this, t, i.parentElement);
|
|
1638
1631
|
}
|
|
1639
1632
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1640
1633
|
name: "moveNodeIn",
|
|
1641
1634
|
objs: e.map((o) => o.nodeObj),
|
|
1642
1635
|
toObj: n
|
|
1643
1636
|
});
|
|
1644
|
-
},
|
|
1637
|
+
}, Ye = (e, t, n, o) => {
|
|
1645
1638
|
e = le(e), t === "after" && (e = e.reverse());
|
|
1646
1639
|
const s = n.nodeObj;
|
|
1647
1640
|
for (const i of e) {
|
|
1648
1641
|
const r = i.nodeObj;
|
|
1649
|
-
|
|
1642
|
+
Ke(t, r, s), O(o.nodeData), J(i);
|
|
1650
1643
|
const c = i.parentElement.parentNode;
|
|
1651
|
-
n.parentElement.parentNode.insertAdjacentElement(
|
|
1644
|
+
n.parentElement.parentNode.insertAdjacentElement(Ue[t], c);
|
|
1652
1645
|
}
|
|
1653
1646
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1654
1647
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
1655
1648
|
objs: e.map((i) => i.nodeObj),
|
|
1656
1649
|
toObj: s
|
|
1657
1650
|
});
|
|
1658
|
-
}, on = function(e, t) {
|
|
1659
|
-
Ue(e, "before", t, this);
|
|
1660
1651
|
}, sn = function(e, t) {
|
|
1661
|
-
|
|
1662
|
-
}, rn = function(e) {
|
|
1652
|
+
Ye(e, "before", t, this);
|
|
1653
|
+
}, rn = function(e, t) {
|
|
1654
|
+
Ye(e, "after", t, this);
|
|
1655
|
+
}, cn = function(e) {
|
|
1663
1656
|
const t = e || this.currentNode;
|
|
1664
1657
|
t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
|
|
1665
|
-
},
|
|
1658
|
+
}, ln = function(e, t) {
|
|
1666
1659
|
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1667
|
-
},
|
|
1660
|
+
}, Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1668
1661
|
__proto__: null,
|
|
1669
|
-
addChild:
|
|
1670
|
-
beginEdit:
|
|
1671
|
-
copyNode:
|
|
1672
|
-
copyNodes:
|
|
1673
|
-
insertParent:
|
|
1674
|
-
insertSibling:
|
|
1675
|
-
moveDownNode:
|
|
1676
|
-
moveNodeAfter:
|
|
1677
|
-
moveNodeBefore:
|
|
1678
|
-
moveNodeIn:
|
|
1679
|
-
moveUpNode:
|
|
1680
|
-
removeNode:
|
|
1681
|
-
removeNodes:
|
|
1682
|
-
reshapeNode:
|
|
1662
|
+
addChild: Gt,
|
|
1663
|
+
beginEdit: cn,
|
|
1664
|
+
copyNode: Jt,
|
|
1665
|
+
copyNodes: Zt,
|
|
1666
|
+
insertParent: Xt,
|
|
1667
|
+
insertSibling: Yt,
|
|
1668
|
+
moveDownNode: en,
|
|
1669
|
+
moveNodeAfter: rn,
|
|
1670
|
+
moveNodeBefore: sn,
|
|
1671
|
+
moveNodeIn: on,
|
|
1672
|
+
moveUpNode: Qt,
|
|
1673
|
+
removeNode: tn,
|
|
1674
|
+
removeNodes: nn,
|
|
1675
|
+
reshapeNode: Ut,
|
|
1683
1676
|
rmSubline: J,
|
|
1684
|
-
setNodeTopic:
|
|
1677
|
+
setNodeTopic: ln
|
|
1685
1678
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1686
|
-
function
|
|
1679
|
+
function Ge(e) {
|
|
1687
1680
|
return {
|
|
1688
1681
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
1689
1682
|
arrows: e.arrows,
|
|
@@ -1692,7 +1685,7 @@ function Xe(e) {
|
|
|
1692
1685
|
theme: e.theme
|
|
1693
1686
|
};
|
|
1694
1687
|
}
|
|
1695
|
-
const
|
|
1688
|
+
const an = function(e, t, n) {
|
|
1696
1689
|
if (e) {
|
|
1697
1690
|
if (this.clearSelection(), typeof e == "string") {
|
|
1698
1691
|
const o = C(e);
|
|
@@ -1700,9 +1693,9 @@ const ln = function(e, t, n) {
|
|
|
1700
1693
|
}
|
|
1701
1694
|
e.className = "selected", e.scrollIntoView({ block: "nearest", inline: "nearest" }), this.currentNode = e, t ? this.bus.fire("selectNewNode", e.nodeObj) : this.bus.fire("selectNode", e.nodeObj, n);
|
|
1702
1695
|
}
|
|
1703
|
-
},
|
|
1696
|
+
}, dn = function() {
|
|
1704
1697
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
1705
|
-
},
|
|
1698
|
+
}, hn = function(e) {
|
|
1706
1699
|
this.clearSelection();
|
|
1707
1700
|
for (const t of e)
|
|
1708
1701
|
t.className = "selected";
|
|
@@ -1710,23 +1703,23 @@ const ln = function(e, t, n) {
|
|
|
1710
1703
|
"selectNodes",
|
|
1711
1704
|
e.map((t) => t.nodeObj)
|
|
1712
1705
|
);
|
|
1713
|
-
},
|
|
1706
|
+
}, un = function() {
|
|
1714
1707
|
if (this.currentNodes)
|
|
1715
1708
|
for (const e of this.currentNodes)
|
|
1716
1709
|
e.classList.remove("selected");
|
|
1717
1710
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
1718
|
-
}, un = function() {
|
|
1719
|
-
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
1720
1711
|
}, fn = function() {
|
|
1721
|
-
|
|
1712
|
+
this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
|
|
1713
|
+
}, pn = function() {
|
|
1714
|
+
const e = Ge(this);
|
|
1722
1715
|
return JSON.stringify(e, (t, n) => {
|
|
1723
1716
|
if (!(t === "parent" && typeof n != "string"))
|
|
1724
1717
|
return n;
|
|
1725
1718
|
});
|
|
1726
|
-
}, pn = function() {
|
|
1727
|
-
return JSON.parse(this.getDataString());
|
|
1728
1719
|
}, mn = function() {
|
|
1729
|
-
|
|
1720
|
+
return JSON.parse(this.getDataString());
|
|
1721
|
+
}, gn = function() {
|
|
1722
|
+
const e = Ge(this).nodeData;
|
|
1730
1723
|
let t = "# " + e.topic + `
|
|
1731
1724
|
|
|
1732
1725
|
`;
|
|
@@ -1738,29 +1731,29 @@ const ln = function(e, t, n) {
|
|
|
1738
1731
|
`, o[i].children && n(o[i].children || [], s + 1);
|
|
1739
1732
|
}
|
|
1740
1733
|
return n(e.children || [], 2), t;
|
|
1741
|
-
}, gn = function() {
|
|
1742
|
-
this.editable = !0;
|
|
1743
1734
|
}, vn = function() {
|
|
1735
|
+
this.editable = !0;
|
|
1736
|
+
}, bn = function() {
|
|
1744
1737
|
this.editable = !1;
|
|
1745
|
-
},
|
|
1738
|
+
}, yn = function(e) {
|
|
1746
1739
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
|
|
1747
|
-
},
|
|
1740
|
+
}, xn = function() {
|
|
1748
1741
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1749
|
-
}, xn = function(e) {
|
|
1750
|
-
e(this);
|
|
1751
1742
|
}, wn = function(e) {
|
|
1743
|
+
e(this);
|
|
1744
|
+
}, En = function(e) {
|
|
1752
1745
|
e.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
|
|
1753
|
-
}, En = function() {
|
|
1754
|
-
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1755
1746
|
}, Nn = function() {
|
|
1756
|
-
this.direction =
|
|
1747
|
+
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1757
1748
|
}, Cn = function() {
|
|
1758
|
-
this.direction =
|
|
1749
|
+
this.direction = 0, this.refresh();
|
|
1759
1750
|
}, _n = function() {
|
|
1751
|
+
this.direction = 1, this.refresh();
|
|
1752
|
+
}, Sn = function() {
|
|
1760
1753
|
this.direction = 2, this.refresh();
|
|
1761
|
-
},
|
|
1754
|
+
}, Mn = function(e) {
|
|
1762
1755
|
this.locale = e, this.refresh();
|
|
1763
|
-
},
|
|
1756
|
+
}, kn = function(e, t) {
|
|
1764
1757
|
const n = e.nodeObj;
|
|
1765
1758
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1766
1759
|
const o = e.parentNode, s = o.children[1];
|
|
@@ -1772,32 +1765,32 @@ const ln = function(e, t, n) {
|
|
|
1772
1765
|
} else
|
|
1773
1766
|
o.parentNode.children[1].remove();
|
|
1774
1767
|
this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1775
|
-
},
|
|
1776
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []),
|
|
1777
|
-
},
|
|
1768
|
+
}, Ln = function(e) {
|
|
1769
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), O(this.nodeData), this.layout(), this.linkDiv();
|
|
1770
|
+
}, Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1778
1771
|
__proto__: null,
|
|
1779
|
-
cancelFocus:
|
|
1780
|
-
clearSelection:
|
|
1781
|
-
disableEdit:
|
|
1782
|
-
enableEdit:
|
|
1783
|
-
expandNode:
|
|
1784
|
-
focusNode:
|
|
1785
|
-
getData:
|
|
1786
|
-
getDataMd:
|
|
1787
|
-
getDataString:
|
|
1788
|
-
initLeft:
|
|
1789
|
-
initRight:
|
|
1790
|
-
initSide:
|
|
1791
|
-
install:
|
|
1792
|
-
refresh:
|
|
1793
|
-
scale:
|
|
1794
|
-
selectNode:
|
|
1795
|
-
selectNodes:
|
|
1796
|
-
setLocale:
|
|
1797
|
-
toCenter:
|
|
1798
|
-
unselectNode:
|
|
1799
|
-
unselectNodes:
|
|
1800
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1772
|
+
cancelFocus: Nn,
|
|
1773
|
+
clearSelection: fn,
|
|
1774
|
+
disableEdit: bn,
|
|
1775
|
+
enableEdit: vn,
|
|
1776
|
+
expandNode: kn,
|
|
1777
|
+
focusNode: En,
|
|
1778
|
+
getData: mn,
|
|
1779
|
+
getDataMd: gn,
|
|
1780
|
+
getDataString: pn,
|
|
1781
|
+
initLeft: Cn,
|
|
1782
|
+
initRight: _n,
|
|
1783
|
+
initSide: Sn,
|
|
1784
|
+
install: wn,
|
|
1785
|
+
refresh: Ln,
|
|
1786
|
+
scale: yn,
|
|
1787
|
+
selectNode: an,
|
|
1788
|
+
selectNodes: hn,
|
|
1789
|
+
setLocale: Mn,
|
|
1790
|
+
toCenter: xn,
|
|
1791
|
+
unselectNode: dn,
|
|
1792
|
+
unselectNodes: un
|
|
1793
|
+
}, Symbol.toStringTag, { value: "Module" })), An = function(e) {
|
|
1801
1794
|
return {
|
|
1802
1795
|
dom: e,
|
|
1803
1796
|
moved: !1,
|
|
@@ -1823,11 +1816,11 @@ const ln = function(e, t, n) {
|
|
|
1823
1816
|
this.moved = !1, this.mousedown = !1;
|
|
1824
1817
|
}
|
|
1825
1818
|
};
|
|
1826
|
-
},
|
|
1827
|
-
create:
|
|
1819
|
+
}, Ae = {
|
|
1820
|
+
create: An
|
|
1828
1821
|
};
|
|
1829
1822
|
function re(e, t, n) {
|
|
1830
|
-
const { offsetLeft: o, offsetTop: s } =
|
|
1823
|
+
const { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, c = o + i / 2, l = s + r / 2, h = c + n.x, a = l + n.y;
|
|
1831
1824
|
return {
|
|
1832
1825
|
w: i,
|
|
1833
1826
|
h: r,
|
|
@@ -1845,7 +1838,7 @@ function I(e) {
|
|
|
1845
1838
|
y: n
|
|
1846
1839
|
};
|
|
1847
1840
|
}
|
|
1848
|
-
const
|
|
1841
|
+
const jn = function(e, t, n, o) {
|
|
1849
1842
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1850
1843
|
return N(s, {
|
|
1851
1844
|
"text-anchor": "middle",
|
|
@@ -1853,16 +1846,16 @@ const An = function(e, t, n, o) {
|
|
|
1853
1846
|
y: n + "",
|
|
1854
1847
|
fill: o || "#666"
|
|
1855
1848
|
}), s.dataset.type = "custom-link", s.innerHTML = e, s;
|
|
1856
|
-
},
|
|
1849
|
+
}, Je = function(e, t, n, o, s) {
|
|
1857
1850
|
if (!t || !n)
|
|
1858
1851
|
return;
|
|
1859
1852
|
performance.now();
|
|
1860
|
-
const i = re(e, t, o.delta1), r = re(e, n, o.delta2), { x: c, y: l } = I(i), { ctrlX: h, ctrlY: a } = i, { ctrlX:
|
|
1861
|
-
`M ${c} ${l} C ${h} ${a} ${
|
|
1862
|
-
`M ${
|
|
1863
|
-
), v = c / 8 + h * 3 / 8 +
|
|
1864
|
-
f.appendChild(y), f.arrowObj = o, f.dataset.linkid = o.id, e.linkSvgGroup.appendChild(f), s || (e.arrows.push(o), e.currentArrow = f,
|
|
1865
|
-
},
|
|
1853
|
+
const i = re(e, t, o.delta1), r = re(e, n, o.delta2), { x: c, y: l } = I(i), { ctrlX: h, ctrlY: a } = i, { ctrlX: d, ctrlY: u } = r, { x: g, y: p } = I(r), m = He(d, u, g, p), f = mt(
|
|
1854
|
+
`M ${c} ${l} C ${h} ${a} ${d} ${u} ${g} ${p}`,
|
|
1855
|
+
`M ${m.x1} ${m.y1} L ${g} ${p} L ${m.x2} ${m.y2}`
|
|
1856
|
+
), v = c / 8 + h * 3 / 8 + d * 3 / 8 + g / 8, b = l / 8 + a * 3 / 8 + u * 3 / 8 + p / 8, y = jn(o.label, v, b, e.theme.cssVar["--color"]);
|
|
1857
|
+
f.appendChild(y), f.arrowObj = o, f.dataset.linkid = o.id, e.linkSvgGroup.appendChild(f), s || (e.arrows.push(o), e.currentArrow = f, Qe(e, o, i, r)), performance.now();
|
|
1858
|
+
}, Dn = function(e, t) {
|
|
1866
1859
|
const n = {
|
|
1867
1860
|
id: G(),
|
|
1868
1861
|
label: "Custom Link",
|
|
@@ -1877,15 +1870,15 @@ const An = function(e, t, n, o) {
|
|
|
1877
1870
|
y: -200
|
|
1878
1871
|
}
|
|
1879
1872
|
};
|
|
1880
|
-
|
|
1873
|
+
Je(this, e, t, n), this.bus.fire("operation", {
|
|
1881
1874
|
name: "createArrow",
|
|
1882
1875
|
obj: n
|
|
1883
1876
|
});
|
|
1884
|
-
},
|
|
1877
|
+
}, On = function(e) {
|
|
1885
1878
|
let t;
|
|
1886
1879
|
if (e ? t = e : t = this.currentArrow, !t)
|
|
1887
1880
|
return;
|
|
1888
|
-
|
|
1881
|
+
Ze(this);
|
|
1889
1882
|
const n = t.arrowObj.id;
|
|
1890
1883
|
this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
|
|
1891
1884
|
name: "removeArrow",
|
|
@@ -1896,15 +1889,15 @@ const An = function(e, t, n, o) {
|
|
|
1896
1889
|
}, $n = function(e) {
|
|
1897
1890
|
this.currentArrow = e;
|
|
1898
1891
|
const t = e.arrowObj, n = C(t.from), o = C(t.to), s = re(this, n, t.delta1), i = re(this, o, t.delta2);
|
|
1899
|
-
|
|
1900
|
-
},
|
|
1901
|
-
this.currentArrow = null,
|
|
1902
|
-
},
|
|
1892
|
+
Qe(this, t, s, i);
|
|
1893
|
+
}, Pn = function() {
|
|
1894
|
+
this.currentArrow = null, Ze(this);
|
|
1895
|
+
}, Ze = function(e) {
|
|
1903
1896
|
e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1904
|
-
},
|
|
1905
|
-
var
|
|
1897
|
+
}, Qe = function(e, t, n, o) {
|
|
1898
|
+
var u;
|
|
1906
1899
|
e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
|
|
1907
|
-
let { x: s, y: i } = I(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: h } = o, { x: a, y:
|
|
1900
|
+
let { x: s, y: i } = I(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: h } = o, { x: a, y: d } = I(o);
|
|
1908
1901
|
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${h}px;left:${l}px;`, N(e.line1, {
|
|
1909
1902
|
x1: s + "",
|
|
1910
1903
|
y1: i + "",
|
|
@@ -1914,14 +1907,14 @@ const An = function(e, t, n, o) {
|
|
|
1914
1907
|
x1: l + "",
|
|
1915
1908
|
y1: h + "",
|
|
1916
1909
|
x2: a + "",
|
|
1917
|
-
y2:
|
|
1918
|
-
}), e.helper1 && (e.helper1.destory(e.map), (
|
|
1910
|
+
y2: d + ""
|
|
1911
|
+
}), e.helper1 && (e.helper1.destory(e.map), (u = e.helper2) == null || u.destory(e.map)), e.helper1 = Ae.create(e.P2), e.helper2 = Ae.create(e.P3), e.helper1.init(e.map, (g, p) => {
|
|
1919
1912
|
var b;
|
|
1920
|
-
r = r +
|
|
1921
|
-
const
|
|
1922
|
-
s =
|
|
1923
|
-
const f = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 +
|
|
1924
|
-
e.P2.style.top = c + "px", e.P2.style.left = r + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${a} ${
|
|
1913
|
+
r = r + g / e.scaleVal, c = c + p / e.scaleVal;
|
|
1914
|
+
const m = I({ ...n, ctrlX: r, ctrlY: c });
|
|
1915
|
+
s = m.x, i = m.y;
|
|
1916
|
+
const f = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 + d / 8;
|
|
1917
|
+
e.P2.style.top = c + "px", e.P2.style.left = r + "px", (b = e.currentArrow) == null || b.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${a} ${d}`), N(e.currentArrow.children[2], {
|
|
1925
1918
|
x: f + "",
|
|
1926
1919
|
y: v + ""
|
|
1927
1920
|
}), N(e.line1, {
|
|
@@ -1930,39 +1923,39 @@ const An = function(e, t, n, o) {
|
|
|
1930
1923
|
x2: r + "",
|
|
1931
1924
|
y2: c + ""
|
|
1932
1925
|
}), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy;
|
|
1933
|
-
}), e.helper2.init(e.map, (
|
|
1926
|
+
}), e.helper2.init(e.map, (g, p) => {
|
|
1934
1927
|
var y, x;
|
|
1935
|
-
l = l +
|
|
1936
|
-
const
|
|
1937
|
-
a =
|
|
1938
|
-
const f = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 +
|
|
1939
|
-
e.P3.style.top = h + "px", e.P3.style.left = l + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${a} ${
|
|
1928
|
+
l = l + g / e.scaleVal, h = h + p / e.scaleVal;
|
|
1929
|
+
const m = I({ ...o, ctrlX: l, ctrlY: h });
|
|
1930
|
+
a = m.x, d = m.y;
|
|
1931
|
+
const f = s / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, v = i / 8 + c * 3 / 8 + h * 3 / 8 + d / 8, b = He(l, h, a, d);
|
|
1932
|
+
e.P3.style.top = h + "px", e.P3.style.left = l + "px", (y = e.currentArrow) == null || y.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${c} ${l} ${h} ${a} ${d}`), (x = e.currentArrow) == null || x.children[1].setAttribute("d", `M ${b.x1} ${b.y1} L ${a} ${d} L ${b.x2} ${b.y2}`), N(e.currentArrow.children[2], {
|
|
1940
1933
|
x: f + "",
|
|
1941
1934
|
y: v + ""
|
|
1942
1935
|
}), N(e.line2, {
|
|
1943
1936
|
x1: l + "",
|
|
1944
1937
|
y1: h + "",
|
|
1945
1938
|
x2: a + "",
|
|
1946
|
-
y2:
|
|
1939
|
+
y2: d + ""
|
|
1947
1940
|
}), t.delta2.x = l - o.cx, t.delta2.y = h - o.cy;
|
|
1948
1941
|
});
|
|
1949
1942
|
};
|
|
1950
|
-
function
|
|
1943
|
+
function Hn() {
|
|
1951
1944
|
this.linkSvgGroup.innerHTML = "";
|
|
1952
1945
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1953
1946
|
const t = this.arrows[e];
|
|
1954
1947
|
try {
|
|
1955
|
-
|
|
1948
|
+
Je(this, C(t.from), C(t.to), t, !0);
|
|
1956
1949
|
} catch {
|
|
1957
1950
|
}
|
|
1958
1951
|
}
|
|
1959
1952
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1960
1953
|
}
|
|
1961
|
-
function
|
|
1954
|
+
function Bn(e) {
|
|
1962
1955
|
if (!e)
|
|
1963
1956
|
return;
|
|
1964
1957
|
const t = e.children[2];
|
|
1965
|
-
|
|
1958
|
+
Re(this, t, (n) => {
|
|
1966
1959
|
var i;
|
|
1967
1960
|
const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
1968
1961
|
s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1971,49 +1964,49 @@ function Hn(e) {
|
|
|
1971
1964
|
}));
|
|
1972
1965
|
});
|
|
1973
1966
|
}
|
|
1974
|
-
function
|
|
1967
|
+
function zn() {
|
|
1975
1968
|
this.arrows = this.arrows.filter((e) => se(e.from, this.nodeData) && se(e.to, this.nodeData));
|
|
1976
1969
|
}
|
|
1977
|
-
const
|
|
1970
|
+
const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1978
1971
|
__proto__: null,
|
|
1979
|
-
createArrow:
|
|
1980
|
-
editArrowLabel:
|
|
1981
|
-
removeArrow:
|
|
1982
|
-
renderArrow:
|
|
1972
|
+
createArrow: Dn,
|
|
1973
|
+
editArrowLabel: Bn,
|
|
1974
|
+
removeArrow: On,
|
|
1975
|
+
renderArrow: Hn,
|
|
1983
1976
|
selectArrow: $n,
|
|
1984
|
-
tidyArrow:
|
|
1985
|
-
unselectArrow:
|
|
1986
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1977
|
+
tidyArrow: zn,
|
|
1978
|
+
unselectArrow: Pn
|
|
1979
|
+
}, Symbol.toStringTag, { value: "Module" })), qn = function(e) {
|
|
1987
1980
|
var l, h;
|
|
1988
1981
|
if (e.length === 0)
|
|
1989
1982
|
throw new Error("No selected node.");
|
|
1990
1983
|
if (e.length === 1) {
|
|
1991
|
-
const a = e[0].nodeObj,
|
|
1992
|
-
if (!
|
|
1984
|
+
const a = e[0].nodeObj, d = e[0].nodeObj.parent;
|
|
1985
|
+
if (!d)
|
|
1993
1986
|
throw new Error("Can not select root node.");
|
|
1994
|
-
const
|
|
1987
|
+
const u = d.children.findIndex((g) => a === g);
|
|
1995
1988
|
return {
|
|
1996
|
-
parent:
|
|
1997
|
-
start:
|
|
1998
|
-
end:
|
|
1989
|
+
parent: d.id,
|
|
1990
|
+
start: u,
|
|
1991
|
+
end: u
|
|
1999
1992
|
};
|
|
2000
1993
|
}
|
|
2001
1994
|
let t = 0;
|
|
2002
1995
|
const n = e.map((a) => {
|
|
2003
|
-
let
|
|
2004
|
-
const
|
|
2005
|
-
for (;
|
|
2006
|
-
const
|
|
2007
|
-
|
|
1996
|
+
let d = a.nodeObj;
|
|
1997
|
+
const u = [];
|
|
1998
|
+
for (; d.parent; ) {
|
|
1999
|
+
const g = d.parent, p = g.children, m = p == null ? void 0 : p.indexOf(d);
|
|
2000
|
+
d = g, u.unshift({ node: d, index: m });
|
|
2008
2001
|
}
|
|
2009
|
-
return
|
|
2002
|
+
return u.length > t && (t = u.length), u;
|
|
2010
2003
|
});
|
|
2011
2004
|
let o = 0;
|
|
2012
2005
|
e:
|
|
2013
2006
|
for (; o < t; o++) {
|
|
2014
2007
|
const a = (l = n[0][o]) == null ? void 0 : l.node;
|
|
2015
|
-
for (let
|
|
2016
|
-
if (((h = n[
|
|
2008
|
+
for (let d = 1; d < n.length; d++)
|
|
2009
|
+
if (((h = n[d][o]) == null ? void 0 : h.node) !== a)
|
|
2017
2010
|
break e;
|
|
2018
2011
|
}
|
|
2019
2012
|
if (!o)
|
|
@@ -2026,10 +2019,10 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2026
2019
|
start: i,
|
|
2027
2020
|
end: r
|
|
2028
2021
|
};
|
|
2029
|
-
},
|
|
2022
|
+
}, Fn = function(e) {
|
|
2030
2023
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2031
2024
|
return t.setAttribute("id", e), t;
|
|
2032
|
-
},
|
|
2025
|
+
}, je = function(e, t) {
|
|
2033
2026
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2034
2027
|
return N(n, {
|
|
2035
2028
|
d: e,
|
|
@@ -2038,7 +2031,7 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2038
2031
|
"stroke-linecap": "round",
|
|
2039
2032
|
"stroke-width": "2"
|
|
2040
2033
|
}), n;
|
|
2041
|
-
},
|
|
2034
|
+
}, De = function(e, t, n, o, s) {
|
|
2042
2035
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2043
2036
|
return N(i, {
|
|
2044
2037
|
"text-anchor": o,
|
|
@@ -2046,43 +2039,43 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2046
2039
|
y: n + "",
|
|
2047
2040
|
fill: s || "#666"
|
|
2048
2041
|
}), i.innerHTML = e, i;
|
|
2049
|
-
},
|
|
2042
|
+
}, In = (e) => C(e).parentElement.parentElement, Kn = function({ parent: e, start: t }) {
|
|
2050
2043
|
var i, r;
|
|
2051
2044
|
const n = C(e), o = n.nodeObj;
|
|
2052
2045
|
let s;
|
|
2053
2046
|
return o.parent ? s = (i = n.closest("me-main")) == null ? void 0 : i.className : s = (r = C(o.children[t].id).closest("me-main")) == null ? void 0 : r.className, s;
|
|
2054
|
-
},
|
|
2047
|
+
}, et = function(e, t) {
|
|
2055
2048
|
var _;
|
|
2056
|
-
const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, h = C(s).nodeObj, a =
|
|
2057
|
-
let
|
|
2049
|
+
const { id: n, text: o, parent: s, start: i, end: r } = t, c = e.nodes, h = C(s).nodeObj, a = Kn(t);
|
|
2050
|
+
let d = 1 / 0, u = 0, g = 0, p = 0;
|
|
2058
2051
|
for (let P = i; P <= r; P++) {
|
|
2059
2052
|
const U = (_ = h.children) == null ? void 0 : _[P];
|
|
2060
2053
|
if (!U)
|
|
2061
2054
|
return e.removeSummary(n), null;
|
|
2062
|
-
const H =
|
|
2063
|
-
P === i && (
|
|
2064
|
-
}
|
|
2065
|
-
let
|
|
2066
|
-
const v =
|
|
2067
|
-
a === "lhs" ? (
|
|
2068
|
-
const w =
|
|
2069
|
-
return w.appendChild(
|
|
2070
|
-
},
|
|
2055
|
+
const H = In(U.id), { offsetLeft: Z, offsetTop: be } = $(c, H);
|
|
2056
|
+
P === i && (g = be), P === r && (p = be + H.offsetHeight), Z < d && (d = Z), H.offsetWidth + Z > u && (u = H.offsetWidth + Z);
|
|
2057
|
+
}
|
|
2058
|
+
let m, f;
|
|
2059
|
+
const v = g + 10, b = p + 10, y = (v + b) / 2, x = e.theme.cssVar["--color"];
|
|
2060
|
+
a === "lhs" ? (m = je(`M ${d + 10} ${v} c -5 0 -10 5 -10 10 L ${d} ${b - 10} c 0 5 5 10 10 10 M ${d} ${y} h -10`, x), f = De(o, d - 20, y + 6, "end", x)) : (m = je(`M ${u - 10} ${v} c 5 0 10 5 10 10 L ${u} ${b - 10} c 0 5 -5 10 -10 10 M ${u} ${y} h 10`, x), f = De(o, u + 20, y + 6, "start", x));
|
|
2061
|
+
const w = Fn("s-" + n);
|
|
2062
|
+
return w.appendChild(m), w.appendChild(f), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
2063
|
+
}, Vn = function() {
|
|
2071
2064
|
let e = [];
|
|
2072
2065
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2073
|
-
const { parent: t, start: n, end: o } =
|
|
2066
|
+
const { parent: t, start: n, end: o } = qn(e), s = { id: G(), parent: t, start: n, end: o, text: "summary" }, i = et(this, s);
|
|
2074
2067
|
this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
|
|
2075
2068
|
name: "createSummary",
|
|
2076
2069
|
obj: s
|
|
2077
2070
|
});
|
|
2078
|
-
},
|
|
2071
|
+
}, Wn = function(e) {
|
|
2079
2072
|
var n;
|
|
2080
2073
|
const t = this.summaries.findIndex((o) => o.id === e);
|
|
2081
2074
|
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
|
|
2082
2075
|
name: "removeSummary",
|
|
2083
2076
|
obj: { id: e }
|
|
2084
2077
|
});
|
|
2085
|
-
},
|
|
2078
|
+
}, Un = function(e) {
|
|
2086
2079
|
const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2087
2080
|
N(s, {
|
|
2088
2081
|
x: t.x - n + "",
|
|
@@ -2094,21 +2087,21 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2094
2087
|
"stroke-width": "2",
|
|
2095
2088
|
fill: "none"
|
|
2096
2089
|
}), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
|
|
2097
|
-
},
|
|
2090
|
+
}, Yn = function() {
|
|
2098
2091
|
var e, t;
|
|
2099
2092
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2100
|
-
},
|
|
2093
|
+
}, Xn = function() {
|
|
2101
2094
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2102
2095
|
try {
|
|
2103
|
-
|
|
2096
|
+
et(this, e);
|
|
2104
2097
|
} catch {
|
|
2105
2098
|
}
|
|
2106
2099
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2107
|
-
},
|
|
2100
|
+
}, Gn = function(e) {
|
|
2108
2101
|
if (!e)
|
|
2109
2102
|
return;
|
|
2110
2103
|
const t = e.childNodes[1];
|
|
2111
|
-
|
|
2104
|
+
Re(this, t, (n) => {
|
|
2112
2105
|
var i;
|
|
2113
2106
|
const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
|
|
2114
2107
|
s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -2116,16 +2109,16 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2116
2109
|
obj: o
|
|
2117
2110
|
}));
|
|
2118
2111
|
});
|
|
2119
|
-
},
|
|
2112
|
+
}, Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2120
2113
|
__proto__: null,
|
|
2121
|
-
createSummary:
|
|
2122
|
-
editSummary:
|
|
2123
|
-
removeSummary:
|
|
2124
|
-
renderSummary:
|
|
2125
|
-
selectSummary:
|
|
2126
|
-
unselectSummary:
|
|
2114
|
+
createSummary: Vn,
|
|
2115
|
+
editSummary: Gn,
|
|
2116
|
+
removeSummary: Wn,
|
|
2117
|
+
renderSummary: Xn,
|
|
2118
|
+
selectSummary: Un,
|
|
2119
|
+
unselectSummary: Yn
|
|
2127
2120
|
}, Symbol.toStringTag, { value: "Module" })), M = "http://www.w3.org/2000/svg";
|
|
2128
|
-
function
|
|
2121
|
+
function Zn(e, t) {
|
|
2129
2122
|
const n = document.createElementNS(M, "svg");
|
|
2130
2123
|
return N(n, {
|
|
2131
2124
|
version: "1.1",
|
|
@@ -2134,10 +2127,10 @@ function Jn(e, t) {
|
|
|
2134
2127
|
width: t
|
|
2135
2128
|
}), n;
|
|
2136
2129
|
}
|
|
2137
|
-
function
|
|
2130
|
+
function Qn(e, t) {
|
|
2138
2131
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2139
2132
|
}
|
|
2140
|
-
function
|
|
2133
|
+
function eo(e, t, n, o) {
|
|
2141
2134
|
const s = document.createElementNS(M, "g");
|
|
2142
2135
|
let i = "";
|
|
2143
2136
|
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
@@ -2145,7 +2138,7 @@ function Qn(e, t, n, o) {
|
|
|
2145
2138
|
const h = document.createElementNS(M, "text");
|
|
2146
2139
|
N(h, {
|
|
2147
2140
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2148
|
-
y: o + parseInt(t.paddingTop) +
|
|
2141
|
+
y: o + parseInt(t.paddingTop) + Qn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
|
|
2149
2142
|
"text-anchor": "start",
|
|
2150
2143
|
"font-family": t.fontFamily,
|
|
2151
2144
|
"font-size": `${t.fontSize}`,
|
|
@@ -2154,7 +2147,7 @@ function Qn(e, t, n, o) {
|
|
|
2154
2147
|
}), h.innerHTML = c, s.appendChild(h);
|
|
2155
2148
|
}), s;
|
|
2156
2149
|
}
|
|
2157
|
-
function
|
|
2150
|
+
function to(e, t, n, o) {
|
|
2158
2151
|
var c;
|
|
2159
2152
|
let s = "";
|
|
2160
2153
|
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
@@ -2171,8 +2164,8 @@ function eo(e, t, n, o) {
|
|
|
2171
2164
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2172
2165
|
}), r.innerHTML = s, i.appendChild(r), i;
|
|
2173
2166
|
}
|
|
2174
|
-
function
|
|
2175
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2167
|
+
function no(e, t) {
|
|
2168
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "rect");
|
|
2176
2169
|
return N(i, {
|
|
2177
2170
|
x: o + "",
|
|
2178
2171
|
y: s + "",
|
|
@@ -2186,7 +2179,7 @@ function to(e, t) {
|
|
|
2186
2179
|
}), i;
|
|
2187
2180
|
}
|
|
2188
2181
|
function te(e, t, n = !1) {
|
|
2189
|
-
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } =
|
|
2182
|
+
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = $(e.nodes, t), r = document.createElementNS(M, "rect");
|
|
2190
2183
|
N(r, {
|
|
2191
2184
|
x: s + "",
|
|
2192
2185
|
y: i + "",
|
|
@@ -2201,10 +2194,10 @@ function te(e, t, n = !1) {
|
|
|
2201
2194
|
const c = document.createElementNS(M, "g");
|
|
2202
2195
|
c.appendChild(r);
|
|
2203
2196
|
let l;
|
|
2204
|
-
return n ? l =
|
|
2197
|
+
return n ? l = to(t, o, s, i) : l = eo(t, o, s, i), c.appendChild(l), c;
|
|
2205
2198
|
}
|
|
2206
|
-
function
|
|
2207
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2199
|
+
function oo(e, t) {
|
|
2200
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "a"), r = document.createElementNS(M, "text");
|
|
2208
2201
|
return N(r, {
|
|
2209
2202
|
x: o + "",
|
|
2210
2203
|
y: s + parseInt(n.fontSize) + "",
|
|
@@ -2215,8 +2208,8 @@ function no(e, t) {
|
|
|
2215
2208
|
fill: `${n.color}`
|
|
2216
2209
|
}), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
|
|
2217
2210
|
}
|
|
2218
|
-
function
|
|
2219
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } =
|
|
2211
|
+
function so(e, t) {
|
|
2212
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(M, "image");
|
|
2220
2213
|
return N(i, {
|
|
2221
2214
|
x: o + "",
|
|
2222
2215
|
y: s + "",
|
|
@@ -2225,41 +2218,41 @@ function oo(e, t) {
|
|
|
2225
2218
|
href: t.src
|
|
2226
2219
|
}), i;
|
|
2227
2220
|
}
|
|
2228
|
-
const ne = 100,
|
|
2229
|
-
var
|
|
2230
|
-
const n = e.nodes, o = n.offsetHeight + ne * 2, s = n.offsetWidth + ne * 2, i =
|
|
2221
|
+
const ne = 100, io = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', ro = (e, t = !1) => {
|
|
2222
|
+
var d, u, g;
|
|
2223
|
+
const n = e.nodes, o = n.offsetHeight + ne * 2, s = n.offsetWidth + ne * 2, i = Zn(o + "px", s + "px"), r = document.createElementNS(M, "svg"), c = document.createElementNS(M, "rect");
|
|
2231
2224
|
N(c, {
|
|
2232
2225
|
x: "0",
|
|
2233
2226
|
y: "0",
|
|
2234
2227
|
width: `${s}`,
|
|
2235
2228
|
height: `${o}`,
|
|
2236
2229
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2237
|
-
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((
|
|
2238
|
-
const
|
|
2239
|
-
|
|
2230
|
+
}), i.appendChild(c), n.querySelectorAll(".subLines").forEach((p) => {
|
|
2231
|
+
const m = p.cloneNode(!0), { offsetLeft: f, offsetTop: v } = $(n, p.parentElement);
|
|
2232
|
+
m.setAttribute("x", `${f}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2240
2233
|
});
|
|
2241
|
-
const l = (
|
|
2234
|
+
const l = (d = n.querySelector(".lines")) == null ? void 0 : d.cloneNode(!0);
|
|
2242
2235
|
l && r.appendChild(l);
|
|
2243
|
-
const h = (
|
|
2236
|
+
const h = (u = n.querySelector(".topiclinks")) == null ? void 0 : u.cloneNode(!0);
|
|
2244
2237
|
h && r.appendChild(h);
|
|
2245
|
-
const a = (
|
|
2246
|
-
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((
|
|
2247
|
-
|
|
2248
|
-
}), n.querySelectorAll(".tags > span").forEach((
|
|
2249
|
-
r.appendChild(te(e,
|
|
2250
|
-
}), n.querySelectorAll(".icons > span").forEach((
|
|
2251
|
-
r.appendChild(te(e,
|
|
2252
|
-
}), n.querySelectorAll(".hyper-link").forEach((
|
|
2253
|
-
r.appendChild(
|
|
2254
|
-
}), n.querySelectorAll("img").forEach((
|
|
2255
|
-
r.appendChild(
|
|
2238
|
+
const a = (g = n.querySelector(".summary")) == null ? void 0 : g.cloneNode(!0);
|
|
2239
|
+
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((p) => {
|
|
2240
|
+
p.nodeObj.dangerouslySetInnerHTML ? r.appendChild(te(e, p, !t)) : (r.appendChild(no(e, p)), r.appendChild(te(e, p.text, !t)));
|
|
2241
|
+
}), n.querySelectorAll(".tags > span").forEach((p) => {
|
|
2242
|
+
r.appendChild(te(e, p));
|
|
2243
|
+
}), n.querySelectorAll(".icons > span").forEach((p) => {
|
|
2244
|
+
r.appendChild(te(e, p));
|
|
2245
|
+
}), n.querySelectorAll(".hyper-link").forEach((p) => {
|
|
2246
|
+
r.appendChild(oo(e, p));
|
|
2247
|
+
}), n.querySelectorAll("img").forEach((p) => {
|
|
2248
|
+
r.appendChild(so(e, p));
|
|
2256
2249
|
}), N(r, {
|
|
2257
2250
|
x: ne + "",
|
|
2258
2251
|
y: ne + "",
|
|
2259
2252
|
overflow: "visible"
|
|
2260
2253
|
}), i.appendChild(r), i;
|
|
2261
|
-
},
|
|
2262
|
-
function
|
|
2254
|
+
}, co = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), io + e.outerHTML);
|
|
2255
|
+
function lo(e) {
|
|
2263
2256
|
return new Promise((t, n) => {
|
|
2264
2257
|
const o = new FileReader();
|
|
2265
2258
|
o.onload = (s) => {
|
|
@@ -2269,11 +2262,11 @@ function co(e) {
|
|
|
2269
2262
|
}, o.readAsDataURL(e);
|
|
2270
2263
|
});
|
|
2271
2264
|
}
|
|
2272
|
-
const
|
|
2273
|
-
const n =
|
|
2265
|
+
const ao = function(e = !1, t) {
|
|
2266
|
+
const n = ro(this, e), o = co(n, t);
|
|
2274
2267
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2275
|
-
},
|
|
2276
|
-
const n = this.exportSvg(e, t), o = await
|
|
2268
|
+
}, ho = async function(e = !1, t) {
|
|
2269
|
+
const n = this.exportSvg(e, t), o = await lo(n);
|
|
2277
2270
|
return new Promise((s, i) => {
|
|
2278
2271
|
const r = new Image();
|
|
2279
2272
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
@@ -2281,67 +2274,67 @@ const lo = function(e = !1, t) {
|
|
|
2281
2274
|
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(s, "image/png", 1);
|
|
2282
2275
|
}, r.src = o, r.onerror = i;
|
|
2283
2276
|
});
|
|
2284
|
-
},
|
|
2277
|
+
}, uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2285
2278
|
__proto__: null,
|
|
2286
|
-
exportPng:
|
|
2287
|
-
exportSvg:
|
|
2279
|
+
exportPng: ho,
|
|
2280
|
+
exportSvg: ao
|
|
2288
2281
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2289
|
-
function
|
|
2282
|
+
function fo(e, t) {
|
|
2290
2283
|
return async function(...n) {
|
|
2291
2284
|
const o = this.before[t];
|
|
2292
2285
|
o && !await o.apply(this, n) || e.apply(this, n);
|
|
2293
2286
|
};
|
|
2294
2287
|
}
|
|
2295
|
-
const
|
|
2296
|
-
for (let e = 0; e <
|
|
2297
|
-
const t =
|
|
2298
|
-
|
|
2288
|
+
const Oe = Object.keys(Xe), tt = {};
|
|
2289
|
+
for (let e = 0; e < Oe.length; e++) {
|
|
2290
|
+
const t = Oe[e];
|
|
2291
|
+
tt[t] = fo(Xe[t], t);
|
|
2299
2292
|
}
|
|
2300
|
-
const
|
|
2293
|
+
const po = {
|
|
2301
2294
|
getObjById: se,
|
|
2302
|
-
generateNewObj:
|
|
2303
|
-
layout:
|
|
2304
|
-
linkDiv:
|
|
2305
|
-
editTopic:
|
|
2306
|
-
createWrapper:
|
|
2307
|
-
createParent:
|
|
2308
|
-
createChildren:
|
|
2309
|
-
createTopic:
|
|
2295
|
+
generateNewObj: st,
|
|
2296
|
+
layout: ct,
|
|
2297
|
+
linkDiv: gt,
|
|
2298
|
+
editTopic: pt,
|
|
2299
|
+
createWrapper: dt,
|
|
2300
|
+
createParent: ht,
|
|
2301
|
+
createChildren: ut,
|
|
2302
|
+
createTopic: ft,
|
|
2310
2303
|
findEle: C,
|
|
2311
|
-
changeTheme:
|
|
2312
|
-
...
|
|
2313
|
-
...
|
|
2314
|
-
...
|
|
2315
|
-
...
|
|
2316
|
-
...
|
|
2304
|
+
changeTheme: qt,
|
|
2305
|
+
...Tn,
|
|
2306
|
+
...tt,
|
|
2307
|
+
...Rn,
|
|
2308
|
+
...Jn,
|
|
2309
|
+
...uo,
|
|
2317
2310
|
init(e) {
|
|
2318
2311
|
if (!e || !e.nodeData)
|
|
2319
2312
|
return new Error("MindElixir: `data` is required");
|
|
2320
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
2313
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, O(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && jt(this), this.keypress && Nt(this), this.editable && Rt(this), nt() && this.mobileMenu ? Ct(this) : this.contextMenu && this.disposable.push(vt(this, this.contextMenuOption)), this.draggable && Mt(this), this.allowUndo && Lt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2321
2314
|
},
|
|
2322
2315
|
destroy() {
|
|
2323
2316
|
var e, t;
|
|
2324
2317
|
this.disposable.forEach((n) => n()), (e = this.mindElixirBox) == null || e.remove(), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNode = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (t = this.selection) == null || t.destroy(), this.selection = void 0;
|
|
2325
2318
|
}
|
|
2326
2319
|
};
|
|
2327
|
-
function
|
|
2320
|
+
function mo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: h }) {
|
|
2328
2321
|
let a = t + n / 2;
|
|
2329
|
-
const
|
|
2330
|
-
let
|
|
2331
|
-
l === "lhs" ?
|
|
2332
|
-
const
|
|
2333
|
-
return l === "lhs" ? a = a - n / 10 -
|
|
2322
|
+
const d = e + o / 2;
|
|
2323
|
+
let u;
|
|
2324
|
+
l === "lhs" ? u = i + r : u = i;
|
|
2325
|
+
const g = s + c / 2, m = (1 - Math.abs(g - d) / h) * 0.25 * (n / 2);
|
|
2326
|
+
return l === "lhs" ? a = a - n / 10 - m : a = a + n / 10 + m, `M ${a} ${d} Q ${a} ${g} ${u} ${g}`;
|
|
2334
2327
|
}
|
|
2335
|
-
function
|
|
2336
|
-
let a = 0,
|
|
2328
|
+
function go({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: h }) {
|
|
2329
|
+
let a = 0, d = 0;
|
|
2337
2330
|
h ? a = e + o / 2 : a = e + o;
|
|
2338
|
-
const
|
|
2339
|
-
let
|
|
2340
|
-
const f = Math.abs(a -
|
|
2341
|
-
return l === "lhs" ? (
|
|
2331
|
+
const u = s + c;
|
|
2332
|
+
let g = 0, p = 0, m = 0;
|
|
2333
|
+
const f = Math.abs(a - u) / 300 * D;
|
|
2334
|
+
return l === "lhs" ? (m = t, g = m + D, p = m - D, d = i + D, `M ${g} ${a} C ${m} ${a} ${m + f} ${u} ${p} ${u} H ${d}`) : (m = t + n, g = m - D, p = m + D, d = i + r - D, `M ${g} ${a} C ${m} ${a} ${m - f} ${u} ${p} ${u} H ${d}`);
|
|
2342
2335
|
}
|
|
2343
|
-
const Y = document;
|
|
2344
|
-
function
|
|
2336
|
+
const vo = "4.1.5", Y = document;
|
|
2337
|
+
function A({
|
|
2345
2338
|
el: e,
|
|
2346
2339
|
direction: t,
|
|
2347
2340
|
locale: n,
|
|
@@ -2353,11 +2346,11 @@ function T({
|
|
|
2353
2346
|
keypress: l,
|
|
2354
2347
|
mouseSelectionButton: h,
|
|
2355
2348
|
before: a,
|
|
2356
|
-
newTopicName:
|
|
2357
|
-
allowUndo:
|
|
2358
|
-
generateMainBranch:
|
|
2359
|
-
generateSubBranch:
|
|
2360
|
-
overflowHidden:
|
|
2349
|
+
newTopicName: d,
|
|
2350
|
+
allowUndo: u,
|
|
2351
|
+
generateMainBranch: g,
|
|
2352
|
+
generateSubBranch: p,
|
|
2353
|
+
overflowHidden: m,
|
|
2361
2354
|
mobileMenu: f,
|
|
2362
2355
|
theme: v
|
|
2363
2356
|
}) {
|
|
@@ -2365,21 +2358,21 @@ function T({
|
|
|
2365
2358
|
const y = Object.prototype.toString.call(e);
|
|
2366
2359
|
if (y === "[object HTMLDivElement]" ? b = e : y === "[object String]" && (b = document.querySelector(e)), !b)
|
|
2367
2360
|
throw new Error("MindElixir: el is not a valid element");
|
|
2368
|
-
b.className += " mind-elixir", b.innerHTML = "", b.style.setProperty("--gap", D + "px"), this.mindElixirBox = b, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = h || 0, this.mobileMenu = f || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName =
|
|
2361
|
+
b.className += " mind-elixir", b.innerHTML = "", b.style.setProperty("--gap", D + "px"), this.mindElixirBox = b, this.disposable = [], this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = h || 0, this.mobileMenu = f || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = d || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = u === void 0 ? !1 : u, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = g || mo, this.generateSubBranch = p || go, this.overflowHidden = m || !1, this.bus = rt.create(), this.container = Y.createElement("div"), this.container.className = "map-container";
|
|
2369
2362
|
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2370
|
-
this.theme = v || (x.matches ?
|
|
2363
|
+
this.theme = v || (x.matches ? Pe : $e);
|
|
2371
2364
|
const w = Y.createElement("div");
|
|
2372
|
-
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = ye(), this.line2 = ye(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" :
|
|
2365
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = ye(), this.line2 = ye(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : it(this);
|
|
2373
2366
|
}
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2367
|
+
A.prototype = po;
|
|
2368
|
+
A.LEFT = L;
|
|
2369
|
+
A.RIGHT = R;
|
|
2370
|
+
A.SIDE = ce;
|
|
2371
|
+
A.THEME = $e;
|
|
2372
|
+
A.DARK_THEME = Pe;
|
|
2373
|
+
A.version = vo;
|
|
2374
|
+
A.E = C;
|
|
2375
|
+
A.new = (e) => ({
|
|
2383
2376
|
nodeData: {
|
|
2384
2377
|
id: G(),
|
|
2385
2378
|
topic: e || "new topic",
|
|
@@ -2387,5 +2380,5 @@ T.new = (e) => ({
|
|
|
2387
2380
|
}
|
|
2388
2381
|
});
|
|
2389
2382
|
export {
|
|
2390
|
-
|
|
2383
|
+
A as default
|
|
2391
2384
|
};
|