mind-elixir 3.2.6 → 3.3.0
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 +8 -8
- package/dist/MindElixir.js +935 -872
- package/dist/MindElixirLite.iife.js +8 -8
- package/dist/MindElixirLite.js +891 -869
- package/dist/types/index.d.ts +2 -1
- package/dist/types/methods.d.ts +1 -0
- package/dist/types/nodeOperation.d.ts +1 -0
- package/dist/types/types/index.d.ts +6 -2
- package/dist/types/utils/LinkDragMoveHelper.d.ts +2 -4
- package/dist/types/utils/domManipulation.d.ts +8 -0
- package/dist/types/utils/dragMoveHelper.d.ts +0 -2
- package/dist/types/utils/index.d.ts +3 -9
- package/dist/types/utils/objectManipulation.d.ts +10 -0
- package/dist/types/utils/pubsub.d.ts +31 -6
- package/package.json +1 -1
- package/readme.md +2 -1
package/dist/MindElixir.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.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;line-height:1.2em;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:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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);line-height:1.2em}.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>div,.map-container me-tpc>span,.map-container me-tpc>img{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:#aaa;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}.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::-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;line-height:1.2em;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:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);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 var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.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);line-height:1.2em}.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>div,.map-container me-tpc>span,.map-container me-tpc>img{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}.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
|
-
var t, n, i, o, s, r, l = '<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>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
|
|
3
|
+
var t, n, o, i, s, r, l = '<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>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (c && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
function h() {
|
|
15
|
-
s || (s = !0,
|
|
15
|
+
s || (s = !0, o());
|
|
16
16
|
}
|
|
17
17
|
t = function() {
|
|
18
18
|
var a, u, d, p;
|
|
19
19
|
(p = document.createElement("div")).innerHTML = l, l = null, (d = p.getElementsByTagName("svg")[0]) && (d.setAttribute("aria-hidden", "true"), d.style.position = "absolute", d.style.width = 0, d.style.height = 0, d.style.overflow = "hidden", a = d, (u = document.body).firstChild ? (p = a, (d = u.firstChild).parentNode.insertBefore(p, d)) : u.appendChild(a));
|
|
20
20
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
21
21
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
22
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (
|
|
22
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, i = e.document, s = !1, (r = function() {
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
i.documentElement.doScroll("left");
|
|
25
25
|
} catch {
|
|
26
26
|
return void setTimeout(r, 50);
|
|
27
27
|
}
|
|
28
28
|
h();
|
|
29
|
-
})(),
|
|
30
|
-
|
|
29
|
+
})(), i.onreadystatechange = function() {
|
|
30
|
+
i.readyState == "complete" && (i.onreadystatechange = null, h());
|
|
31
31
|
});
|
|
32
32
|
})(window);
|
|
33
|
-
const
|
|
33
|
+
const L = 0, z = 1, X = 2, T = 30, M = 8, Le = {
|
|
34
34
|
name: "Latte",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
36
36
|
cssVar: {
|
|
@@ -55,60 +55,60 @@ const S = 0, H = 1, K = 2, M = 30, L = 8, Le = {
|
|
|
55
55
|
"--panel-border-color": "#696969"
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function ne(e) {
|
|
59
59
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const Ye = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), oe = function(e, t) {
|
|
62
62
|
if (t.id === e)
|
|
63
63
|
return t;
|
|
64
64
|
if (t.children && t.children.length) {
|
|
65
65
|
for (let n = 0; n < t.children.length; n++) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
66
|
+
const o = oe(e, t.children[n]);
|
|
67
|
+
if (o)
|
|
68
|
+
return o;
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
} else
|
|
72
72
|
return null;
|
|
73
|
-
},
|
|
73
|
+
}, $ = (e, t) => {
|
|
74
74
|
if (e.parent = t, e.children)
|
|
75
75
|
for (let n = 0; n < e.children.length; n++)
|
|
76
|
-
|
|
76
|
+
$(e.children[n], e);
|
|
77
77
|
};
|
|
78
78
|
function Te(e) {
|
|
79
|
-
if (e.id =
|
|
79
|
+
if (e.id = J(), e.children)
|
|
80
80
|
for (let t = 0; t < e.children.length; t++)
|
|
81
81
|
Te(e.children[t]);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Ge = (e, t) => {
|
|
84
84
|
let n = Date.now();
|
|
85
|
-
return function(...
|
|
86
|
-
Date.now() - n >= t && (e(...
|
|
85
|
+
return function(...o) {
|
|
86
|
+
Date.now() - n >= t && (e(...o), n = Date.now());
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
-
function $e(e, t, n,
|
|
90
|
-
const
|
|
91
|
-
let r = Math.atan(Math.abs(
|
|
92
|
-
s < 0 &&
|
|
89
|
+
function $e(e, t, n, o) {
|
|
90
|
+
const i = o - t, s = e - n;
|
|
91
|
+
let r = Math.atan(Math.abs(i) / Math.abs(s)) / 3.14 * 180;
|
|
92
|
+
s < 0 && i > 0 && (r = 180 - r), s < 0 && i < 0 && (r = 180 + r), s > 0 && i < 0 && (r = 360 - r);
|
|
93
93
|
const l = 15, c = 30, h = r + c, a = r - c;
|
|
94
94
|
return {
|
|
95
95
|
x1: n + Math.cos(Math.PI * h / 180) * l,
|
|
96
|
-
y1:
|
|
96
|
+
y1: o - Math.sin(Math.PI * h / 180) * l,
|
|
97
97
|
x2: n + Math.cos(Math.PI * a / 180) * l,
|
|
98
|
-
y2:
|
|
98
|
+
y2: o - Math.sin(Math.PI * a / 180) * l
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function J() {
|
|
102
102
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
const e =
|
|
104
|
+
const Xe = function() {
|
|
105
|
+
const e = J();
|
|
106
106
|
return {
|
|
107
107
|
topic: this.newTopicName,
|
|
108
108
|
id: e
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
-
function
|
|
111
|
+
function Je(e, t) {
|
|
112
112
|
let n = !0;
|
|
113
113
|
for (; t.parent; ) {
|
|
114
114
|
if (t.parent === e) {
|
|
@@ -119,88 +119,52 @@ function Ge(e, t) {
|
|
|
119
119
|
}
|
|
120
120
|
return n;
|
|
121
121
|
}
|
|
122
|
-
const P = (e) => {
|
|
123
|
-
var i;
|
|
124
|
-
const t = (i = e.parent) == null ? void 0 : i.children, n = t.indexOf(e);
|
|
125
|
-
return { siblings: t, index: n };
|
|
126
|
-
};
|
|
127
|
-
function Je(e) {
|
|
128
|
-
const { siblings: t, index: n } = P(e), i = t[n];
|
|
129
|
-
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = i) : (t[n] = t[n - 1], t[n - 1] = i);
|
|
130
|
-
}
|
|
131
|
-
function Qe(e) {
|
|
132
|
-
const { siblings: t, index: n } = P(e), i = t[n];
|
|
133
|
-
n === t.length - 1 ? (t[n] = t[0], t[0] = i) : (t[n] = t[n + 1], t[n + 1] = i);
|
|
134
|
-
}
|
|
135
|
-
function oe(e) {
|
|
136
|
-
const { siblings: t, index: n } = P(e);
|
|
137
|
-
return t.splice(n, 1), t.length;
|
|
138
|
-
}
|
|
139
|
-
function Ze(e, t) {
|
|
140
|
-
const { siblings: n, index: i } = P(e);
|
|
141
|
-
n.splice(i + 1, 0, t);
|
|
142
|
-
}
|
|
143
|
-
function et(e, t) {
|
|
144
|
-
const { siblings: n, index: i } = P(e);
|
|
145
|
-
n.splice(i, 0, t);
|
|
146
|
-
}
|
|
147
|
-
function tt(e, t) {
|
|
148
|
-
const { siblings: n, index: i } = P(e);
|
|
149
|
-
n[i] = t, t.children = [e];
|
|
150
|
-
}
|
|
151
|
-
function nt(e, t) {
|
|
152
|
-
oe(e), t.children ? t.children.push(e) : t.children = [e];
|
|
153
|
-
}
|
|
154
|
-
function it(e, t) {
|
|
155
|
-
oe(e);
|
|
156
|
-
const { siblings: n, index: i } = P(t);
|
|
157
|
-
n.splice(i, 0, e);
|
|
158
|
-
}
|
|
159
|
-
function ot(e, t) {
|
|
160
|
-
oe(e);
|
|
161
|
-
const { siblings: n, index: i } = P(t);
|
|
162
|
-
n.splice(i + 1, 0, e);
|
|
163
|
-
}
|
|
164
122
|
function De(e) {
|
|
165
123
|
return JSON.parse(
|
|
166
|
-
JSON.stringify(e, (n,
|
|
124
|
+
JSON.stringify(e, (n, o) => {
|
|
167
125
|
if (n !== "parent")
|
|
168
|
-
return
|
|
126
|
+
return o;
|
|
169
127
|
})
|
|
170
128
|
);
|
|
171
129
|
}
|
|
172
|
-
const
|
|
173
|
-
let n = 0,
|
|
130
|
+
const K = (e, t) => {
|
|
131
|
+
let n = 0, o = 0;
|
|
174
132
|
for (; t && t !== e; )
|
|
175
|
-
n += t.offsetLeft,
|
|
176
|
-
return { offsetLeft: n, offsetTop:
|
|
177
|
-
},
|
|
133
|
+
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
134
|
+
return { offsetLeft: n, offsetTop: o };
|
|
135
|
+
}, C = (e, t) => {
|
|
178
136
|
for (const n in t)
|
|
179
137
|
e.setAttribute(n, t[n]);
|
|
180
|
-
},
|
|
138
|
+
}, ae = (e) => e ? e.tagName === "ME-TPC" : !1, S = {
|
|
181
139
|
moved: !1,
|
|
182
140
|
// diffrentiate click and move
|
|
183
141
|
mousedown: !1,
|
|
184
|
-
lastX: 0,
|
|
185
|
-
lastY: 0,
|
|
186
142
|
onMove(e, t) {
|
|
187
143
|
if (this.mousedown) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
const n = this.lastX - e.pageX, i = this.lastY - e.pageY;
|
|
193
|
-
t.scrollTo(t.scrollLeft + n, t.scrollTop + i), this.lastX = e.pageX, this.lastY = e.pageY;
|
|
144
|
+
this.moved = !0;
|
|
145
|
+
const n = e.movementX, o = e.movementY;
|
|
146
|
+
t.scrollTo(t.scrollLeft - n, t.scrollTop - o);
|
|
194
147
|
}
|
|
195
148
|
},
|
|
196
149
|
clear() {
|
|
197
|
-
this.moved = !1, this.mousedown = !1
|
|
150
|
+
this.moved = !1, this.mousedown = !1;
|
|
198
151
|
}
|
|
199
|
-
}
|
|
200
|
-
function
|
|
152
|
+
};
|
|
153
|
+
function Qe(e) {
|
|
201
154
|
e.map.addEventListener("click", (t) => {
|
|
202
|
-
|
|
203
|
-
|
|
155
|
+
var o, i;
|
|
156
|
+
if (t.button !== 0)
|
|
157
|
+
return;
|
|
158
|
+
if ((o = e.helper1) != null && o.moved) {
|
|
159
|
+
e.helper1.clear();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if ((i = e.helper2) != null && i.moved) {
|
|
163
|
+
e.helper2.clear();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (S.moved) {
|
|
167
|
+
S.clear();
|
|
204
168
|
return;
|
|
205
169
|
}
|
|
206
170
|
e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.unselectLink();
|
|
@@ -208,27 +172,30 @@ function st(e) {
|
|
|
208
172
|
if (n.tagName === "ME-EPD")
|
|
209
173
|
e.expandNode(n.previousSibling);
|
|
210
174
|
else if (e.editable)
|
|
211
|
-
|
|
175
|
+
ae(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectLink(n.parentElement) : e.selectSummary(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
|
|
212
176
|
else
|
|
213
177
|
return;
|
|
214
178
|
}), e.map.addEventListener("dblclick", (t) => {
|
|
215
179
|
if (t.preventDefault(), !e.editable)
|
|
216
180
|
return;
|
|
217
181
|
const n = t.target;
|
|
218
|
-
|
|
182
|
+
ae(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editCutsomLinkLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
219
183
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
220
|
-
t.target.contentEditable !== "true" &&
|
|
184
|
+
t.target.contentEditable !== "true" && S.onMove(t, e.container);
|
|
221
185
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
222
|
-
|
|
186
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
187
|
+
t.button === n && t.target.contentEditable !== "true" && (S.moved = !1, S.mousedown = !0);
|
|
223
188
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
224
|
-
|
|
189
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
190
|
+
t.button === n && S.clear();
|
|
225
191
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
226
|
-
|
|
192
|
+
const n = e.mouseSelectionButton === 0 ? 2 : 0;
|
|
193
|
+
t.button === n && S.clear();
|
|
227
194
|
}), e.map.addEventListener("contextmenu", (t) => {
|
|
228
195
|
t.preventDefault();
|
|
229
196
|
});
|
|
230
197
|
}
|
|
231
|
-
const
|
|
198
|
+
const Ze = {
|
|
232
199
|
create() {
|
|
233
200
|
return {
|
|
234
201
|
handlers: {},
|
|
@@ -241,8 +208,8 @@ const rt = {
|
|
|
241
208
|
fire: function(e, ...t) {
|
|
242
209
|
if (this.handlers[e] instanceof Array) {
|
|
243
210
|
const n = this.handlers[e];
|
|
244
|
-
for (let
|
|
245
|
-
n[
|
|
211
|
+
for (let o = 0; o < n.length; o++)
|
|
212
|
+
n[o](...t);
|
|
246
213
|
}
|
|
247
214
|
},
|
|
248
215
|
removeListener: function(e, t) {
|
|
@@ -252,53 +219,53 @@ const rt = {
|
|
|
252
219
|
if (!t)
|
|
253
220
|
n.length = 0;
|
|
254
221
|
else if (n.length)
|
|
255
|
-
for (let
|
|
256
|
-
n[
|
|
222
|
+
for (let o = 0; o < n.length; o++)
|
|
223
|
+
n[o] === t && this.handlers[e].splice(o, 1);
|
|
257
224
|
}
|
|
258
225
|
};
|
|
259
226
|
}
|
|
260
|
-
},
|
|
227
|
+
}, ie = document, et = function() {
|
|
261
228
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
262
229
|
const e = this.createTopic(this.nodeData);
|
|
263
|
-
|
|
264
|
-
const t =
|
|
230
|
+
ue(e, this.nodeData), e.draggable = !1;
|
|
231
|
+
const t = ie.createElement("me-root");
|
|
265
232
|
t.appendChild(e);
|
|
266
233
|
const n = this.nodeData.children || [];
|
|
267
|
-
if (this.direction ===
|
|
268
|
-
let
|
|
234
|
+
if (this.direction === X) {
|
|
235
|
+
let o = 0, i = 0;
|
|
269
236
|
n.map((s) => {
|
|
270
|
-
s.direction ===
|
|
237
|
+
s.direction === L ? o += 1 : s.direction === z ? i += 1 : o <= i ? (s.direction = L, o += 1) : (s.direction = z, i += 1);
|
|
271
238
|
});
|
|
272
239
|
}
|
|
273
|
-
|
|
274
|
-
},
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
|
|
240
|
+
tt(this, n, t), console.timeEnd("layout");
|
|
241
|
+
}, tt = function(e, t, n) {
|
|
242
|
+
const o = ie.createElement("me-main");
|
|
243
|
+
o.className = "lhs";
|
|
244
|
+
const i = ie.createElement("me-main");
|
|
245
|
+
i.className = "rhs";
|
|
279
246
|
for (let s = 0; s < t.length; s++) {
|
|
280
247
|
const r = t[s], { grp: l } = e.createWrapper(r);
|
|
281
|
-
e.direction ===
|
|
248
|
+
e.direction === X ? r.direction === L ? o.appendChild(l) : i.appendChild(l) : e.direction === L ? o.appendChild(l) : i.appendChild(l);
|
|
282
249
|
}
|
|
283
|
-
e.nodes.appendChild(
|
|
284
|
-
},
|
|
285
|
-
const n =
|
|
286
|
-
for (let
|
|
287
|
-
const
|
|
250
|
+
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
|
|
251
|
+
}, nt = function(e, t) {
|
|
252
|
+
const n = ie.createElement("me-children");
|
|
253
|
+
for (let o = 0; o < t.length; o++) {
|
|
254
|
+
const i = t[o], { grp: s } = e.createWrapper(i);
|
|
288
255
|
n.appendChild(s);
|
|
289
256
|
}
|
|
290
257
|
return n;
|
|
291
|
-
}, k = document,
|
|
292
|
-
const
|
|
293
|
-
if (!
|
|
258
|
+
}, k = document, N = (e, t) => {
|
|
259
|
+
const o = (t ? t.mindElixirBox : k).querySelector(`[data-nodeid=me${e}]`);
|
|
260
|
+
if (!o)
|
|
294
261
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
295
|
-
return
|
|
296
|
-
},
|
|
262
|
+
return o;
|
|
263
|
+
}, ue = function(e, t) {
|
|
297
264
|
if (e.innerHTML = "", t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.branchColor && (e.style.borderColor = t.branchColor), t.image) {
|
|
298
265
|
const n = t.image;
|
|
299
266
|
if (n.url && n.width && n.height) {
|
|
300
|
-
const
|
|
301
|
-
|
|
267
|
+
const o = k.createElement("img");
|
|
268
|
+
o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", e.appendChild(o), e.image = o;
|
|
302
269
|
} else
|
|
303
270
|
console.warn("image url/width/height are required");
|
|
304
271
|
} else
|
|
@@ -314,156 +281,156 @@ const rt = {
|
|
|
314
281
|
e.linkContainer && (e.linkContainer = void 0);
|
|
315
282
|
if (t.icons && t.icons.length) {
|
|
316
283
|
const n = k.createElement("span");
|
|
317
|
-
n.className = "icons", n.innerHTML = t.icons.map((
|
|
284
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
318
285
|
} else
|
|
319
286
|
e.icons && (e.icons = void 0);
|
|
320
287
|
if (t.tags && t.tags.length) {
|
|
321
288
|
const n = k.createElement("div");
|
|
322
|
-
n.className = "tags", n.innerHTML = t.tags.map((
|
|
289
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ne(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
323
290
|
} else
|
|
324
291
|
e.tags && (e.tags = void 0);
|
|
325
|
-
},
|
|
326
|
-
const n = k.createElement("me-wrapper"), { p:
|
|
327
|
-
if (n.appendChild(
|
|
328
|
-
const s =
|
|
329
|
-
if (
|
|
330
|
-
const r =
|
|
292
|
+
}, ot = function(e, t) {
|
|
293
|
+
const n = k.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
|
|
294
|
+
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
295
|
+
const s = re(e.expanded);
|
|
296
|
+
if (o.appendChild(s), e.expanded !== !1) {
|
|
297
|
+
const r = nt(this, e.children);
|
|
331
298
|
n.appendChild(r);
|
|
332
299
|
}
|
|
333
300
|
}
|
|
334
|
-
return { grp: n, top:
|
|
335
|
-
},
|
|
301
|
+
return { grp: n, top: o, tpc: i };
|
|
302
|
+
}, it = function(e) {
|
|
336
303
|
const t = k.createElement("me-parent"), n = this.createTopic(e);
|
|
337
|
-
return
|
|
338
|
-
},
|
|
304
|
+
return ue(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
305
|
+
}, st = function(e) {
|
|
339
306
|
const t = k.createElement("me-children");
|
|
340
307
|
return t.append(...e), t;
|
|
341
|
-
},
|
|
308
|
+
}, rt = function(e) {
|
|
342
309
|
const t = k.createElement("me-tpc");
|
|
343
310
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
344
311
|
};
|
|
345
|
-
function
|
|
312
|
+
function je(e) {
|
|
346
313
|
const t = k.createRange();
|
|
347
314
|
t.selectNodeContents(e);
|
|
348
315
|
const n = window.getSelection();
|
|
349
316
|
n && (n.removeAllRanges(), n.addRange(t));
|
|
350
317
|
}
|
|
351
|
-
const
|
|
318
|
+
const lt = function(e) {
|
|
352
319
|
if (console.time("editTopic"), !e)
|
|
353
320
|
return;
|
|
354
321
|
const t = k.createElement("div"), n = e.text.textContent;
|
|
355
|
-
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 ===
|
|
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(), je(t), this.bus.fire("operation", {
|
|
356
323
|
name: "beginEdit",
|
|
357
324
|
obj: e.nodeObj
|
|
358
|
-
}), t.addEventListener("keydown", (
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
if (
|
|
362
|
-
if (
|
|
325
|
+
}), t.addEventListener("keydown", (o) => {
|
|
326
|
+
o.stopPropagation();
|
|
327
|
+
const i = o.key;
|
|
328
|
+
if (i === "Enter" || i === "Tab") {
|
|
329
|
+
if (o.shiftKey)
|
|
363
330
|
return;
|
|
364
|
-
|
|
331
|
+
o.preventDefault(), t == null || t.blur(), this.map.focus();
|
|
365
332
|
}
|
|
366
333
|
}), t.addEventListener("blur", () => {
|
|
367
334
|
var s;
|
|
368
335
|
if (!t)
|
|
369
336
|
return;
|
|
370
|
-
const
|
|
371
|
-
console.log(
|
|
337
|
+
const o = e.nodeObj, i = ((s = t.textContent) == null ? void 0 : s.trim()) || "";
|
|
338
|
+
console.log(i), i === "" ? o.topic = n : o.topic = i, t.remove(), i !== n && (e.text.textContent = o.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
372
339
|
name: "finishEdit",
|
|
373
|
-
obj:
|
|
340
|
+
obj: o,
|
|
374
341
|
origin: n
|
|
375
342
|
}));
|
|
376
343
|
}), console.timeEnd("editTopic");
|
|
377
|
-
},
|
|
344
|
+
}, re = function(e) {
|
|
378
345
|
const t = k.createElement("me-epd");
|
|
379
346
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
380
|
-
},
|
|
381
|
-
const n =
|
|
347
|
+
}, q = document, F = "http://www.w3.org/2000/svg", ct = function(e, t) {
|
|
348
|
+
const n = q.createElementNS(F, "path");
|
|
382
349
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
|
|
383
|
-
},
|
|
384
|
-
const t =
|
|
350
|
+
}, G = function(e) {
|
|
351
|
+
const t = q.createElementNS(F, "svg");
|
|
385
352
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
386
353
|
}, pe = function() {
|
|
387
|
-
const e =
|
|
354
|
+
const e = q.createElementNS(F, "line");
|
|
388
355
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
389
|
-
},
|
|
390
|
-
const n =
|
|
356
|
+
}, at = function(e, t) {
|
|
357
|
+
const n = q.createElementNS(F, "path");
|
|
391
358
|
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#555"), n.setAttribute("fill", "none"), n.setAttribute("stroke-linecap", "square"), n.setAttribute("stroke-width", "2"), n;
|
|
392
|
-
},
|
|
359
|
+
}, dt = function(e, t) {
|
|
393
360
|
const n = {
|
|
394
361
|
stroke: "rgb(235, 95, 82)",
|
|
395
362
|
fill: "none",
|
|
396
363
|
"stroke-linecap": "cap",
|
|
397
364
|
"stroke-width": "2"
|
|
398
|
-
},
|
|
399
|
-
return
|
|
365
|
+
}, o = q.createElementNS(F, "g"), i = q.createElementNS(F, "path"), s = q.createElementNS(F, "path");
|
|
366
|
+
return C(s, {
|
|
400
367
|
d: t,
|
|
401
368
|
...n
|
|
402
|
-
}),
|
|
369
|
+
}), C(i, {
|
|
403
370
|
d: e,
|
|
404
371
|
...n,
|
|
405
372
|
"stroke-dasharray": "8,2"
|
|
406
|
-
}),
|
|
407
|
-
},
|
|
373
|
+
}), o.appendChild(i), o.appendChild(s), o;
|
|
374
|
+
}, Oe = function(e, t, n) {
|
|
408
375
|
if (console.time("editSummary"), !t)
|
|
409
376
|
return;
|
|
410
|
-
const
|
|
411
|
-
e.nodes.appendChild(
|
|
412
|
-
const
|
|
413
|
-
|
|
377
|
+
const o = document.createElement("div");
|
|
378
|
+
e.nodes.appendChild(o);
|
|
379
|
+
const i = t.innerHTML;
|
|
380
|
+
o.id = "input-box", o.textContent = i, o.contentEditable = "true", o.spellcheck = !1;
|
|
414
381
|
const s = t.getAttribute("x") + "px", r = t.getAttribute("y") + "px";
|
|
415
|
-
|
|
382
|
+
o.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${r};`;
|
|
416
383
|
const l = t.getAttribute("text-anchor");
|
|
417
|
-
l === "end" ?
|
|
384
|
+
l === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), je(o), o.addEventListener("keydown", (c) => {
|
|
418
385
|
c.stopPropagation();
|
|
419
386
|
const h = c.key;
|
|
420
387
|
if (h === "Enter" || h === "Tab") {
|
|
421
388
|
if (c.shiftKey)
|
|
422
389
|
return;
|
|
423
|
-
c.preventDefault(),
|
|
390
|
+
c.preventDefault(), o.blur(), e.map.focus();
|
|
424
391
|
}
|
|
425
|
-
}),
|
|
426
|
-
|
|
392
|
+
}), o.addEventListener("blur", () => {
|
|
393
|
+
o && n(o);
|
|
427
394
|
}), console.timeEnd("editSummary");
|
|
428
395
|
};
|
|
429
|
-
let
|
|
430
|
-
const
|
|
396
|
+
let Ae = He;
|
|
397
|
+
const ht = function(e) {
|
|
431
398
|
console.time("linkDiv");
|
|
432
399
|
const t = this.map.querySelector("me-root");
|
|
433
400
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
|
|
434
401
|
const n = this.map.querySelectorAll("me-main > me-wrapper");
|
|
435
|
-
this.lines.innerHTML = "",
|
|
436
|
-
for (let
|
|
437
|
-
const
|
|
402
|
+
this.lines.innerHTML = "", Ae = this.subLinkStyle === 2 ? pt : He;
|
|
403
|
+
for (let o = 0; o < n.length; o++) {
|
|
404
|
+
const i = n[o], s = i.querySelector("me-tpc"), r = i.firstChild, l = i.parentNode.className;
|
|
438
405
|
let c = t.offsetLeft + t.offsetWidth / 2;
|
|
439
406
|
const h = t.offsetTop + t.offsetHeight / 2;
|
|
440
407
|
let a;
|
|
441
|
-
const u = this.theme.palette, d = s.nodeObj.branchColor || u[
|
|
408
|
+
const u = this.theme.palette, d = s.nodeObj.branchColor || u[o % u.length], { offsetLeft: p, offsetTop: g } = K(this.nodes, r);
|
|
442
409
|
l === "lhs" ? a = p + r.offsetWidth : a = p;
|
|
443
410
|
const m = g + r.offsetHeight / 2;
|
|
444
411
|
let f = "";
|
|
445
412
|
if (this.mainLinkStyle === 2)
|
|
446
|
-
this.direction ===
|
|
413
|
+
this.direction === X && (l === "lhs" ? c = c - t.offsetWidth / 6 : c = c + t.offsetWidth / 6), f = ut({ x1: c, y1: h, x2: a, y2: m });
|
|
447
414
|
else {
|
|
448
|
-
const b = (1 - Math.abs(m -
|
|
449
|
-
l === "lhs" ? c = c - t.offsetWidth / 10 - b : c = c + t.offsetWidth / 10 + b, f =
|
|
415
|
+
const b = (1 - Math.abs(m - i.parentElement.offsetTop - i.parentElement.offsetHeight / 2) / i.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
|
|
416
|
+
l === "lhs" ? c = c - t.offsetWidth / 10 - b : c = c + t.offsetWidth / 10 + b, f = ft({ x1: c, y1: h, x2: a, y2: m });
|
|
450
417
|
}
|
|
451
|
-
this.lines.appendChild(
|
|
452
|
-
const v =
|
|
453
|
-
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !==
|
|
454
|
-
const
|
|
455
|
-
b.tagName === "svg" && b.remove(),
|
|
456
|
-
const
|
|
457
|
-
|
|
418
|
+
this.lines.appendChild(ct(f, d));
|
|
419
|
+
const v = i.children[0].children[1];
|
|
420
|
+
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", l === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== i) && i.childElementCount) {
|
|
421
|
+
const y = G("subLines"), b = i.lastChild;
|
|
422
|
+
b.tagName === "svg" && b.remove(), i.appendChild(y);
|
|
423
|
+
const x = i.firstChild, w = i.children[1].children, _ = Pe(w, x, l, !0);
|
|
424
|
+
y.appendChild(at(_, d));
|
|
458
425
|
}
|
|
459
426
|
}
|
|
460
427
|
this.renderCustomLink(), this.renderSummary(), console.timeEnd("linkDiv");
|
|
461
|
-
},
|
|
462
|
-
let
|
|
428
|
+
}, Pe = function(e, t, n, o) {
|
|
429
|
+
let i = "";
|
|
463
430
|
const s = t.offsetTop, r = t.offsetLeft, l = t.offsetWidth, c = t.offsetHeight;
|
|
464
431
|
for (let h = 0; h < e.length; h++) {
|
|
465
432
|
const a = e[h], u = a.firstChild, d = u.offsetTop, p = u.offsetLeft, g = u.offsetWidth, m = u.offsetHeight;
|
|
466
|
-
|
|
433
|
+
i += Ae({ pT: s, pL: r, pW: l, pH: c, cT: d, cL: p, cW: g, cH: m, direction: n, isFirst: o });
|
|
467
434
|
const f = u.children[1];
|
|
468
435
|
if (f) {
|
|
469
436
|
if (f.style.bottom = -(f.offsetHeight / 2) + "px", n === "lhs" ? f.style.left = "10px" : n === "rhs" && (f.style.right = "10px"), !f.expanded)
|
|
@@ -471,30 +438,30 @@ const bt = function(e) {
|
|
|
471
438
|
} else
|
|
472
439
|
continue;
|
|
473
440
|
const v = a.children[1].children;
|
|
474
|
-
v.length > 0 && (
|
|
441
|
+
v.length > 0 && (i += Pe(v, u, n));
|
|
475
442
|
}
|
|
476
|
-
return
|
|
443
|
+
return i;
|
|
477
444
|
};
|
|
478
|
-
function
|
|
479
|
-
return `M ${e} ${t} V ${
|
|
445
|
+
function ut({ x1: e, y1: t, x2: n, y2: o }) {
|
|
446
|
+
return `M ${e} ${t} V ${o > t ? o - 20 : o + 20} C ${e} ${o} ${e} ${o} ${n > e ? e + 20 : e - 20} ${o} H ${n}`;
|
|
480
447
|
}
|
|
481
|
-
function
|
|
482
|
-
return `M ${e} ${t} Q ${e} ${
|
|
448
|
+
function ft({ x1: e, y1: t, x2: n, y2: o }) {
|
|
449
|
+
return `M ${e} ${t} Q ${e} ${o} ${n} ${o}`;
|
|
483
450
|
}
|
|
484
|
-
function
|
|
451
|
+
function pt({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction: c, isFirst: h }) {
|
|
485
452
|
let a;
|
|
486
|
-
h ? a = e +
|
|
487
|
-
const u =
|
|
453
|
+
h ? a = e + o / 2 : a = e + o;
|
|
454
|
+
const u = i + l;
|
|
488
455
|
let d = 0, p = 0, g = 0;
|
|
489
|
-
return c === "lhs" ? (d = t +
|
|
456
|
+
return c === "lhs" ? (d = t + T, p = s, g = s + r) : c === "rhs" && (d = t + n - T, p = s + r, g = s), u < a + 50 && u > a - 50 ? `M ${d} ${a} H ${g} V ${u} H ${p}` : u >= a ? `M ${d} ${a} H ${g} V ${u - M} A ${M} ${M} 0 0 ${d > p ? 1 : 0} ${d > p ? g - M : g + M} ${u} H ${p}` : `M ${d} ${a} H ${g} V ${u + M} A ${M} ${M} 0 0 ${d > p ? 0 : 1} ${d > p ? g - M : g + M} ${u} H ${p}`;
|
|
490
457
|
}
|
|
491
|
-
function He({ pT: e, pL: t, pW: n, pH:
|
|
458
|
+
function He({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: l, direction: c, isFirst: h }) {
|
|
492
459
|
let a = 0, u = 0;
|
|
493
|
-
h ? a = e +
|
|
494
|
-
const d =
|
|
460
|
+
h ? a = e + o / 2 : a = e + o;
|
|
461
|
+
const d = i + l;
|
|
495
462
|
let p = 0, g = 0, m = 0;
|
|
496
|
-
const f = Math.min(Math.abs(a - d) / 800, 1.2) *
|
|
497
|
-
return c === "lhs" ? (m = t, p = m +
|
|
463
|
+
const f = Math.min(Math.abs(a - d) / 800, 1.2) * T;
|
|
464
|
+
return c === "lhs" ? (m = t, p = m + T, g = m - T, u = s + T, `M ${p} ${a} C ${m} ${a} ${m + f} ${d} ${g} ${d} H ${u}`) : (m = t + n, p = m - T, g = m + T, u = s + r - T, `M ${p} ${a} C ${m} ${a} ${m - f} ${d} ${g} ${d} H ${u}`);
|
|
498
465
|
}
|
|
499
466
|
const me = {
|
|
500
467
|
addChild: "插入子节点",
|
|
@@ -577,32 +544,32 @@ const me = {
|
|
|
577
544
|
summary: "Resumo"
|
|
578
545
|
}
|
|
579
546
|
};
|
|
580
|
-
function
|
|
547
|
+
function mt(e, t) {
|
|
581
548
|
const n = (b) => {
|
|
582
|
-
const
|
|
583
|
-
return
|
|
584
|
-
},
|
|
549
|
+
const x = document.createElement("div");
|
|
550
|
+
return x.innerText = b, x.className = "tips", x;
|
|
551
|
+
}, o = (b, x, w) => {
|
|
585
552
|
const _ = document.createElement("li");
|
|
586
|
-
return _.id = b, _.innerHTML = `<span>${
|
|
587
|
-
},
|
|
553
|
+
return _.id = b, _.innerHTML = `<span>${ne(x)}</span><span>${ne(w)}</span>`, _;
|
|
554
|
+
}, i = ge[e.locale] ? e.locale : "en", s = ge[i], r = o("cm-add_child", s.addChild, "tab"), l = o("cm-add_parent", s.addParent, ""), c = o("cm-add_sibling", s.addSibling, "enter"), h = o("cm-remove_child", s.removeNode, "delete"), a = o("cm-fucus", s.focus, ""), u = o("cm-unfucus", s.cancelFocus, ""), d = o("cm-up", s.moveUp, "PgUp"), p = o("cm-down", s.moveDown, "Pgdn"), g = o("cm-down", s.link, ""), m = o("cm-down", s.summary, ""), f = document.createElement("ul");
|
|
588
555
|
if (f.className = "menu-list", f.appendChild(r), f.appendChild(l), f.appendChild(c), f.appendChild(h), (!t || t.focus) && (f.appendChild(a), f.appendChild(u)), f.appendChild(d), f.appendChild(p), f.appendChild(m), (!t || t.link) && f.appendChild(g), t && t.extend)
|
|
589
556
|
for (let b = 0; b < t.extend.length; b++) {
|
|
590
|
-
const
|
|
591
|
-
f.appendChild(
|
|
592
|
-
|
|
557
|
+
const x = t.extend[b], w = o(x.name, x.name, x.key || "");
|
|
558
|
+
f.appendChild(w), w.onclick = (_) => {
|
|
559
|
+
x.onclick(_);
|
|
593
560
|
};
|
|
594
561
|
}
|
|
595
562
|
const v = document.createElement("div");
|
|
596
563
|
v.className = "context-menu", v.appendChild(f), v.hidden = !0, e.container.append(v);
|
|
597
|
-
let
|
|
564
|
+
let y = !0;
|
|
598
565
|
e.container.oncontextmenu = function(b) {
|
|
599
566
|
if (b.preventDefault(), !e.editable)
|
|
600
567
|
return;
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
|
|
568
|
+
const x = b.target;
|
|
569
|
+
if (ae(x)) {
|
|
570
|
+
x.parentElement.tagName === "ME-ROOT" ? y = !0 : y = !1, y ? (a.className = "disabled", d.className = "disabled", p.className = "disabled", l.className = "disabled", c.className = "disabled", h.className = "disabled") : (a.className = "", d.className = "", p.className = "", l.className = "", c.className = "", h.className = ""), e.currentNodes || e.selectNode(x), v.hidden = !1, S.mousedown && (S.mousedown = !1), f.style.top = "", f.style.bottom = "", f.style.left = "", f.style.right = "";
|
|
571
|
+
const w = f.getBoundingClientRect(), _ = f.offsetHeight, P = f.offsetWidth, U = b.clientY - w.top, H = b.clientX - w.left;
|
|
572
|
+
_ + 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");
|
|
606
573
|
}
|
|
607
574
|
}, v.onclick = (b) => {
|
|
608
575
|
b.target === v && (v.hidden = !0);
|
|
@@ -611,25 +578,25 @@ function Et(e, t) {
|
|
|
611
578
|
}, l.onclick = () => {
|
|
612
579
|
e.insertParent(), v.hidden = !0;
|
|
613
580
|
}, c.onclick = () => {
|
|
614
|
-
|
|
581
|
+
y || (e.insertSibling(), v.hidden = !0);
|
|
615
582
|
}, h.onclick = () => {
|
|
616
|
-
|
|
583
|
+
y || (e.removeNode(), v.hidden = !0);
|
|
617
584
|
}, a.onclick = () => {
|
|
618
|
-
|
|
585
|
+
y || (e.focusNode(e.currentNode), v.hidden = !0);
|
|
619
586
|
}, u.onclick = () => {
|
|
620
587
|
e.cancelFocus(), v.hidden = !0;
|
|
621
588
|
}, d.onclick = () => {
|
|
622
|
-
|
|
589
|
+
y || (e.moveUpNode(), v.hidden = !0);
|
|
623
590
|
}, p.onclick = () => {
|
|
624
|
-
|
|
591
|
+
y || (e.moveDownNode(), v.hidden = !0);
|
|
625
592
|
}, g.onclick = () => {
|
|
626
593
|
v.hidden = !0;
|
|
627
|
-
const b = e.currentNode,
|
|
628
|
-
e.container.appendChild(
|
|
594
|
+
const b = e.currentNode, x = n(s.clickTips);
|
|
595
|
+
e.container.appendChild(x), e.map.addEventListener(
|
|
629
596
|
"click",
|
|
630
|
-
(
|
|
631
|
-
|
|
632
|
-
const _ =
|
|
597
|
+
(w) => {
|
|
598
|
+
w.preventDefault(), x.remove();
|
|
599
|
+
const _ = w.target;
|
|
633
600
|
_.parentElement.tagName === "ME-PARENT" || _.parentElement.tagName === "ME-ROOT" ? e.createLink(b, _) : console.log("link cancel");
|
|
634
601
|
},
|
|
635
602
|
{
|
|
@@ -640,16 +607,16 @@ function Et(e, t) {
|
|
|
640
607
|
v.hidden = !0, e.createSummary(), e.unselectNodes();
|
|
641
608
|
};
|
|
642
609
|
}
|
|
643
|
-
const
|
|
610
|
+
const gt = (e) => {
|
|
644
611
|
const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
|
|
645
612
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
646
|
-
},
|
|
613
|
+
}, vt = (e) => {
|
|
647
614
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
648
615
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
649
616
|
}, ve = (e) => {
|
|
650
617
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
651
618
|
};
|
|
652
|
-
function
|
|
619
|
+
function bt(e) {
|
|
653
620
|
const t = {
|
|
654
621
|
13: (n) => {
|
|
655
622
|
n.shiftKey ? e.insertBefore() : e.insertSibling();
|
|
@@ -681,8 +648,8 @@ function _t(e) {
|
|
|
681
648
|
return e.initLeft();
|
|
682
649
|
if (!e.currentNode)
|
|
683
650
|
return;
|
|
684
|
-
const
|
|
685
|
-
e.currentNode.nodeObj.root ?
|
|
651
|
+
const o = e.currentNode.nodeObj, i = e.currentNode.offsetParent.offsetParent.parentElement;
|
|
652
|
+
e.currentNode.nodeObj.root ? gt(e) : i.className === "rhs" ? (s = o.parent) != null && s.root ? ve(e) : e.selectParent() : i.className === "lhs" && e.selectFirstChild();
|
|
686
653
|
},
|
|
687
654
|
39: (n) => {
|
|
688
655
|
var s;
|
|
@@ -690,8 +657,8 @@ function _t(e) {
|
|
|
690
657
|
return e.initRight();
|
|
691
658
|
if (!e.currentNode)
|
|
692
659
|
return;
|
|
693
|
-
const
|
|
694
|
-
|
|
660
|
+
const o = e.currentNode.nodeObj, i = e.currentNode.offsetParent.offsetParent.parentElement;
|
|
661
|
+
o.root ? vt(e) : i.className === "lhs" ? (s = o.parent) != null && s.root ? ve(e) : e.selectParent() : i.className === "rhs" && e.selectFirstChild();
|
|
695
662
|
},
|
|
696
663
|
33() {
|
|
697
664
|
e.moveUpNode();
|
|
@@ -729,20 +696,20 @@ function _t(e) {
|
|
|
729
696
|
e.map.onkeydown = (n) => {
|
|
730
697
|
if (n.preventDefault(), !!e.editable && n.target === n.currentTarget)
|
|
731
698
|
if (n.keyCode === 8 || n.keyCode === 46)
|
|
732
|
-
e.currentLink ? e.removeLink() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.removeNode();
|
|
699
|
+
e.currentLink ? e.removeLink() : e.currentSummary ? e.removeSummary(e.currentSummary.summaryObj.id) : e.currentNode ? e.removeNode() : e.currentNodes && e.removeNodes(e.currentNodes);
|
|
733
700
|
else {
|
|
734
|
-
const
|
|
735
|
-
|
|
701
|
+
const o = t[n.keyCode];
|
|
702
|
+
o && o(n);
|
|
736
703
|
}
|
|
737
704
|
};
|
|
738
705
|
}
|
|
739
|
-
function
|
|
706
|
+
function yt(e, t) {
|
|
740
707
|
const n = (d, p) => {
|
|
741
708
|
const g = document.createElement("div");
|
|
742
709
|
return g.id = d, g.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
743
710
|
<use xlink:href="#icon-${p}"></use>
|
|
744
711
|
</svg>`, g;
|
|
745
|
-
},
|
|
712
|
+
}, o = n("cm-add_child", "zijiedian"), i = n("cm-add_sibling", "tongjijiedian-"), s = n("cm-remove_child", "shanchu2"), r = n("cm-up", "rising"), l = n("cm-down", "falling"), c = n("cm-edit", "edit"), h = document.createElement("ul");
|
|
746
713
|
if (h.className = "menu-list", t && t.extend)
|
|
747
714
|
for (let d = 0; d < t.extend.length; d++) {
|
|
748
715
|
const p = t.extend[d], g = n(p.name, p.name);
|
|
@@ -751,7 +718,7 @@ function kt(e, t) {
|
|
|
751
718
|
};
|
|
752
719
|
}
|
|
753
720
|
const a = document.createElement("mmenu");
|
|
754
|
-
a.className = "mobile-menu", a.appendChild(
|
|
721
|
+
a.className = "mobile-menu", a.appendChild(o), a.appendChild(i), a.appendChild(s), a.appendChild(r), a.appendChild(l), a.appendChild(c), a.hidden = !0, e.container.append(a);
|
|
755
722
|
let u = !0;
|
|
756
723
|
e.bus.addListener("unselectNode", function() {
|
|
757
724
|
a.hidden = !0;
|
|
@@ -759,9 +726,9 @@ function kt(e, t) {
|
|
|
759
726
|
a.hidden = !1, d.root ? u = !0 : u = !1;
|
|
760
727
|
}), a.onclick = (d) => {
|
|
761
728
|
d.target === a && (a.hidden = !0);
|
|
762
|
-
}, i.onclick = () => {
|
|
763
|
-
e.addChild();
|
|
764
729
|
}, o.onclick = () => {
|
|
730
|
+
e.addChild();
|
|
731
|
+
}, i.onclick = () => {
|
|
765
732
|
u || e.insertSibling();
|
|
766
733
|
}, s.onclick = () => {
|
|
767
734
|
u || e.removeNode();
|
|
@@ -773,18 +740,18 @@ function kt(e, t) {
|
|
|
773
740
|
e.beginEdit();
|
|
774
741
|
};
|
|
775
742
|
}
|
|
776
|
-
const
|
|
743
|
+
const de = document, xt = function(e, t) {
|
|
777
744
|
if (!t)
|
|
778
|
-
return
|
|
779
|
-
const n = e.getElementsByClassName("insert-preview"),
|
|
745
|
+
return he(e), e;
|
|
746
|
+
const n = e.getElementsByClassName("insert-preview"), o = `insert-preview ${t} show`;
|
|
780
747
|
if (n.length > 0)
|
|
781
|
-
n[0].className =
|
|
748
|
+
n[0].className = o;
|
|
782
749
|
else {
|
|
783
|
-
const
|
|
784
|
-
|
|
750
|
+
const i = de.createElement("div");
|
|
751
|
+
i.className = o, e.appendChild(i);
|
|
785
752
|
}
|
|
786
753
|
return e;
|
|
787
|
-
},
|
|
754
|
+
}, he = function(e) {
|
|
788
755
|
if (!e)
|
|
789
756
|
return;
|
|
790
757
|
const t = e.getElementsByClassName("insert-preview");
|
|
@@ -793,13 +760,13 @@ const ce = document, St = function(e, t) {
|
|
|
793
760
|
}, be = function(e, t) {
|
|
794
761
|
const n = t.parentElement.parentElement.contains(e);
|
|
795
762
|
return e && e.tagName === "ME-TPC" && e !== t && !n && e.nodeObj.root !== !0;
|
|
796
|
-
},
|
|
763
|
+
}, wt = function(e) {
|
|
797
764
|
const t = document.createElement("div");
|
|
798
765
|
return t.className = "mind-elixir-ghost", e.map.appendChild(t), t;
|
|
799
766
|
};
|
|
800
|
-
function
|
|
801
|
-
let t = null, n = null,
|
|
802
|
-
const
|
|
767
|
+
function Et(e) {
|
|
768
|
+
let t = null, n = null, o = null;
|
|
769
|
+
const i = wt(e), s = 12;
|
|
803
770
|
e.map.addEventListener("dragstart", (r) => {
|
|
804
771
|
var c;
|
|
805
772
|
const l = r.target;
|
|
@@ -807,157 +774,172 @@ function Mt(e) {
|
|
|
807
774
|
r.preventDefault();
|
|
808
775
|
return;
|
|
809
776
|
}
|
|
810
|
-
t = l, t.parentElement.parentElement.style.opacity = "0.5",
|
|
777
|
+
t = l, t.parentElement.parentElement.style.opacity = "0.5", i.innerHTML = t.innerHTML, (c = r.dataTransfer) == null || c.setDragImage(i, 0, 0), S.clear();
|
|
811
778
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
812
779
|
if (!t)
|
|
813
780
|
return;
|
|
814
781
|
t.parentElement.parentElement.style.opacity = "1";
|
|
815
782
|
const l = r.target;
|
|
816
|
-
if (l.style.opacity = "", !
|
|
783
|
+
if (l.style.opacity = "", !o)
|
|
817
784
|
return;
|
|
818
|
-
|
|
785
|
+
he(o);
|
|
819
786
|
const c = t.nodeObj;
|
|
820
787
|
switch (n) {
|
|
821
788
|
case "before":
|
|
822
|
-
e.moveNodeBefore(t,
|
|
789
|
+
e.moveNodeBefore(t, o), e.selectNode(N(c.id));
|
|
823
790
|
break;
|
|
824
791
|
case "after":
|
|
825
|
-
e.moveNodeAfter(t,
|
|
792
|
+
e.moveNodeAfter(t, o), e.selectNode(N(c.id));
|
|
826
793
|
break;
|
|
827
794
|
case "in":
|
|
828
|
-
e.moveNode(t,
|
|
795
|
+
e.moveNode(t, o);
|
|
829
796
|
break;
|
|
830
797
|
}
|
|
831
798
|
t = null;
|
|
832
799
|
}), e.map.addEventListener(
|
|
833
800
|
"dragover",
|
|
834
|
-
|
|
801
|
+
Ge(function(r) {
|
|
835
802
|
if (!t)
|
|
836
803
|
return;
|
|
837
|
-
|
|
838
|
-
const l =
|
|
804
|
+
he(o);
|
|
805
|
+
const l = de.elementFromPoint(r.clientX, r.clientY - s);
|
|
839
806
|
if (be(l, t)) {
|
|
840
|
-
|
|
807
|
+
o = l;
|
|
841
808
|
const c = l.getBoundingClientRect().y;
|
|
842
809
|
r.clientY > c + l.clientHeight ? n = "after" : r.clientY > c + l.clientHeight / 2 && (n = "in");
|
|
843
810
|
} else {
|
|
844
|
-
const c =
|
|
811
|
+
const c = de.elementFromPoint(r.clientX, r.clientY + s);
|
|
845
812
|
if (be(c, t)) {
|
|
846
|
-
|
|
813
|
+
o = c;
|
|
847
814
|
const h = c.getBoundingClientRect().y;
|
|
848
815
|
r.clientY < h ? n = "before" : r.clientY < h + c.clientHeight / 2 && (n = "in");
|
|
849
816
|
} else
|
|
850
|
-
n =
|
|
817
|
+
n = o = null;
|
|
851
818
|
}
|
|
852
|
-
|
|
819
|
+
o && xt(o, n);
|
|
853
820
|
}, 200)
|
|
854
821
|
);
|
|
855
822
|
}
|
|
856
|
-
function
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
823
|
+
const Nt = function(e) {
|
|
824
|
+
return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
|
|
825
|
+
type: "summary",
|
|
826
|
+
value: e.obj.id
|
|
827
|
+
} : ["createCustomLink", "removeCustomLink", "finishEditCustomLinkLabel"].includes(e.name) ? {
|
|
828
|
+
type: "customLink",
|
|
829
|
+
value: e.obj.id
|
|
830
|
+
} : ["removeNodes"].includes(e.name) ? {
|
|
831
|
+
type: "nodes",
|
|
832
|
+
value: e.objs.map((t) => t.id)
|
|
833
|
+
} : {
|
|
834
|
+
type: "node",
|
|
835
|
+
value: e.obj.id
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
function Ct(e) {
|
|
839
|
+
let t = [], n = -1, o = e.getData();
|
|
840
|
+
e.bus.addListener("operation", (i) => {
|
|
841
|
+
if (i.name === "beginEdit")
|
|
860
842
|
return;
|
|
861
843
|
t = t.slice(0, n + 1);
|
|
862
844
|
const s = e.getData();
|
|
863
|
-
t.push({ prev:
|
|
845
|
+
t.push({ prev: o, currentObject: Nt(i), next: s }), o = s, n = t.length - 1;
|
|
864
846
|
}), e.undo = function() {
|
|
865
847
|
if (n > -1) {
|
|
866
|
-
const
|
|
867
|
-
|
|
848
|
+
const i = t[n];
|
|
849
|
+
o = i.prev, e.refresh(i.prev), i.currentObject.type === "node" && e.selectNode(N(i.currentObject.value)), n--, console.log("current", o);
|
|
868
850
|
}
|
|
869
851
|
}, e.redo = function() {
|
|
870
852
|
if (n < t.length - 1) {
|
|
871
853
|
n++;
|
|
872
|
-
const
|
|
873
|
-
|
|
854
|
+
const i = t[n];
|
|
855
|
+
o = i.next, e.refresh(i.next), i.currentObject.type === "node" && e.selectNode(N(i.currentObject.value));
|
|
874
856
|
}
|
|
875
|
-
}, e.map.addEventListener("keydown", (
|
|
876
|
-
(
|
|
857
|
+
}, e.map.addEventListener("keydown", (i) => {
|
|
858
|
+
(i.metaKey || i.ctrlKey) && i.shiftKey && i.key === "Z" ? e.redo() : (i.metaKey || i.ctrlKey) && i.key === "z" && e.undo();
|
|
877
859
|
});
|
|
878
860
|
}
|
|
879
|
-
const
|
|
861
|
+
const R = (e, t) => {
|
|
880
862
|
const n = document.createElement("span");
|
|
881
863
|
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
882
864
|
<use xlink:href="#icon-${t}"></use>
|
|
883
865
|
</svg>`, n;
|
|
884
866
|
};
|
|
885
|
-
function
|
|
886
|
-
const t = document.createElement("div"), n =
|
|
887
|
-
return r.innerText = "100%", t.appendChild(n), t.appendChild(
|
|
867
|
+
function _t(e) {
|
|
868
|
+
const t = document.createElement("div"), n = R("fullscreen", "full"), o = R("toCenter", "living"), i = R("zoomout", "move"), s = R("zoomin", "add"), r = document.createElement("span");
|
|
869
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
888
870
|
e.container.requestFullscreen();
|
|
889
|
-
}, i.onclick = () => {
|
|
890
|
-
e.toCenter();
|
|
891
871
|
}, o.onclick = () => {
|
|
872
|
+
e.toCenter();
|
|
873
|
+
}, i.onclick = () => {
|
|
892
874
|
e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
|
|
893
875
|
}, s.onclick = () => {
|
|
894
876
|
e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
|
|
895
877
|
}, t;
|
|
896
878
|
}
|
|
897
|
-
function
|
|
898
|
-
const t = document.createElement("div"), n =
|
|
899
|
-
return t.appendChild(n), t.appendChild(
|
|
879
|
+
function kt(e) {
|
|
880
|
+
const t = document.createElement("div"), n = R("tbltl", "left"), o = R("tbltr", "right"), i = R("tblts", "side");
|
|
881
|
+
return t.appendChild(n), t.appendChild(o), t.appendChild(i), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
900
882
|
e.initLeft();
|
|
901
|
-
}, i.onclick = () => {
|
|
902
|
-
e.initRight();
|
|
903
883
|
}, o.onclick = () => {
|
|
884
|
+
e.initRight();
|
|
885
|
+
}, i.onclick = () => {
|
|
904
886
|
e.initSide();
|
|
905
887
|
}, t;
|
|
906
888
|
}
|
|
907
|
-
function
|
|
908
|
-
e.container.append(
|
|
889
|
+
function St(e) {
|
|
890
|
+
e.container.append(_t(e)), e.container.append(kt(e));
|
|
909
891
|
}
|
|
910
892
|
/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
911
|
-
var
|
|
912
|
-
class
|
|
893
|
+
var Lt = Object.defineProperty, Mt = (e, t, n) => t in e ? Lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => (Mt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
894
|
+
class Tt {
|
|
913
895
|
constructor() {
|
|
914
|
-
|
|
896
|
+
E(this, "_listeners", /* @__PURE__ */ new Map()), E(this, "on", this.addEventListener), E(this, "off", this.removeEventListener), E(this, "emit", this.dispatchEvent);
|
|
915
897
|
}
|
|
916
898
|
addEventListener(t, n) {
|
|
917
|
-
const
|
|
918
|
-
return this._listeners.set(t,
|
|
899
|
+
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
900
|
+
return this._listeners.set(t, o), o.add(n), this;
|
|
919
901
|
}
|
|
920
902
|
removeEventListener(t, n) {
|
|
921
|
-
var
|
|
922
|
-
return (
|
|
903
|
+
var o;
|
|
904
|
+
return (o = this._listeners.get(t)) == null || o.delete(n), this;
|
|
923
905
|
}
|
|
924
906
|
dispatchEvent(t, ...n) {
|
|
925
|
-
let
|
|
926
|
-
for (const
|
|
927
|
-
|
|
928
|
-
return
|
|
907
|
+
let o = !0;
|
|
908
|
+
for (const i of this._listeners.get(t) ?? [])
|
|
909
|
+
o = i(...n) !== !1 && o;
|
|
910
|
+
return o;
|
|
929
911
|
}
|
|
930
912
|
unbindAllListeners() {
|
|
931
913
|
this._listeners.clear();
|
|
932
914
|
}
|
|
933
915
|
}
|
|
934
916
|
const ye = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
935
|
-
function
|
|
917
|
+
function j({ style: e }, t, n) {
|
|
936
918
|
if (typeof t == "object")
|
|
937
|
-
for (const [
|
|
938
|
-
|
|
919
|
+
for (const [o, i] of Object.entries(t))
|
|
920
|
+
i !== void 0 && (e[o] = ye(i));
|
|
939
921
|
else
|
|
940
922
|
n !== void 0 && (e[t] = ye(n));
|
|
941
923
|
}
|
|
942
924
|
function Be(e) {
|
|
943
|
-
return (t, n,
|
|
925
|
+
return (t, n, o, i = {}) => {
|
|
944
926
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
945
927
|
for (const s of t)
|
|
946
928
|
for (const r of n)
|
|
947
|
-
s[e](r,
|
|
948
|
-
return [t, n,
|
|
929
|
+
s[e](r, o, { capture: !1, ...i });
|
|
930
|
+
return [t, n, o, i];
|
|
949
931
|
};
|
|
950
932
|
}
|
|
951
|
-
const
|
|
933
|
+
const V = Be("addEventListener"), O = Be("removeEventListener"), ee = (e) => {
|
|
952
934
|
var t;
|
|
953
|
-
const { clientX: n, clientY:
|
|
954
|
-
return { x: n, y:
|
|
935
|
+
const { clientX: n, clientY: o, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
936
|
+
return { x: n, y: o, target: i };
|
|
955
937
|
};
|
|
956
938
|
function xe(e, t, n = "touch") {
|
|
957
939
|
switch (n) {
|
|
958
940
|
case "center": {
|
|
959
|
-
const
|
|
960
|
-
return
|
|
941
|
+
const o = t.left + t.width / 2, i = t.top + t.height / 2;
|
|
942
|
+
return o >= e.left && o <= e.right && i >= e.top && i <= e.bottom;
|
|
961
943
|
}
|
|
962
944
|
case "cover":
|
|
963
945
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
@@ -965,32 +947,32 @@ function xe(e, t, n = "touch") {
|
|
|
965
947
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
966
948
|
}
|
|
967
949
|
}
|
|
968
|
-
function
|
|
950
|
+
function W(e, t = document) {
|
|
969
951
|
const n = Array.isArray(e) ? e : [e];
|
|
970
|
-
let
|
|
971
|
-
for (let
|
|
972
|
-
const r = n[
|
|
973
|
-
typeof r == "string" ?
|
|
952
|
+
let o = [];
|
|
953
|
+
for (let i = 0, s = n.length; i < s; i++) {
|
|
954
|
+
const r = n[i];
|
|
955
|
+
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
974
956
|
}
|
|
975
|
-
return
|
|
957
|
+
return o;
|
|
976
958
|
}
|
|
977
|
-
const
|
|
978
|
-
let t, n = -1,
|
|
959
|
+
const $t = () => matchMedia("(hover: none), (pointer: coarse)").matches, Dt = () => "safari" in window, jt = (e) => {
|
|
960
|
+
let t, n = -1, o = !1;
|
|
979
961
|
return {
|
|
980
|
-
next(...
|
|
981
|
-
t =
|
|
982
|
-
e(...t),
|
|
962
|
+
next(...i) {
|
|
963
|
+
t = i, o || (o = !0, n = requestAnimationFrame(() => {
|
|
964
|
+
e(...t), o = !1;
|
|
983
965
|
}));
|
|
984
966
|
},
|
|
985
967
|
cancel() {
|
|
986
|
-
cancelAnimationFrame(n),
|
|
968
|
+
cancelAnimationFrame(n), o = !1;
|
|
987
969
|
}
|
|
988
970
|
};
|
|
989
|
-
}, { abs:
|
|
990
|
-
class ze extends
|
|
971
|
+
}, { abs: B, max: we, min: Ee, ceil: Ne } = Math;
|
|
972
|
+
class ze extends Tt {
|
|
991
973
|
constructor(t) {
|
|
992
|
-
var n,
|
|
993
|
-
super(),
|
|
974
|
+
var n, o, i, s, r;
|
|
975
|
+
super(), E(this, "_options"), E(this, "_selection", {
|
|
994
976
|
stored: [],
|
|
995
977
|
selected: [],
|
|
996
978
|
touched: [],
|
|
@@ -1000,7 +982,7 @@ class ze extends jt {
|
|
|
1000
982
|
removed: []
|
|
1001
983
|
// Removed elements since last selection
|
|
1002
984
|
}
|
|
1003
|
-
}),
|
|
985
|
+
}), 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 = {
|
|
1004
986
|
selectionAreaClass: "selection-area",
|
|
1005
987
|
selectionContainerClass: void 0,
|
|
1006
988
|
selectables: [],
|
|
@@ -1017,11 +999,11 @@ class ze extends jt {
|
|
|
1017
999
|
scrolling: {
|
|
1018
1000
|
speedDivider: 10,
|
|
1019
1001
|
manualSpeed: 750,
|
|
1020
|
-
...(
|
|
1002
|
+
...(o = t.behaviour) == null ? void 0 : o.scrolling,
|
|
1021
1003
|
startScrollMargins: {
|
|
1022
1004
|
x: 0,
|
|
1023
1005
|
y: 0,
|
|
1024
|
-
...(s = (
|
|
1006
|
+
...(s = (i = t.behaviour) == null ? void 0 : i.scrolling) == null ? void 0 : s.startScrollMargins
|
|
1025
1007
|
}
|
|
1026
1008
|
}
|
|
1027
1009
|
},
|
|
@@ -1039,48 +1021,48 @@ class ze extends jt {
|
|
|
1039
1021
|
for (const a of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
1040
1022
|
typeof this[a] == "function" && (this[a] = this[a].bind(this));
|
|
1041
1023
|
const { document: l, selectionAreaClass: c, selectionContainerClass: h } = this._options;
|
|
1042
|
-
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), h && this._clippingElement.classList.add(h),
|
|
1024
|
+
this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), h && this._clippingElement.classList.add(h), j(this._area, {
|
|
1043
1025
|
willChange: "top, left, bottom, right, width, height",
|
|
1044
1026
|
top: 0,
|
|
1045
1027
|
left: 0,
|
|
1046
1028
|
position: "fixed"
|
|
1047
|
-
}),
|
|
1029
|
+
}), j(this._clippingElement, {
|
|
1048
1030
|
overflow: "hidden",
|
|
1049
1031
|
position: "fixed",
|
|
1050
1032
|
transform: "translate3d(0, 0, 0)",
|
|
1051
1033
|
// https://stackoverflow.com/a/38268846
|
|
1052
1034
|
pointerEvents: "none",
|
|
1053
1035
|
zIndex: "1"
|
|
1054
|
-
}), this._frame =
|
|
1036
|
+
}), this._frame = jt((a) => {
|
|
1055
1037
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", a), this._redrawSelectionArea();
|
|
1056
1038
|
}), this.enable();
|
|
1057
1039
|
}
|
|
1058
1040
|
_bindStartEvents(t = !0) {
|
|
1059
|
-
const { document: n, features:
|
|
1060
|
-
|
|
1041
|
+
const { document: n, features: o } = this._options, i = t ? V : O;
|
|
1042
|
+
i(n, "mousedown", this._onTapStart), o.touch && i(n, "touchstart", this._onTapStart, {
|
|
1061
1043
|
passive: !1
|
|
1062
1044
|
});
|
|
1063
1045
|
}
|
|
1064
1046
|
_onTapStart(t, n = !1) {
|
|
1065
|
-
const { x:
|
|
1047
|
+
const { x: o, y: i, target: s } = ee(t), { _options: r } = this, { document: l } = this._options, c = s.getBoundingClientRect(), h = W(r.startAreas, r.document), a = W(r.boundaries, r.document);
|
|
1066
1048
|
this._targetElement = a.find(
|
|
1067
1049
|
(p) => xe(p.getBoundingClientRect(), c)
|
|
1068
1050
|
);
|
|
1069
1051
|
const u = t.composedPath();
|
|
1070
1052
|
if (!this._targetElement || !h.find((p) => u.includes(p)) || !a.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
1071
1053
|
return;
|
|
1072
|
-
this._areaLocation = { x1:
|
|
1054
|
+
this._areaLocation = { x1: o, y1: i, x2: 0, y2: 0 };
|
|
1073
1055
|
const d = l.scrollingElement ?? l.body;
|
|
1074
|
-
this._scrollDelta = { x: d.scrollLeft, y: d.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0),
|
|
1056
|
+
this._scrollDelta = { x: d.scrollLeft, y: d.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), V(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), V(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), V(l, "scroll", this._onScroll);
|
|
1075
1057
|
}
|
|
1076
1058
|
_onSingleTap(t) {
|
|
1077
|
-
const { singleTap: { intersect: n }, range:
|
|
1059
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, i = ee(t);
|
|
1078
1060
|
let s;
|
|
1079
1061
|
if (n === "native")
|
|
1080
|
-
s =
|
|
1062
|
+
s = i.target;
|
|
1081
1063
|
else if (n === "touch") {
|
|
1082
1064
|
this.resolveSelectables();
|
|
1083
|
-
const { x: l, y: c } =
|
|
1065
|
+
const { x: l, y: c } = i;
|
|
1084
1066
|
s = this._selectables.find((h) => {
|
|
1085
1067
|
const { right: a, left: u, top: d, bottom: p } = h.getBoundingClientRect();
|
|
1086
1068
|
return l < a && l > u && c < p && c > d;
|
|
@@ -1094,7 +1076,7 @@ class ze extends jt {
|
|
|
1094
1076
|
s = s.parentElement;
|
|
1095
1077
|
}
|
|
1096
1078
|
const { stored: r } = this._selection;
|
|
1097
|
-
if (this._emitEvent("start", t), t.shiftKey &&
|
|
1079
|
+
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1098
1080
|
const l = this._latestElement, [c, h] = l.compareDocumentPosition(s) & 4 ? [s, l] : [l, s], a = [...this._selectables.filter(
|
|
1099
1081
|
(u) => u.compareDocumentPosition(c) & 4 && u.compareDocumentPosition(h) & 2
|
|
1100
1082
|
), c, h];
|
|
@@ -1104,51 +1086,51 @@ class ze extends jt {
|
|
|
1104
1086
|
this._emitEvent("stop", t);
|
|
1105
1087
|
}
|
|
1106
1088
|
_delayedTapMove(t) {
|
|
1107
|
-
const { container: n, document:
|
|
1089
|
+
const { container: n, document: o, behaviour: { startThreshold: i } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: l, y: c } = ee(t);
|
|
1108
1090
|
if (
|
|
1109
1091
|
// Single number for both coordinates
|
|
1110
|
-
typeof
|
|
1111
|
-
typeof
|
|
1092
|
+
typeof i == "number" && B(l + c - (s + r)) >= i || // Different x and y threshold
|
|
1093
|
+
typeof i == "object" && B(l - s) >= i.x || B(c - r) >= i.y
|
|
1112
1094
|
) {
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1095
|
+
if (O(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1096
|
+
O(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1115
1097
|
return;
|
|
1116
1098
|
}
|
|
1117
|
-
|
|
1099
|
+
V(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), j(this._area, "display", "block"), W(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 && (V(o, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((h) => this._targetElement.contains(h))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1118
1100
|
}
|
|
1119
1101
|
this._handleMoveEvent(t);
|
|
1120
1102
|
}
|
|
1121
1103
|
_setupSelectionArea() {
|
|
1122
|
-
const { _clippingElement: t, _targetElement: n, _area:
|
|
1123
|
-
this._scrollAvailable ? (
|
|
1124
|
-
top:
|
|
1125
|
-
left:
|
|
1126
|
-
width:
|
|
1127
|
-
height:
|
|
1128
|
-
}),
|
|
1129
|
-
marginTop: -
|
|
1130
|
-
marginLeft: -
|
|
1131
|
-
})) : (
|
|
1104
|
+
const { _clippingElement: t, _targetElement: n, _area: o } = this, i = this._targetRect = n.getBoundingClientRect();
|
|
1105
|
+
this._scrollAvailable ? (j(t, {
|
|
1106
|
+
top: i.top,
|
|
1107
|
+
left: i.left,
|
|
1108
|
+
width: i.width,
|
|
1109
|
+
height: i.height
|
|
1110
|
+
}), j(o, {
|
|
1111
|
+
marginTop: -i.top,
|
|
1112
|
+
marginLeft: -i.left
|
|
1113
|
+
})) : (j(t, {
|
|
1132
1114
|
top: 0,
|
|
1133
1115
|
left: 0,
|
|
1134
1116
|
width: "100%",
|
|
1135
1117
|
height: "100%"
|
|
1136
|
-
}),
|
|
1118
|
+
}), j(o, {
|
|
1137
1119
|
marginTop: 0,
|
|
1138
1120
|
marginLeft: 0
|
|
1139
1121
|
}));
|
|
1140
1122
|
}
|
|
1141
1123
|
_onTapMove(t) {
|
|
1142
|
-
const { x: n, y:
|
|
1143
|
-
if (s.x2 = n, s.y2 =
|
|
1124
|
+
const { x: n, y: o } = ee(t), { _scrollSpeed: i, _areaLocation: s, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, h = this._targetElement;
|
|
1125
|
+
if (s.x2 = n, s.y2 = o, this._scrollAvailable && !this._scrollingActive && (i.y || i.x)) {
|
|
1144
1126
|
this._scrollingActive = !0;
|
|
1145
1127
|
const a = () => {
|
|
1146
|
-
if (!
|
|
1128
|
+
if (!i.x && !i.y) {
|
|
1147
1129
|
this._scrollingActive = !1;
|
|
1148
1130
|
return;
|
|
1149
1131
|
}
|
|
1150
1132
|
const { scrollTop: u, scrollLeft: d } = h;
|
|
1151
|
-
|
|
1133
|
+
i.y && (h.scrollTop += Ne(i.y / c), s.y1 -= h.scrollTop - u), i.x && (h.scrollLeft += Ne(i.x / c), s.x1 -= h.scrollLeft - d), l.next(t), requestAnimationFrame(a);
|
|
1152
1134
|
};
|
|
1153
1135
|
requestAnimationFrame(a);
|
|
1154
1136
|
} else
|
|
@@ -1157,38 +1139,38 @@ class ze extends jt {
|
|
|
1157
1139
|
}
|
|
1158
1140
|
_handleMoveEvent(t) {
|
|
1159
1141
|
const { features: n } = this._options;
|
|
1160
|
-
(n.touch &&
|
|
1142
|
+
(n.touch && $t() || this._scrollAvailable && Dt()) && t.preventDefault();
|
|
1161
1143
|
}
|
|
1162
1144
|
_onScroll() {
|
|
1163
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop:
|
|
1164
|
-
this._areaLocation.x1 += t.x -
|
|
1145
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: i } = n.scrollingElement ?? n.body;
|
|
1146
|
+
this._areaLocation.x1 += t.x - i, this._areaLocation.y1 += t.y - o, t.x = i, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1165
1147
|
}
|
|
1166
1148
|
_manualScroll(t) {
|
|
1167
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling,
|
|
1168
|
-
this._scrollSpeed.y +=
|
|
1149
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, i = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1150
|
+
this._scrollSpeed.y += o * n, this._scrollSpeed.x += i * n, this._onTapMove(t), t.preventDefault();
|
|
1169
1151
|
}
|
|
1170
1152
|
_recalculateSelectionAreaRect() {
|
|
1171
|
-
const { _scrollSpeed: t, _areaLocation: n, _areaRect:
|
|
1153
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: i, _options: s } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: h, scrollWidth: a, clientWidth: u } = i, d = this._targetRect, { x1: p, y1: g } = n;
|
|
1172
1154
|
let { x2: m, y2: f } = n;
|
|
1173
1155
|
const { behaviour: { scrolling: { startScrollMargins: v } } } = s;
|
|
1174
|
-
m < d.left + v.x ? (t.x = h ? -
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1156
|
+
m < d.left + v.x ? (t.x = h ? -B(d.left - m + v.x) : 0, m = m < d.left ? d.left : m) : m > d.right - v.x ? (t.x = a - h - u ? B(d.left + d.width - m - v.x) : 0, m = m > d.right ? d.right : m) : t.x = 0, f < d.top + v.y ? (t.y = r ? -B(d.top - f + v.y) : 0, f = f < d.top ? d.top : f) : f > d.bottom - v.y ? (t.y = l - r - c ? B(d.top + d.height - f - v.y) : 0, f = f > d.bottom ? d.bottom : f) : t.y = 0;
|
|
1157
|
+
const y = Ee(p, m), b = Ee(g, f), x = we(p, m), w = we(g, f);
|
|
1158
|
+
o.x = y, o.y = b, o.width = x - y, o.height = w - b;
|
|
1177
1159
|
}
|
|
1178
1160
|
_redrawSelectionArea() {
|
|
1179
|
-
const { x: t, y: n, width:
|
|
1180
|
-
s.left = `${t}px`, s.top = `${n}px`, s.width = `${
|
|
1161
|
+
const { x: t, y: n, width: o, height: i } = this._areaRect, { style: s } = this._area;
|
|
1162
|
+
s.left = `${t}px`, s.top = `${n}px`, s.width = `${o}px`, s.height = `${i}px`;
|
|
1181
1163
|
}
|
|
1182
1164
|
_onTapStop(t, n) {
|
|
1183
|
-
var
|
|
1184
|
-
const { document:
|
|
1185
|
-
|
|
1165
|
+
var o;
|
|
1166
|
+
const { document: i, features: s } = this._options, { _singleClick: r } = this;
|
|
1167
|
+
O(i, ["mousemove", "touchmove"], this._delayedTapMove), O(i, ["touchmove", "mousemove"], this._onTapMove), O(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), O(i, "scroll", this._onScroll), this._keepSelection(), t && r && s.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && O(i, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), j(this._area, "display", "none");
|
|
1186
1168
|
}
|
|
1187
1169
|
_updateElementSelection() {
|
|
1188
|
-
const { _selectables: t, _options: n, _selection:
|
|
1170
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: i } = this, { stored: s, selected: r, touched: l } = o, { intersect: c, overlap: h } = n.behaviour, a = h === "invert", u = [], d = [], p = [];
|
|
1189
1171
|
for (let m = 0; m < t.length; m++) {
|
|
1190
1172
|
const f = t[m];
|
|
1191
|
-
if (xe(
|
|
1173
|
+
if (xe(i, f.getBoundingClientRect(), c)) {
|
|
1192
1174
|
if (r.includes(f))
|
|
1193
1175
|
s.includes(f) && !l.includes(f) && l.push(f);
|
|
1194
1176
|
else if (a && s.includes(f)) {
|
|
@@ -1207,7 +1189,7 @@ class ze extends jt {
|
|
|
1207
1189
|
// not make them part of the current selection as soon as they're touched.
|
|
1208
1190
|
(g && s.includes(f)) && p.push(f);
|
|
1209
1191
|
}
|
|
1210
|
-
|
|
1192
|
+
o.selected = u, o.changed = { added: d, removed: p }, this._latestElement = void 0;
|
|
1211
1193
|
}
|
|
1212
1194
|
_emitEvent(t, n) {
|
|
1213
1195
|
return this.emit(t, {
|
|
@@ -1217,7 +1199,7 @@ class ze extends jt {
|
|
|
1217
1199
|
});
|
|
1218
1200
|
}
|
|
1219
1201
|
_keepSelection() {
|
|
1220
|
-
const { _options: t, _selection: n } = this, { selected:
|
|
1202
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: i, touched: s, stored: r } = n, l = o.filter((c) => !r.includes(c));
|
|
1221
1203
|
switch (t.behaviour.overlap) {
|
|
1222
1204
|
case "drop": {
|
|
1223
1205
|
n.stored = [
|
|
@@ -1230,7 +1212,7 @@ class ze extends jt {
|
|
|
1230
1212
|
case "invert": {
|
|
1231
1213
|
n.stored = [
|
|
1232
1214
|
...l,
|
|
1233
|
-
...r.filter((c) => !
|
|
1215
|
+
...r.filter((c) => !i.removed.includes(c))
|
|
1234
1216
|
// Elements not removed from selection
|
|
1235
1217
|
];
|
|
1236
1218
|
break;
|
|
@@ -1238,7 +1220,7 @@ class ze extends jt {
|
|
|
1238
1220
|
case "keep": {
|
|
1239
1221
|
n.stored = [
|
|
1240
1222
|
...r,
|
|
1241
|
-
...
|
|
1223
|
+
...o.filter((c) => !r.includes(c))
|
|
1242
1224
|
// Newly added
|
|
1243
1225
|
];
|
|
1244
1226
|
break;
|
|
@@ -1258,7 +1240,7 @@ class ze extends jt {
|
|
|
1258
1240
|
* Will update everything which can be selected.
|
|
1259
1241
|
*/
|
|
1260
1242
|
resolveSelectables() {
|
|
1261
|
-
this._selectables =
|
|
1243
|
+
this._selectables = W(this._options.selectables, this._options.document);
|
|
1262
1244
|
}
|
|
1263
1245
|
/**
|
|
1264
1246
|
* Same as deselect, but for all elements currently selected.
|
|
@@ -1266,12 +1248,12 @@ class ze extends jt {
|
|
|
1266
1248
|
* @param quiet If move / stop events should be fired
|
|
1267
1249
|
*/
|
|
1268
1250
|
clearSelection(t = !0, n = !1) {
|
|
1269
|
-
const { selected:
|
|
1251
|
+
const { selected: o, stored: i, changed: s } = this._selection;
|
|
1270
1252
|
s.added = [], s.removed.push(
|
|
1271
|
-
...
|
|
1272
|
-
...t ?
|
|
1253
|
+
...o,
|
|
1254
|
+
...t ? i : []
|
|
1273
1255
|
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
1274
|
-
stored: t ? [] :
|
|
1256
|
+
stored: t ? [] : i,
|
|
1275
1257
|
selected: [],
|
|
1276
1258
|
touched: [],
|
|
1277
1259
|
changed: { added: [], removed: [] }
|
|
@@ -1308,10 +1290,10 @@ class ze extends jt {
|
|
|
1308
1290
|
* @param quiet - If this should not trigger the move event
|
|
1309
1291
|
*/
|
|
1310
1292
|
select(t, n = !1) {
|
|
1311
|
-
const { changed:
|
|
1312
|
-
(l) => !
|
|
1293
|
+
const { changed: o, selected: i, stored: s } = this._selection, r = W(t, this._options.document).filter(
|
|
1294
|
+
(l) => !i.includes(l) && !s.includes(l)
|
|
1313
1295
|
);
|
|
1314
|
-
return s.push(...r),
|
|
1296
|
+
return s.push(...r), i.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
1315
1297
|
}
|
|
1316
1298
|
/**
|
|
1317
1299
|
* Removes a particular element from the selection.
|
|
@@ -1319,20 +1301,20 @@ class ze extends jt {
|
|
|
1319
1301
|
* @param quiet - If this should not trigger the move event
|
|
1320
1302
|
*/
|
|
1321
1303
|
deselect(t, n = !1) {
|
|
1322
|
-
const { selected:
|
|
1323
|
-
(l) =>
|
|
1304
|
+
const { selected: o, stored: i, changed: s } = this._selection, r = W(t, this._options.document).filter(
|
|
1305
|
+
(l) => o.includes(l) || i.includes(l)
|
|
1324
1306
|
);
|
|
1325
|
-
r.length && (this._selection.stored =
|
|
1307
|
+
r.length && (this._selection.stored = i.filter((l) => !r.includes(l)), this._selection.selected = o.filter((l) => !r.includes(l)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1326
1308
|
...r.filter((l) => !s.removed.includes(l))
|
|
1327
1309
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
1328
1310
|
}
|
|
1329
1311
|
}
|
|
1330
|
-
|
|
1331
|
-
function
|
|
1312
|
+
E(ze, "version", "3.3.1");
|
|
1313
|
+
function Ot(e) {
|
|
1332
1314
|
const t = new ze({
|
|
1333
1315
|
selectables: [".map-container me-tpc"],
|
|
1334
1316
|
boundaries: [e.container],
|
|
1335
|
-
container:
|
|
1317
|
+
container: "body",
|
|
1336
1318
|
behaviour: {
|
|
1337
1319
|
// Scroll configuration.
|
|
1338
1320
|
scrolling: {
|
|
@@ -1348,30 +1330,36 @@ function Rt(e) {
|
|
|
1348
1330
|
startScrollMargins: { x: 10, y: 10 }
|
|
1349
1331
|
}
|
|
1350
1332
|
}
|
|
1351
|
-
}).on("beforestart", ({ event: n }) =>
|
|
1333
|
+
}).on("beforestart", ({ event: n }) => {
|
|
1334
|
+
if (n.button !== e.mouseSelectionButton || n.target.tagName === "ME-TPC" || n.target.id === "input-box" || n.target.className === "circle")
|
|
1335
|
+
return !1;
|
|
1336
|
+
const o = t.getSelectionArea();
|
|
1337
|
+
return o.style.background = "#4f90f22d", o.style.border = "1px solid #4f90f2", o.parentElement && (o.parentElement.style.zIndex = "9999"), !0;
|
|
1338
|
+
}).on("start", ({ event: n }) => {
|
|
1352
1339
|
!n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.unselectLink(), t.clearSelection(!0, !0));
|
|
1353
1340
|
}).on(
|
|
1354
1341
|
"move",
|
|
1355
1342
|
({
|
|
1356
1343
|
store: {
|
|
1357
|
-
changed: { added: n, removed:
|
|
1344
|
+
changed: { added: n, removed: o }
|
|
1358
1345
|
}
|
|
1359
1346
|
}) => {
|
|
1360
|
-
|
|
1361
|
-
for (const
|
|
1362
|
-
|
|
1363
|
-
for (const
|
|
1364
|
-
|
|
1347
|
+
S.moved = !0;
|
|
1348
|
+
for (const i of n)
|
|
1349
|
+
i.classList.add("selected");
|
|
1350
|
+
for (const i of o)
|
|
1351
|
+
i.classList.remove("selected");
|
|
1365
1352
|
}
|
|
1366
1353
|
).on("stop", ({ store: { stored: n } }) => {
|
|
1367
|
-
|
|
1354
|
+
e.selectNodes(n);
|
|
1368
1355
|
});
|
|
1356
|
+
e.selection = t;
|
|
1369
1357
|
}
|
|
1370
|
-
const
|
|
1358
|
+
const At = function(e, t = !0) {
|
|
1371
1359
|
this.theme = e;
|
|
1372
|
-
const n = this.theme.cssVar,
|
|
1373
|
-
for (let
|
|
1374
|
-
const s = i
|
|
1360
|
+
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1361
|
+
for (let i = 0; i < o.length; i++) {
|
|
1362
|
+
const s = o[i];
|
|
1375
1363
|
this.mindElixirBox.style.setProperty(s, n[s]);
|
|
1376
1364
|
}
|
|
1377
1365
|
t && this.refresh();
|
|
@@ -1385,17 +1373,17 @@ function Re(e) {
|
|
|
1385
1373
|
theme: e.theme
|
|
1386
1374
|
};
|
|
1387
1375
|
}
|
|
1388
|
-
const
|
|
1376
|
+
const Pt = function(e, t, n) {
|
|
1389
1377
|
if (e) {
|
|
1390
1378
|
if (console.time("selectNode"), typeof e == "string") {
|
|
1391
|
-
const
|
|
1392
|
-
return
|
|
1379
|
+
const o = N(e);
|
|
1380
|
+
return o ? this.selectNode(o) : void 0;
|
|
1393
1381
|
}
|
|
1394
1382
|
this.currentNode && (this.currentNode.className = ""), 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), console.timeEnd("selectNode");
|
|
1395
1383
|
}
|
|
1396
|
-
},
|
|
1384
|
+
}, Ht = function() {
|
|
1397
1385
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
1398
|
-
},
|
|
1386
|
+
}, Bt = function(e) {
|
|
1399
1387
|
if (e) {
|
|
1400
1388
|
console.time("selectNodes");
|
|
1401
1389
|
for (const t of e)
|
|
@@ -1405,12 +1393,12 @@ const Ft = function(e, t, n) {
|
|
|
1405
1393
|
e.map((t) => t.nodeObj)
|
|
1406
1394
|
), console.timeEnd("selectNodes");
|
|
1407
1395
|
}
|
|
1408
|
-
},
|
|
1396
|
+
}, zt = function() {
|
|
1409
1397
|
if (this.currentNodes)
|
|
1410
1398
|
for (const e of this.currentNodes)
|
|
1411
1399
|
e.classList.remove("selected");
|
|
1412
1400
|
this.currentNodes = null, this.bus.fire("unselectNodes");
|
|
1413
|
-
},
|
|
1401
|
+
}, Rt = function() {
|
|
1414
1402
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
1415
1403
|
return !1;
|
|
1416
1404
|
const e = this.currentNode.parentElement.parentElement.nextSibling;
|
|
@@ -1420,7 +1408,7 @@ const Ft = function(e, t, n) {
|
|
|
1420
1408
|
else
|
|
1421
1409
|
return !1;
|
|
1422
1410
|
return this.selectNode(t), !0;
|
|
1423
|
-
},
|
|
1411
|
+
}, qt = function() {
|
|
1424
1412
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
1425
1413
|
return !1;
|
|
1426
1414
|
const e = this.currentNode.parentElement.parentElement.previousSibling;
|
|
@@ -1430,7 +1418,7 @@ const Ft = function(e, t, n) {
|
|
|
1430
1418
|
else
|
|
1431
1419
|
return !1;
|
|
1432
1420
|
return this.selectNode(t), !0;
|
|
1433
|
-
},
|
|
1421
|
+
}, Ft = function() {
|
|
1434
1422
|
if (!this.currentNode)
|
|
1435
1423
|
return;
|
|
1436
1424
|
const e = this.currentNode.parentElement.nextSibling;
|
|
@@ -1438,7 +1426,7 @@ const Ft = function(e, t, n) {
|
|
|
1438
1426
|
const t = e.firstChild.firstChild.firstChild;
|
|
1439
1427
|
this.selectNode(t);
|
|
1440
1428
|
}
|
|
1441
|
-
},
|
|
1429
|
+
}, Vt = function() {
|
|
1442
1430
|
if (!this.currentNode || this.currentNode.dataset.nodeid === "meroot")
|
|
1443
1431
|
return;
|
|
1444
1432
|
const e = this.currentNode.parentElement.parentElement.parentElement.previousSibling;
|
|
@@ -1446,337 +1434,392 @@ const Ft = function(e, t, n) {
|
|
|
1446
1434
|
const t = e.firstChild;
|
|
1447
1435
|
this.selectNode(t);
|
|
1448
1436
|
}
|
|
1449
|
-
},
|
|
1437
|
+
}, Wt = function() {
|
|
1450
1438
|
const e = Re(this);
|
|
1451
1439
|
return JSON.stringify(e, (t, n) => {
|
|
1452
1440
|
if (!(t === "parent" && typeof n != "string"))
|
|
1453
1441
|
return n;
|
|
1454
1442
|
});
|
|
1455
|
-
},
|
|
1443
|
+
}, It = function() {
|
|
1456
1444
|
return JSON.parse(this.getDataString());
|
|
1457
|
-
},
|
|
1445
|
+
}, Kt = function() {
|
|
1458
1446
|
const e = Re(this).nodeData;
|
|
1459
1447
|
let t = "# " + e.topic + `
|
|
1460
1448
|
|
|
1461
1449
|
`;
|
|
1462
|
-
function n(
|
|
1463
|
-
for (let s = 0; s <
|
|
1464
|
-
|
|
1450
|
+
function n(o, i) {
|
|
1451
|
+
for (let s = 0; s < o.length; s++)
|
|
1452
|
+
i <= 6 ? t += "".padStart(i, "#") + " " + o[s].topic + `
|
|
1465
1453
|
|
|
1466
|
-
` : t += "".padStart(
|
|
1467
|
-
`,
|
|
1454
|
+
` : t += "".padStart(i - 7, " ") + "- " + o[s].topic + `
|
|
1455
|
+
`, o[s].children && n(o[s].children || [], i + 1);
|
|
1468
1456
|
}
|
|
1469
1457
|
return n(e.children || [], 2), t;
|
|
1470
|
-
},
|
|
1458
|
+
}, Ut = function() {
|
|
1471
1459
|
this.editable = !0;
|
|
1472
|
-
},
|
|
1460
|
+
}, Yt = function() {
|
|
1473
1461
|
this.editable = !1;
|
|
1474
|
-
},
|
|
1462
|
+
}, Gt = function(e) {
|
|
1475
1463
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
|
|
1476
|
-
},
|
|
1464
|
+
}, Xt = function() {
|
|
1477
1465
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1478
|
-
},
|
|
1466
|
+
}, Jt = function(e) {
|
|
1479
1467
|
e(this);
|
|
1480
|
-
},
|
|
1468
|
+
}, Qt = function(e) {
|
|
1481
1469
|
e.nodeObj.root || (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.nodeData.root = !0, this.initRight(), this.toCenter());
|
|
1482
|
-
},
|
|
1470
|
+
}, Zt = function() {
|
|
1483
1471
|
this.isFocusMode = !1, this.tempDirection !== null && (delete this.nodeData.root, this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1484
|
-
},
|
|
1472
|
+
}, en = function() {
|
|
1485
1473
|
this.direction = 0, this.refresh();
|
|
1486
|
-
},
|
|
1474
|
+
}, tn = function() {
|
|
1487
1475
|
this.direction = 1, this.refresh();
|
|
1488
|
-
},
|
|
1476
|
+
}, nn = function() {
|
|
1489
1477
|
this.direction = 2, this.refresh();
|
|
1490
|
-
},
|
|
1478
|
+
}, on = function(e) {
|
|
1491
1479
|
this.locale = e, this.refresh();
|
|
1492
|
-
},
|
|
1480
|
+
}, sn = function(e, t) {
|
|
1493
1481
|
const n = e.nodeObj;
|
|
1494
1482
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1495
|
-
},
|
|
1496
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}),
|
|
1497
|
-
},
|
|
1483
|
+
}, rn = function(e) {
|
|
1484
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}, this.summaries = e.summaries || []), $(this.nodeData), this.layout(), this.linkDiv();
|
|
1485
|
+
}, ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1498
1486
|
__proto__: null,
|
|
1499
|
-
cancelFocus:
|
|
1500
|
-
disableEdit:
|
|
1501
|
-
enableEdit:
|
|
1502
|
-
expandNode:
|
|
1503
|
-
focusNode:
|
|
1504
|
-
getData:
|
|
1505
|
-
getDataMd:
|
|
1506
|
-
getDataString:
|
|
1507
|
-
initLeft:
|
|
1508
|
-
initRight:
|
|
1509
|
-
initSide:
|
|
1510
|
-
install:
|
|
1511
|
-
refresh:
|
|
1512
|
-
scale:
|
|
1513
|
-
selectFirstChild:
|
|
1514
|
-
selectNextSibling:
|
|
1515
|
-
selectNode:
|
|
1516
|
-
selectNodes:
|
|
1517
|
-
selectParent:
|
|
1518
|
-
selectPrevSibling:
|
|
1519
|
-
setLocale:
|
|
1520
|
-
toCenter:
|
|
1521
|
-
unselectNode:
|
|
1522
|
-
unselectNodes:
|
|
1523
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1487
|
+
cancelFocus: Zt,
|
|
1488
|
+
disableEdit: Yt,
|
|
1489
|
+
enableEdit: Ut,
|
|
1490
|
+
expandNode: sn,
|
|
1491
|
+
focusNode: Qt,
|
|
1492
|
+
getData: It,
|
|
1493
|
+
getDataMd: Kt,
|
|
1494
|
+
getDataString: Wt,
|
|
1495
|
+
initLeft: en,
|
|
1496
|
+
initRight: tn,
|
|
1497
|
+
initSide: nn,
|
|
1498
|
+
install: Jt,
|
|
1499
|
+
refresh: rn,
|
|
1500
|
+
scale: Gt,
|
|
1501
|
+
selectFirstChild: Ft,
|
|
1502
|
+
selectNextSibling: Rt,
|
|
1503
|
+
selectNode: Pt,
|
|
1504
|
+
selectNodes: Bt,
|
|
1505
|
+
selectParent: Vt,
|
|
1506
|
+
selectPrevSibling: qt,
|
|
1507
|
+
setLocale: on,
|
|
1508
|
+
toCenter: Xt,
|
|
1509
|
+
unselectNode: Ht,
|
|
1510
|
+
unselectNodes: zt
|
|
1511
|
+
}, Symbol.toStringTag, { value: "Module" })), A = (e) => {
|
|
1512
|
+
var o;
|
|
1513
|
+
const t = (o = e.parent) == null ? void 0 : o.children, n = t.indexOf(e);
|
|
1514
|
+
return { siblings: t, index: n };
|
|
1515
|
+
};
|
|
1516
|
+
function cn(e) {
|
|
1517
|
+
const { siblings: t, index: n } = A(e), o = t[n];
|
|
1518
|
+
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1519
|
+
}
|
|
1520
|
+
function an(e) {
|
|
1521
|
+
const { siblings: t, index: n } = A(e), o = t[n];
|
|
1522
|
+
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1523
|
+
}
|
|
1524
|
+
function Q(e) {
|
|
1525
|
+
const { siblings: t, index: n } = A(e);
|
|
1526
|
+
return t.splice(n, 1), t.length;
|
|
1527
|
+
}
|
|
1528
|
+
function dn(e, t) {
|
|
1529
|
+
const { siblings: n, index: o } = A(e);
|
|
1530
|
+
n.splice(o + 1, 0, t);
|
|
1531
|
+
}
|
|
1532
|
+
function hn(e, t) {
|
|
1533
|
+
const { siblings: n, index: o } = A(e);
|
|
1534
|
+
n.splice(o, 0, t);
|
|
1535
|
+
}
|
|
1536
|
+
function un(e, t) {
|
|
1537
|
+
const { siblings: n, index: o } = A(e);
|
|
1538
|
+
n[o] = t, t.children = [e];
|
|
1539
|
+
}
|
|
1540
|
+
function fn(e, t) {
|
|
1541
|
+
Q(e), t.children ? t.children.push(e) : t.children = [e];
|
|
1542
|
+
}
|
|
1543
|
+
function pn(e, t) {
|
|
1544
|
+
Q(e);
|
|
1545
|
+
const { siblings: n, index: o } = A(t);
|
|
1546
|
+
n.splice(o, 0, e);
|
|
1547
|
+
}
|
|
1548
|
+
function mn(e, t) {
|
|
1549
|
+
Q(e);
|
|
1550
|
+
const { siblings: n, index: o } = A(t);
|
|
1551
|
+
n.splice(o + 1, 0, e);
|
|
1552
|
+
}
|
|
1553
|
+
const qe = function(e, t) {
|
|
1554
|
+
var n, o;
|
|
1555
|
+
if (e === L)
|
|
1556
|
+
return L;
|
|
1557
|
+
if (e === z)
|
|
1558
|
+
return z;
|
|
1559
|
+
if (e === X) {
|
|
1560
|
+
const i = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, s = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1561
|
+
return i <= s ? (t.direction = L, L) : (t.direction = z, z);
|
|
1562
|
+
}
|
|
1563
|
+
}, Fe = function(e, t) {
|
|
1564
|
+
var l, c;
|
|
1565
|
+
if (!e)
|
|
1566
|
+
return null;
|
|
1567
|
+
const n = e.nodeObj;
|
|
1568
|
+
n.expanded === !1 && (this.expandNode(e, !0), e = N(n.id));
|
|
1569
|
+
const o = t || this.generateNewObj();
|
|
1570
|
+
n.children ? n.children.push(o) : n.children = [o], $(this.nodeData);
|
|
1571
|
+
const i = e.parentElement, { grp: s, top: r } = this.createWrapper(o);
|
|
1572
|
+
if (i.tagName === "ME-PARENT") {
|
|
1573
|
+
if (i.children[1])
|
|
1574
|
+
i.nextSibling.appendChild(s);
|
|
1575
|
+
else {
|
|
1576
|
+
const h = this.createChildren([s]);
|
|
1577
|
+
i.appendChild(re(!0)), i.insertAdjacentElement("afterend", h);
|
|
1578
|
+
}
|
|
1579
|
+
this.linkDiv(s.offsetParent);
|
|
1580
|
+
} else
|
|
1581
|
+
i.tagName === "ME-ROOT" && (qe(this.direction, o) === L ? (l = document.querySelector(".lhs")) == null || l.appendChild(s) : (c = document.querySelector(".rhs")) == null || c.appendChild(s), this.linkDiv());
|
|
1582
|
+
return { newTop: r, newNodeObj: o };
|
|
1583
|
+
}, Ve = function(e, t) {
|
|
1584
|
+
const n = e.parentNode;
|
|
1585
|
+
if (t === 0) {
|
|
1586
|
+
const o = n.parentNode.parentNode;
|
|
1587
|
+
o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
|
|
1588
|
+
}
|
|
1589
|
+
n.parentNode.remove();
|
|
1590
|
+
}, le = function(e) {
|
|
1524
1591
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1525
1592
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1526
|
-
},
|
|
1527
|
-
var n, i;
|
|
1528
|
-
if (e === S)
|
|
1529
|
-
return S;
|
|
1530
|
-
if (e === H)
|
|
1531
|
-
return H;
|
|
1532
|
-
if (e === K) {
|
|
1533
|
-
const o = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, s = ((i = document.querySelector(".rhs")) == null ? void 0 : i.childElementCount) || 0;
|
|
1534
|
-
return o <= s ? (t.direction = S, S) : (t.direction = H, H);
|
|
1535
|
-
}
|
|
1536
|
-
}, pn = function(e, t) {
|
|
1593
|
+
}, gn = function(e, t) {
|
|
1537
1594
|
console.log(t);
|
|
1538
|
-
const n = e.nodeObj,
|
|
1539
|
-
|
|
1540
|
-
const
|
|
1541
|
-
|
|
1595
|
+
const n = e.nodeObj, o = De(n);
|
|
1596
|
+
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1597
|
+
const i = Object.assign(n, t);
|
|
1598
|
+
ue(e, i), this.linkDiv(), this.bus.fire("operation", {
|
|
1542
1599
|
name: "reshapeNode",
|
|
1543
|
-
obj:
|
|
1544
|
-
origin:
|
|
1600
|
+
obj: i,
|
|
1601
|
+
origin: o
|
|
1545
1602
|
});
|
|
1546
|
-
},
|
|
1603
|
+
}, vn = function(e, t) {
|
|
1547
1604
|
var h, a, u;
|
|
1548
1605
|
const n = e || this.currentNode;
|
|
1549
1606
|
if (!n)
|
|
1550
1607
|
return;
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1608
|
+
const o = n.nodeObj;
|
|
1609
|
+
if (o.root === !0) {
|
|
1553
1610
|
this.addChild();
|
|
1554
1611
|
return;
|
|
1555
|
-
} else if (((h =
|
|
1556
|
-
this.addChild(
|
|
1612
|
+
} else if (((h = o.parent) == null ? void 0 : h.root) === !0 && ((u = (a = o.parent) == null ? void 0 : a.children) == null ? void 0 : u.length) === 1) {
|
|
1613
|
+
this.addChild(N(o.parent.id));
|
|
1557
1614
|
return;
|
|
1558
1615
|
}
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1616
|
+
const i = t || this.generateNewObj();
|
|
1617
|
+
dn(o, i), $(this.nodeData);
|
|
1561
1618
|
const s = n.parentElement;
|
|
1562
1619
|
console.time("insertSibling_DOM");
|
|
1563
|
-
const { grp: r, top: l } = this.createWrapper(
|
|
1620
|
+
const { grp: r, top: l } = this.createWrapper(i);
|
|
1564
1621
|
s.parentNode.parentNode.insertBefore(r, s.parentNode.nextSibling), this.linkDiv(r.offsetParent), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
|
|
1565
1622
|
name: "insertSibling",
|
|
1566
|
-
obj:
|
|
1623
|
+
obj: i
|
|
1567
1624
|
});
|
|
1568
|
-
},
|
|
1625
|
+
}, bn = function(e, t) {
|
|
1569
1626
|
const n = e || this.currentNode;
|
|
1570
1627
|
if (!n)
|
|
1571
1628
|
return;
|
|
1572
|
-
const
|
|
1573
|
-
if (
|
|
1629
|
+
const o = n.nodeObj;
|
|
1630
|
+
if (o.root === !0) {
|
|
1574
1631
|
this.addChild();
|
|
1575
1632
|
return;
|
|
1576
1633
|
}
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1634
|
+
const i = t || this.generateNewObj();
|
|
1635
|
+
hn(o, i), $(this.nodeData);
|
|
1579
1636
|
const s = n.parentElement;
|
|
1580
1637
|
console.time("insertSibling_DOM");
|
|
1581
|
-
const { grp: r, top: l } = this.createWrapper(
|
|
1638
|
+
const { grp: r, top: l } = this.createWrapper(i);
|
|
1582
1639
|
s.parentNode.parentNode.insertBefore(r, s.parentNode), this.linkDiv(r.offsetParent), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertSibling_DOM"), this.bus.fire("operation", {
|
|
1583
1640
|
name: "insertBefore",
|
|
1584
|
-
obj:
|
|
1641
|
+
obj: i
|
|
1585
1642
|
});
|
|
1586
|
-
},
|
|
1643
|
+
}, yn = function(e, t) {
|
|
1587
1644
|
const n = e || this.currentNode;
|
|
1588
1645
|
if (!n)
|
|
1589
1646
|
return;
|
|
1590
|
-
|
|
1591
|
-
const
|
|
1592
|
-
if (
|
|
1647
|
+
le(n);
|
|
1648
|
+
const o = n.nodeObj;
|
|
1649
|
+
if (o.root === !0)
|
|
1593
1650
|
return;
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1651
|
+
const i = t || this.generateNewObj();
|
|
1652
|
+
un(o, i), $(this.nodeData);
|
|
1596
1653
|
const s = n.parentElement.parentElement;
|
|
1597
1654
|
console.time("insertParent_DOM");
|
|
1598
|
-
const { grp: r, top: l } = this.createWrapper(
|
|
1599
|
-
l.appendChild(
|
|
1655
|
+
const { grp: r, top: l } = this.createWrapper(i, !0);
|
|
1656
|
+
l.appendChild(re(!0)), s.insertAdjacentElement("afterend", r);
|
|
1600
1657
|
const c = this.createChildren([s]);
|
|
1601
1658
|
l.insertAdjacentElement("afterend", c), this.linkDiv(), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertParent_DOM"), this.bus.fire("operation", {
|
|
1602
1659
|
name: "insertParent",
|
|
1603
|
-
obj:
|
|
1660
|
+
obj: i
|
|
1604
1661
|
});
|
|
1605
|
-
},
|
|
1606
|
-
var l, c;
|
|
1607
|
-
if (!e)
|
|
1608
|
-
return null;
|
|
1609
|
-
const n = e.nodeObj;
|
|
1610
|
-
n.expanded === !1 && (this.expandNode(e, !0), e = E(n.id));
|
|
1611
|
-
const i = t || this.generateNewObj();
|
|
1612
|
-
n.children ? n.children.push(i) : n.children = [i], T(this.nodeData);
|
|
1613
|
-
const o = e.parentElement, { grp: s, top: r } = this.createWrapper(i);
|
|
1614
|
-
if (o.tagName === "ME-PARENT") {
|
|
1615
|
-
if (o.children[1])
|
|
1616
|
-
o.nextSibling.appendChild(s);
|
|
1617
|
-
else {
|
|
1618
|
-
const h = this.createChildren([s]);
|
|
1619
|
-
o.appendChild(se(!0)), o.insertAdjacentElement("afterend", h);
|
|
1620
|
-
}
|
|
1621
|
-
this.linkDiv(s.offsetParent);
|
|
1622
|
-
} else
|
|
1623
|
-
o.tagName === "ME-ROOT" && (qe(this.direction, i) === S ? (l = document.querySelector(".lhs")) == null || l.appendChild(s) : (c = document.querySelector(".rhs")) == null || c.appendChild(s), this.linkDiv());
|
|
1624
|
-
return { newTop: r, newNodeObj: i };
|
|
1625
|
-
}, bn = function(e, t) {
|
|
1662
|
+
}, xn = function(e, t) {
|
|
1626
1663
|
console.time("addChild");
|
|
1627
1664
|
const n = e || this.currentNode;
|
|
1628
1665
|
if (!n)
|
|
1629
1666
|
return;
|
|
1630
|
-
const
|
|
1631
|
-
if (!
|
|
1667
|
+
const o = Fe.call(this, n, t);
|
|
1668
|
+
if (!o)
|
|
1632
1669
|
return;
|
|
1633
|
-
const { newTop:
|
|
1670
|
+
const { newTop: i, newNodeObj: s } = o;
|
|
1634
1671
|
this.bus.fire("operation", {
|
|
1635
1672
|
name: "addChild",
|
|
1636
1673
|
obj: s
|
|
1637
|
-
}), console.timeEnd("addChild"), t || this.editTopic(
|
|
1638
|
-
},
|
|
1674
|
+
}), console.timeEnd("addChild"), t || this.editTopic(i.firstChild), this.selectNode(i.firstChild, !0);
|
|
1675
|
+
}, wn = function(e, t) {
|
|
1639
1676
|
console.time("copyNode");
|
|
1640
1677
|
const n = De(e.nodeObj);
|
|
1641
1678
|
Te(n);
|
|
1642
|
-
const
|
|
1643
|
-
if (!
|
|
1679
|
+
const o = Fe.call(this, t, n);
|
|
1680
|
+
if (!o)
|
|
1644
1681
|
return;
|
|
1645
|
-
const { newNodeObj:
|
|
1682
|
+
const { newNodeObj: i } = o;
|
|
1646
1683
|
console.timeEnd("copyNode"), this.bus.fire("operation", {
|
|
1647
1684
|
name: "copyNode",
|
|
1648
|
-
obj:
|
|
1685
|
+
obj: i
|
|
1649
1686
|
});
|
|
1650
|
-
},
|
|
1687
|
+
}, En = function(e) {
|
|
1651
1688
|
const t = e || this.currentNode;
|
|
1652
1689
|
if (!t)
|
|
1653
1690
|
return;
|
|
1654
|
-
const n = t.
|
|
1655
|
-
|
|
1691
|
+
const n = t.nodeObj;
|
|
1692
|
+
cn(n);
|
|
1693
|
+
const o = t.parentNode.parentNode;
|
|
1694
|
+
o.parentNode.insertBefore(o, o.previousSibling), this.linkDiv(), this.bus.fire("operation", {
|
|
1656
1695
|
name: "moveUpNode",
|
|
1657
|
-
obj:
|
|
1696
|
+
obj: n
|
|
1658
1697
|
});
|
|
1659
|
-
},
|
|
1698
|
+
}, Nn = function(e) {
|
|
1660
1699
|
const t = e || this.currentNode;
|
|
1661
1700
|
if (!t)
|
|
1662
1701
|
return;
|
|
1663
|
-
const n = t.
|
|
1664
|
-
|
|
1702
|
+
const n = t.nodeObj;
|
|
1703
|
+
an(n);
|
|
1704
|
+
const o = t.parentNode.parentNode;
|
|
1705
|
+
o.nextSibling ? o.nextSibling.insertAdjacentElement("afterend", o) : o.parentNode.prepend(o), this.linkDiv(), this.bus.fire("operation", {
|
|
1665
1706
|
name: "moveDownNode",
|
|
1666
|
-
obj:
|
|
1707
|
+
obj: n
|
|
1667
1708
|
});
|
|
1668
|
-
},
|
|
1669
|
-
var
|
|
1709
|
+
}, Cn = function(e) {
|
|
1710
|
+
var r;
|
|
1670
1711
|
const t = e || this.currentNode;
|
|
1671
1712
|
if (!t)
|
|
1672
1713
|
return;
|
|
1673
1714
|
const n = t.nodeObj;
|
|
1674
1715
|
if (n.root === !0)
|
|
1675
1716
|
throw new Error("Can not remove root node");
|
|
1676
|
-
const
|
|
1677
|
-
if (s
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1681
|
-
if (i.length !== 0) {
|
|
1682
|
-
const c = i[o] || i[o - 1];
|
|
1683
|
-
this.selectNode(E(c.id));
|
|
1717
|
+
const o = n.parent.children, i = o.findIndex((l) => l === n), s = Q(n);
|
|
1718
|
+
if (Ve(t, s), o.length !== 0) {
|
|
1719
|
+
const l = o[i] || o[i - 1];
|
|
1720
|
+
this.selectNode(N(l.id));
|
|
1684
1721
|
} else
|
|
1685
|
-
this.selectNode(
|
|
1686
|
-
|
|
1722
|
+
this.selectNode(N(n.parent.id));
|
|
1723
|
+
this.linkDiv(), this.bus.fire("operation", {
|
|
1687
1724
|
name: "removeNode",
|
|
1688
1725
|
obj: n,
|
|
1689
|
-
originIndex:
|
|
1690
|
-
originParentId: (
|
|
1726
|
+
originIndex: i,
|
|
1727
|
+
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1728
|
+
});
|
|
1729
|
+
}, _n = function(e) {
|
|
1730
|
+
for (const t of e) {
|
|
1731
|
+
const n = t.nodeObj;
|
|
1732
|
+
if (n.root === !0)
|
|
1733
|
+
continue;
|
|
1734
|
+
const o = Q(n);
|
|
1735
|
+
Ve(t, o);
|
|
1736
|
+
}
|
|
1737
|
+
this.linkDiv(), this.bus.fire("operation", {
|
|
1738
|
+
name: "removeNodes",
|
|
1739
|
+
objs: e.map((t) => t.nodeObj)
|
|
1691
1740
|
});
|
|
1692
|
-
},
|
|
1741
|
+
}, kn = function(e, t) {
|
|
1693
1742
|
var l;
|
|
1694
|
-
const n = e.nodeObj,
|
|
1695
|
-
if (
|
|
1743
|
+
const n = e.nodeObj, o = t.nodeObj, i = (l = n == null ? void 0 : n.parent) == null ? void 0 : l.id;
|
|
1744
|
+
if (o.expanded === !1 && (this.expandNode(t, !0), e = N(n.id), t = N(o.id)), !Je(n, o)) {
|
|
1696
1745
|
console.warn("Invalid move");
|
|
1697
1746
|
return;
|
|
1698
1747
|
}
|
|
1699
|
-
console.time("moveNode"),
|
|
1748
|
+
console.time("moveNode"), fn(n, o), $(this.nodeData);
|
|
1700
1749
|
const s = e.parentElement, r = t.parentElement;
|
|
1701
1750
|
if (r.tagName === "ME-PARENT")
|
|
1702
|
-
if (
|
|
1751
|
+
if (le(e), r.children[1])
|
|
1703
1752
|
r.nextSibling.appendChild(s.parentElement);
|
|
1704
1753
|
else {
|
|
1705
1754
|
const c = this.createChildren([s.parentElement]);
|
|
1706
|
-
r.appendChild(
|
|
1755
|
+
r.appendChild(re(!0)), r.parentElement.insertBefore(c, r.nextSibling);
|
|
1707
1756
|
}
|
|
1708
1757
|
else
|
|
1709
1758
|
r.tagName === "ME-ROOT" && (qe(this.direction, n), r.nextSibling.appendChild(s.parentElement));
|
|
1710
1759
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1711
1760
|
name: "moveNode",
|
|
1712
1761
|
obj: n,
|
|
1713
|
-
toObj:
|
|
1714
|
-
originParentId:
|
|
1762
|
+
toObj: o,
|
|
1763
|
+
originParentId: i
|
|
1715
1764
|
}), console.timeEnd("moveNode");
|
|
1716
|
-
},
|
|
1717
|
-
var
|
|
1718
|
-
const n = e.nodeObj,
|
|
1719
|
-
|
|
1720
|
-
const
|
|
1721
|
-
t.parentElement.parentNode.insertAdjacentElement("beforebegin",
|
|
1765
|
+
}, Sn = function(e, t) {
|
|
1766
|
+
var l;
|
|
1767
|
+
const n = e.nodeObj, o = t.nodeObj, i = (l = n.parent) == null ? void 0 : l.id;
|
|
1768
|
+
pn(n, o), $(this.nodeData), le(e);
|
|
1769
|
+
const s = e.parentElement.parentNode;
|
|
1770
|
+
t.parentElement.parentNode.insertAdjacentElement("beforebegin", s), this.linkDiv(), this.bus.fire("operation", {
|
|
1722
1771
|
name: "moveNodeBefore",
|
|
1723
1772
|
obj: n,
|
|
1724
|
-
toObj:
|
|
1725
|
-
originParentId:
|
|
1773
|
+
toObj: o,
|
|
1774
|
+
originParentId: i
|
|
1726
1775
|
});
|
|
1727
|
-
},
|
|
1728
|
-
var
|
|
1729
|
-
const n = e.nodeObj,
|
|
1730
|
-
|
|
1731
|
-
const
|
|
1732
|
-
t.parentElement.
|
|
1776
|
+
}, Ln = function(e, t) {
|
|
1777
|
+
var l;
|
|
1778
|
+
const n = e.nodeObj, o = t.nodeObj, i = (l = n.parent) == null ? void 0 : l.id;
|
|
1779
|
+
mn(n, o), $(this.nodeData), le(e);
|
|
1780
|
+
const s = e.parentElement.parentNode;
|
|
1781
|
+
t.parentElement.parentNode.insertAdjacentElement("afterend", s), this.linkDiv(), this.bus.fire("operation", {
|
|
1733
1782
|
name: "moveNodeAfter",
|
|
1734
1783
|
obj: n,
|
|
1735
|
-
toObj:
|
|
1736
|
-
originParentId:
|
|
1784
|
+
toObj: o,
|
|
1785
|
+
originParentId: i
|
|
1737
1786
|
});
|
|
1738
|
-
},
|
|
1787
|
+
}, Mn = function(e) {
|
|
1739
1788
|
const t = e || this.currentNode;
|
|
1740
1789
|
t && this.editTopic(t);
|
|
1741
|
-
},
|
|
1790
|
+
}, Tn = function(e, t) {
|
|
1742
1791
|
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1743
|
-
},
|
|
1792
|
+
}, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1744
1793
|
__proto__: null,
|
|
1745
|
-
addChild:
|
|
1746
|
-
beginEdit:
|
|
1747
|
-
copyNode:
|
|
1748
|
-
insertBefore:
|
|
1749
|
-
insertParent:
|
|
1750
|
-
insertSibling:
|
|
1751
|
-
moveDownNode:
|
|
1752
|
-
moveNode:
|
|
1753
|
-
moveNodeAfter:
|
|
1754
|
-
moveNodeBefore:
|
|
1755
|
-
moveUpNode:
|
|
1756
|
-
removeNode:
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1794
|
+
addChild: xn,
|
|
1795
|
+
beginEdit: Mn,
|
|
1796
|
+
copyNode: wn,
|
|
1797
|
+
insertBefore: bn,
|
|
1798
|
+
insertParent: yn,
|
|
1799
|
+
insertSibling: vn,
|
|
1800
|
+
moveDownNode: Nn,
|
|
1801
|
+
moveNode: kn,
|
|
1802
|
+
moveNodeAfter: Ln,
|
|
1803
|
+
moveNodeBefore: Sn,
|
|
1804
|
+
moveUpNode: En,
|
|
1805
|
+
removeNode: Cn,
|
|
1806
|
+
removeNodes: _n,
|
|
1807
|
+
reshapeNode: gn,
|
|
1808
|
+
setNodeTopic: Tn
|
|
1809
|
+
}, Symbol.toStringTag, { value: "Module" })), $n = function(e) {
|
|
1760
1810
|
return {
|
|
1761
1811
|
dom: e,
|
|
1812
|
+
moved: !1,
|
|
1813
|
+
// diffrentiate click and move
|
|
1762
1814
|
mousedown: !1,
|
|
1763
|
-
lastX: 0,
|
|
1764
|
-
lastY: 0,
|
|
1765
1815
|
handleMouseMove(t) {
|
|
1766
|
-
|
|
1767
|
-
if (!this.lastX) {
|
|
1768
|
-
this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1769
|
-
return;
|
|
1770
|
-
}
|
|
1771
|
-
const n = this.lastX - t.pageX, i = this.lastY - t.pageY;
|
|
1772
|
-
this.cb && this.cb(n, i), this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1773
|
-
}
|
|
1816
|
+
this.mousedown && (this.moved = !0, this.cb && this.cb(t.movementX, t.movementY));
|
|
1774
1817
|
},
|
|
1775
1818
|
handleMouseDown(t) {
|
|
1776
|
-
this.mousedown = !0;
|
|
1819
|
+
t.button === 0 && (this.mousedown = !0);
|
|
1777
1820
|
},
|
|
1778
1821
|
handleClear(t) {
|
|
1779
|
-
this.
|
|
1822
|
+
this.mousedown = !1;
|
|
1780
1823
|
},
|
|
1781
1824
|
cb: null,
|
|
1782
1825
|
init(t, n) {
|
|
@@ -1786,14 +1829,14 @@ const Ft = function(e, t, n) {
|
|
|
1786
1829
|
t.removeEventListener("mousemove", this.handleMouseMove), t.removeEventListener("mouseleave", this.handleClear), t.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
|
|
1787
1830
|
},
|
|
1788
1831
|
clear() {
|
|
1789
|
-
this.
|
|
1832
|
+
this.moved = !1, this.mousedown = !1;
|
|
1790
1833
|
}
|
|
1791
1834
|
};
|
|
1792
1835
|
}, Ce = {
|
|
1793
|
-
create:
|
|
1836
|
+
create: $n
|
|
1794
1837
|
};
|
|
1795
|
-
function
|
|
1796
|
-
const { offsetLeft:
|
|
1838
|
+
function se(e, t, n) {
|
|
1839
|
+
const { offsetLeft: o, offsetTop: i } = K(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, l = o + s / 2, c = i + r / 2, h = l + n.x, a = c + n.y;
|
|
1797
1840
|
return {
|
|
1798
1841
|
w: s,
|
|
1799
1842
|
h: r,
|
|
@@ -1803,37 +1846,35 @@ function ie(e, t, n) {
|
|
|
1803
1846
|
ctrlY: a
|
|
1804
1847
|
};
|
|
1805
1848
|
}
|
|
1806
|
-
function
|
|
1849
|
+
function I(e) {
|
|
1807
1850
|
let t, n;
|
|
1808
|
-
const
|
|
1809
|
-
return
|
|
1851
|
+
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1852
|
+
return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
|
|
1810
1853
|
x: t,
|
|
1811
1854
|
y: n
|
|
1812
1855
|
};
|
|
1813
1856
|
}
|
|
1814
|
-
const
|
|
1815
|
-
const
|
|
1816
|
-
return
|
|
1857
|
+
const Dn = function(e, t, n, o) {
|
|
1858
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1859
|
+
return C(i, {
|
|
1817
1860
|
"text-anchor": "middle",
|
|
1818
1861
|
x: t + "",
|
|
1819
1862
|
y: n + "",
|
|
1820
|
-
fill:
|
|
1821
|
-
}),
|
|
1822
|
-
},
|
|
1863
|
+
fill: o || "#666"
|
|
1864
|
+
}), i.dataset.type = "custom-link", i.innerHTML = e, i;
|
|
1865
|
+
}, jn = function(e, t, n, o) {
|
|
1823
1866
|
if (!e || !t)
|
|
1824
1867
|
return;
|
|
1825
|
-
const
|
|
1826
|
-
this.hideLinkController();
|
|
1827
|
-
const s = ie(this, e, n.delta1), r = ie(this, t, n.delta2), { x: l, y: c } = V(s), { ctrlX: h, ctrlY: a } = s, { ctrlX: u, ctrlY: d } = r, { x: p, y: g } = V(r), m = $e(u, d, p, g), f = vt(
|
|
1868
|
+
const i = performance.now(), s = se(this, e, n.delta1), r = se(this, t, n.delta2), { x: l, y: c } = I(s), { ctrlX: h, ctrlY: a } = s, { ctrlX: u, ctrlY: d } = r, { x: p, y: g } = I(r), m = $e(u, d, p, g), f = dt(
|
|
1828
1869
|
`M ${l} ${c} C ${h} ${a} ${u} ${d} ${p} ${g}`,
|
|
1829
1870
|
`M ${m.x1} ${m.y1} L ${p} ${g} L ${m.x2} ${m.y2}`
|
|
1830
|
-
), v = l / 8 + h * 3 / 8 + u * 3 / 8 + p / 8,
|
|
1831
|
-
f.appendChild(b), f.linkObj = n, f.dataset.linkid = n.id, this.linkSvgGroup.appendChild(f),
|
|
1832
|
-
const
|
|
1833
|
-
console.log(`DrawCustomLink Execution time: ${
|
|
1834
|
-
},
|
|
1871
|
+
), v = l / 8 + h * 3 / 8 + u * 3 / 8 + p / 8, y = c / 8 + a * 3 / 8 + d * 3 / 8 + g / 8, b = Dn(n.label, v, y, this.theme.cssVar["--color"]);
|
|
1872
|
+
f.appendChild(b), f.linkObj = n, f.dataset.linkid = n.id, this.linkSvgGroup.appendChild(f), o || (this.linkData[n.id] = n, this.currentLink = f, this.showLinkController(n, s, r));
|
|
1873
|
+
const x = performance.now();
|
|
1874
|
+
console.log(`DrawCustomLink Execution time: ${x - i} ms`);
|
|
1875
|
+
}, On = function(e, t) {
|
|
1835
1876
|
const n = {
|
|
1836
|
-
id:
|
|
1877
|
+
id: J(),
|
|
1837
1878
|
label: "Custom Link",
|
|
1838
1879
|
from: e.nodeObj.id,
|
|
1839
1880
|
to: t.nodeObj.id,
|
|
@@ -1846,60 +1887,69 @@ const Mn = function(e, t, n, i) {
|
|
|
1846
1887
|
y: -200
|
|
1847
1888
|
}
|
|
1848
1889
|
};
|
|
1849
|
-
this.drawCustomLink(e, t, n)
|
|
1850
|
-
|
|
1890
|
+
this.drawCustomLink(e, t, n), this.bus.fire("operation", {
|
|
1891
|
+
name: "createCustomLink",
|
|
1892
|
+
obj: n
|
|
1893
|
+
});
|
|
1894
|
+
}, An = function(e) {
|
|
1851
1895
|
let t;
|
|
1852
1896
|
if (e ? t = e : t = this.currentLink, !t)
|
|
1853
1897
|
return;
|
|
1854
1898
|
this.hideLinkController();
|
|
1855
1899
|
const n = t.linkObj.id;
|
|
1856
|
-
delete this.linkData[n], t.remove()
|
|
1857
|
-
|
|
1900
|
+
delete this.linkData[n], t.remove(), this.bus.fire("operation", {
|
|
1901
|
+
name: "removeCustomLink",
|
|
1902
|
+
obj: {
|
|
1903
|
+
id: n
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
}, Pn = function(e) {
|
|
1858
1907
|
this.currentLink = e;
|
|
1859
|
-
const t = e.linkObj, n =
|
|
1860
|
-
this.showLinkController(t,
|
|
1861
|
-
},
|
|
1908
|
+
const t = e.linkObj, n = N(t.from), o = N(t.to), i = se(this, n, t.delta1), s = se(this, o, t.delta2);
|
|
1909
|
+
this.showLinkController(t, i, s);
|
|
1910
|
+
}, Hn = function() {
|
|
1862
1911
|
this.currentLink = null, this.hideLinkController();
|
|
1863
|
-
},
|
|
1912
|
+
}, Bn = function() {
|
|
1864
1913
|
this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
|
|
1865
|
-
},
|
|
1914
|
+
}, zn = function(e, t, n) {
|
|
1915
|
+
var u;
|
|
1866
1916
|
this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial", this.nodes.appendChild(this.linkController), this.nodes.appendChild(this.P2), this.nodes.appendChild(this.P3);
|
|
1867
|
-
let { x:
|
|
1868
|
-
this.P2.style.cssText = `top:${r}px;left:${s}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`,
|
|
1869
|
-
x1:
|
|
1870
|
-
y1:
|
|
1917
|
+
let { x: o, y: i } = I(t), { ctrlX: s, ctrlY: r } = t, { ctrlX: l, ctrlY: c } = n, { x: h, y: a } = I(n);
|
|
1918
|
+
this.P2.style.cssText = `top:${r}px;left:${s}px;`, this.P3.style.cssText = `top:${c}px;left:${l}px;`, C(this.line1, {
|
|
1919
|
+
x1: o + "",
|
|
1920
|
+
y1: i + "",
|
|
1871
1921
|
x2: s + "",
|
|
1872
1922
|
y2: r + ""
|
|
1873
|
-
}),
|
|
1923
|
+
}), C(this.line2, {
|
|
1874
1924
|
x1: l + "",
|
|
1875
1925
|
y1: c + "",
|
|
1876
1926
|
x2: h + "",
|
|
1877
1927
|
y2: a + ""
|
|
1878
|
-
}), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = Ce.create(this.P2), this.helper2 = Ce.create(this.P3), this.helper1.init(this.map, (
|
|
1879
|
-
var
|
|
1880
|
-
s = s
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1883
|
-
const
|
|
1884
|
-
this.P2.style.top = r + "px", this.P2.style.left = s + "px", (
|
|
1885
|
-
x:
|
|
1886
|
-
y:
|
|
1887
|
-
}),
|
|
1888
|
-
x1:
|
|
1889
|
-
y1:
|
|
1928
|
+
}), this.helper1 && (this.helper1.destory(this.map), (u = this.helper2) == null || u.destory(this.map)), this.helper1 = Ce.create(this.P2), this.helper2 = Ce.create(this.P3), this.helper1.init(this.map, (d, p) => {
|
|
1929
|
+
var v;
|
|
1930
|
+
s = s + d / this.scaleVal, r = r + p / this.scaleVal;
|
|
1931
|
+
const g = I({ ...t, ctrlX: s, ctrlY: r });
|
|
1932
|
+
o = g.x, i = g.y;
|
|
1933
|
+
const m = o / 8 + s * 3 / 8 + l * 3 / 8 + h / 8, f = i / 8 + r * 3 / 8 + c * 3 / 8 + a / 8;
|
|
1934
|
+
this.P2.style.top = r + "px", this.P2.style.left = s + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${o} ${i} C ${s} ${r} ${l} ${c} ${h} ${a}`), C(this.currentLink.children[2], {
|
|
1935
|
+
x: m + "",
|
|
1936
|
+
y: f + ""
|
|
1937
|
+
}), C(this.line1, {
|
|
1938
|
+
x1: o + "",
|
|
1939
|
+
y1: i + "",
|
|
1890
1940
|
x2: s + "",
|
|
1891
1941
|
y2: r + ""
|
|
1892
1942
|
}), e.delta1.x = s - t.cx, e.delta1.y = r - t.cy;
|
|
1893
|
-
}), this.helper2.init(this.map, (
|
|
1894
|
-
var
|
|
1895
|
-
l = l -
|
|
1896
|
-
const
|
|
1897
|
-
h =
|
|
1898
|
-
const
|
|
1899
|
-
this.P3.style.top = c + "px", this.P3.style.left = l + "px", (
|
|
1900
|
-
x:
|
|
1901
|
-
y:
|
|
1902
|
-
}),
|
|
1943
|
+
}), this.helper2.init(this.map, (d, p) => {
|
|
1944
|
+
var y, b;
|
|
1945
|
+
l = l - d / this.scaleVal, c = c - p / this.scaleVal;
|
|
1946
|
+
const g = I({ ...n, ctrlX: l, ctrlY: c });
|
|
1947
|
+
h = g.x, a = g.y;
|
|
1948
|
+
const m = o / 8 + s * 3 / 8 + l * 3 / 8 + h / 8, f = i / 8 + r * 3 / 8 + c * 3 / 8 + a / 8, v = $e(l, c, h, a);
|
|
1949
|
+
this.P3.style.top = c + "px", this.P3.style.left = l + "px", (y = this.currentLink) == null || y.children[0].setAttribute("d", `M ${o} ${i} C ${s} ${r} ${l} ${c} ${h} ${a}`), (b = this.currentLink) == null || b.children[1].setAttribute("d", `M ${v.x1} ${v.y1} L ${h} ${a} L ${v.x2} ${v.y2}`), C(this.currentLink.children[2], {
|
|
1950
|
+
x: m + "",
|
|
1951
|
+
y: f + ""
|
|
1952
|
+
}), C(this.line2, {
|
|
1903
1953
|
x1: l + "",
|
|
1904
1954
|
y1: c + "",
|
|
1905
1955
|
x2: h + "",
|
|
@@ -1907,43 +1957,50 @@ const Mn = function(e, t, n, i) {
|
|
|
1907
1957
|
}), e.delta2.x = l - n.cx, e.delta2.y = c - n.cy;
|
|
1908
1958
|
});
|
|
1909
1959
|
};
|
|
1910
|
-
function
|
|
1960
|
+
function Rn() {
|
|
1911
1961
|
this.linkSvgGroup.innerHTML = "";
|
|
1912
1962
|
for (const e in this.linkData) {
|
|
1913
1963
|
const t = this.linkData[e];
|
|
1914
|
-
|
|
1964
|
+
try {
|
|
1965
|
+
this.drawCustomLink(N(t.from), N(t.to), t, !0);
|
|
1966
|
+
} catch {
|
|
1967
|
+
console.warn("Node may not be expanded");
|
|
1968
|
+
}
|
|
1915
1969
|
}
|
|
1916
1970
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1917
1971
|
}
|
|
1918
|
-
function
|
|
1972
|
+
function qn(e) {
|
|
1919
1973
|
if (console.time("editSummary"), !e)
|
|
1920
1974
|
return;
|
|
1921
1975
|
const t = e.children[2];
|
|
1922
|
-
console.log(t, e),
|
|
1976
|
+
console.log(t, e), Oe(this, t, (n) => {
|
|
1923
1977
|
var s;
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1978
|
+
const o = e.linkObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
1979
|
+
i === "" ? o.label = origin : o.label = i, n.remove(), i !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
1980
|
+
name: "finishEditCustomLinkLabel",
|
|
1981
|
+
obj: o
|
|
1982
|
+
}));
|
|
1926
1983
|
}), console.timeEnd("editSummary");
|
|
1927
1984
|
}
|
|
1928
|
-
function
|
|
1985
|
+
function Fn() {
|
|
1929
1986
|
for (const e in this.linkData) {
|
|
1930
1987
|
const t = this.linkData[e];
|
|
1931
|
-
(!
|
|
1988
|
+
(!oe(t.from, this.nodeData) || !oe(t.to, this.nodeData)) && delete this.linkData[t.id];
|
|
1932
1989
|
}
|
|
1933
1990
|
}
|
|
1934
|
-
const
|
|
1991
|
+
const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1935
1992
|
__proto__: null,
|
|
1936
|
-
createLink:
|
|
1937
|
-
drawCustomLink:
|
|
1938
|
-
editCutsomLinkLabel:
|
|
1939
|
-
hideLinkController:
|
|
1940
|
-
removeLink:
|
|
1941
|
-
renderCustomLink:
|
|
1942
|
-
selectLink:
|
|
1943
|
-
showLinkController:
|
|
1944
|
-
tidyCustomLink:
|
|
1945
|
-
unselectLink:
|
|
1946
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1993
|
+
createLink: On,
|
|
1994
|
+
drawCustomLink: jn,
|
|
1995
|
+
editCutsomLinkLabel: qn,
|
|
1996
|
+
hideLinkController: Bn,
|
|
1997
|
+
removeLink: An,
|
|
1998
|
+
renderCustomLink: Rn,
|
|
1999
|
+
selectLink: Pn,
|
|
2000
|
+
showLinkController: zn,
|
|
2001
|
+
tidyCustomLink: Fn,
|
|
2002
|
+
unselectLink: Hn
|
|
2003
|
+
}, Symbol.toStringTag, { value: "Module" })), Wn = function(e) {
|
|
1947
2004
|
var c, h;
|
|
1948
2005
|
if (e.length === 0)
|
|
1949
2006
|
throw new Error("No selected node.");
|
|
@@ -1968,17 +2025,17 @@ const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1968
2025
|
}
|
|
1969
2026
|
return d.length > t && (t = d.length), d;
|
|
1970
2027
|
});
|
|
1971
|
-
let
|
|
2028
|
+
let o = 0;
|
|
1972
2029
|
e:
|
|
1973
|
-
for (;
|
|
1974
|
-
const a = (c = n[0][
|
|
2030
|
+
for (; o < t; o++) {
|
|
2031
|
+
const a = (c = n[0][o]) == null ? void 0 : c.node;
|
|
1975
2032
|
for (let u = 1; u < n.length; u++)
|
|
1976
|
-
if (((h = n[u][
|
|
2033
|
+
if (((h = n[u][o]) == null ? void 0 : h.node) !== a)
|
|
1977
2034
|
break e;
|
|
1978
2035
|
}
|
|
1979
|
-
if (!
|
|
2036
|
+
if (!o)
|
|
1980
2037
|
throw new Error("Can not select root node.");
|
|
1981
|
-
const
|
|
2038
|
+
const i = n.map((a) => a[o - 1].index).sort(), s = i[0] || 0, r = i[i.length - 1] || 0, l = n[0][o - 1].node;
|
|
1982
2039
|
if (l.root)
|
|
1983
2040
|
throw new Error("Please select nodes in the same main topic.");
|
|
1984
2041
|
return {
|
|
@@ -1986,165 +2043,170 @@ const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1986
2043
|
start: s,
|
|
1987
2044
|
end: r
|
|
1988
2045
|
};
|
|
1989
|
-
},
|
|
2046
|
+
}, In = function(e) {
|
|
1990
2047
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1991
2048
|
return t.setAttribute("id", e), t;
|
|
1992
2049
|
}, _e = function(e, t) {
|
|
1993
2050
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1994
|
-
return
|
|
2051
|
+
return C(n, {
|
|
1995
2052
|
d: e,
|
|
1996
2053
|
stroke: t || "#666",
|
|
1997
2054
|
fill: "none",
|
|
1998
2055
|
"stroke-linecap": "round",
|
|
1999
2056
|
"stroke-width": "2"
|
|
2000
2057
|
}), n;
|
|
2001
|
-
}, ke = function(e, t, n,
|
|
2058
|
+
}, ke = function(e, t, n, o, i) {
|
|
2002
2059
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2003
|
-
return
|
|
2004
|
-
"text-anchor":
|
|
2060
|
+
return C(s, {
|
|
2061
|
+
"text-anchor": o,
|
|
2005
2062
|
x: t + "",
|
|
2006
2063
|
y: n + "",
|
|
2007
|
-
fill:
|
|
2064
|
+
fill: i || "#666"
|
|
2008
2065
|
}), s.innerHTML = e, s;
|
|
2009
|
-
},
|
|
2066
|
+
}, Kn = (e) => N(e).parentElement.parentElement, Un = function({ parent: e, start: t }) {
|
|
2010
2067
|
var s, r;
|
|
2011
|
-
const n =
|
|
2012
|
-
let
|
|
2013
|
-
return
|
|
2014
|
-
},
|
|
2068
|
+
const n = N(e), o = n.nodeObj;
|
|
2069
|
+
let i;
|
|
2070
|
+
return o.root === !0 ? i = (s = N(o.children[t].id).closest("me-main")) == null ? void 0 : s.className : i = (r = n.closest("me-main")) == null ? void 0 : r.className, i;
|
|
2071
|
+
}, Ie = function(e, t) {
|
|
2015
2072
|
var _;
|
|
2016
|
-
const { id: n, text:
|
|
2073
|
+
const { id: n, text: o, parent: i, start: s, end: r } = t, l = e.nodes, h = N(i).nodeObj, a = Un(t);
|
|
2017
2074
|
let u = 1 / 0, d = 0, p = 0, g = 0;
|
|
2018
|
-
for (let
|
|
2019
|
-
const
|
|
2020
|
-
if (!
|
|
2075
|
+
for (let P = s; P <= r; P++) {
|
|
2076
|
+
const U = (_ = h.children) == null ? void 0 : _[P];
|
|
2077
|
+
if (!U)
|
|
2021
2078
|
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2079
|
+
const H = Kn(U.id), { offsetLeft: Z, offsetTop: fe } = K(l, H);
|
|
2080
|
+
P === s && (p = fe), P === r && (g = fe + H.offsetHeight), Z < u && (u = Z), H.offsetWidth + Z > d && (d = H.offsetWidth + Z);
|
|
2024
2081
|
}
|
|
2025
2082
|
let m, f;
|
|
2026
|
-
const v = p + 10,
|
|
2027
|
-
a === "lhs" ? (m = _e(`M ${u + 10} ${v} c -5 0 -10 5 -10 10 L ${u} ${
|
|
2028
|
-
const
|
|
2029
|
-
return
|
|
2083
|
+
const v = p + 10, y = g + 10, b = (v + y) / 2, x = e.theme.cssVar["--color"];
|
|
2084
|
+
a === "lhs" ? (m = _e(`M ${u + 10} ${v} c -5 0 -10 5 -10 10 L ${u} ${y - 10} c 0 5 5 10 10 10 M ${u} ${b} h -10`, x), f = ke(o, u - 20, b + 6, "end", x)) : (m = _e(`M ${d - 10} ${v} c 5 0 10 5 10 10 L ${d} ${y - 10} c 0 5 -5 10 -10 10 M ${d} ${b} h 10`, x), f = ke(o, d + 20, b + 6, "start", x));
|
|
2085
|
+
const w = In("s-" + n);
|
|
2086
|
+
return w.appendChild(m), w.appendChild(f), w.summaryObj = t, e.summarySvg.appendChild(w), w;
|
|
2030
2087
|
}, Yn = function() {
|
|
2031
2088
|
let e = [];
|
|
2032
2089
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2033
|
-
const { parent: t, start: n, end:
|
|
2034
|
-
this.summaries.push(
|
|
2035
|
-
|
|
2090
|
+
const { parent: t, start: n, end: o } = Wn(e), i = { id: J(), parent: t, start: n, end: o, text: "summary" }, s = Ie(this, i);
|
|
2091
|
+
this.summaries.push(i), this.editSummary(s), this.bus.fire("operation", {
|
|
2092
|
+
name: "createSummary",
|
|
2093
|
+
obj: i
|
|
2094
|
+
});
|
|
2095
|
+
}, Gn = function(e) {
|
|
2036
2096
|
var n;
|
|
2037
|
-
const t = this.summaries.findIndex((
|
|
2038
|
-
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove())
|
|
2097
|
+
const t = this.summaries.findIndex((o) => o.id === e);
|
|
2098
|
+
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
|
|
2099
|
+
name: "removeSummary",
|
|
2100
|
+
obj: { id: e }
|
|
2101
|
+
});
|
|
2039
2102
|
}, Xn = function(e) {
|
|
2040
|
-
const t = e.children[1].getBBox(), n = 6,
|
|
2041
|
-
|
|
2103
|
+
const t = e.children[1].getBBox(), n = 6, o = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2104
|
+
C(i, {
|
|
2042
2105
|
x: t.x - n + "",
|
|
2043
2106
|
y: t.y - n + "",
|
|
2044
2107
|
width: t.width + n * 2 + "",
|
|
2045
2108
|
height: t.height + n * 2 + "",
|
|
2046
|
-
rx:
|
|
2109
|
+
rx: o + "",
|
|
2047
2110
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
2048
2111
|
"stroke-width": "2",
|
|
2049
2112
|
fill: "none"
|
|
2050
|
-
}),
|
|
2051
|
-
},
|
|
2113
|
+
}), i.classList.add("selected"), e.appendChild(i), this.currentSummary = e;
|
|
2114
|
+
}, Jn = function() {
|
|
2052
2115
|
var e, t;
|
|
2053
2116
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2054
|
-
},
|
|
2117
|
+
}, Qn = function() {
|
|
2055
2118
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2056
|
-
|
|
2119
|
+
Ie(this, e);
|
|
2057
2120
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2058
|
-
},
|
|
2121
|
+
}, Zn = function(e) {
|
|
2059
2122
|
if (console.time("editSummary"), !e)
|
|
2060
2123
|
return;
|
|
2061
2124
|
const t = e.childNodes[1];
|
|
2062
|
-
|
|
2125
|
+
Oe(this, t, (n) => {
|
|
2063
2126
|
var s;
|
|
2064
|
-
const
|
|
2065
|
-
|
|
2127
|
+
const o = e.summaryObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
2128
|
+
i === "" ? o.text = origin : o.text = i, n.remove(), i !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
2066
2129
|
name: "finishEditSummary",
|
|
2067
|
-
obj:
|
|
2068
|
-
origin
|
|
2130
|
+
obj: o
|
|
2069
2131
|
}));
|
|
2070
2132
|
}), console.timeEnd("editSummary");
|
|
2071
|
-
},
|
|
2133
|
+
}, eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2072
2134
|
__proto__: null,
|
|
2073
2135
|
createSummary: Yn,
|
|
2074
|
-
editSummary:
|
|
2075
|
-
removeSummary:
|
|
2076
|
-
renderSummary:
|
|
2136
|
+
editSummary: Zn,
|
|
2137
|
+
removeSummary: Gn,
|
|
2138
|
+
renderSummary: Qn,
|
|
2077
2139
|
selectSummary: Xn,
|
|
2078
|
-
unselectSummary:
|
|
2140
|
+
unselectSummary: Jn
|
|
2079
2141
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2080
|
-
function
|
|
2142
|
+
function to(e, t) {
|
|
2081
2143
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2082
|
-
return
|
|
2144
|
+
return C(n, {
|
|
2083
2145
|
version: "1.1",
|
|
2084
2146
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2085
2147
|
height: e,
|
|
2086
2148
|
width: t
|
|
2087
2149
|
}), n;
|
|
2088
2150
|
}
|
|
2089
|
-
function
|
|
2151
|
+
function no(e, t) {
|
|
2090
2152
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2091
2153
|
}
|
|
2092
|
-
function
|
|
2093
|
-
const
|
|
2154
|
+
function oo(e, t, n, o) {
|
|
2155
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2094
2156
|
let s = "";
|
|
2095
2157
|
return e.text ? s = e.text.textContent : s = e.childNodes[0].textContent, s.split(`
|
|
2096
2158
|
`).forEach((l, c) => {
|
|
2097
2159
|
const h = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2098
|
-
|
|
2160
|
+
C(h, {
|
|
2099
2161
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2100
|
-
y:
|
|
2162
|
+
y: o + parseInt(t.paddingTop) + no(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
2101
2163
|
"text-anchor": "start",
|
|
2102
2164
|
"font-family": t.fontFamily,
|
|
2103
2165
|
"font-size": `${t.fontSize}`,
|
|
2104
2166
|
"font-weight": `${t.fontWeight}`,
|
|
2105
2167
|
fill: `${t.color}`
|
|
2106
|
-
}), h.innerHTML = l,
|
|
2107
|
-
}),
|
|
2168
|
+
}), h.innerHTML = l, i.appendChild(h);
|
|
2169
|
+
}), i;
|
|
2108
2170
|
}
|
|
2109
|
-
function
|
|
2110
|
-
let
|
|
2111
|
-
e.text ?
|
|
2171
|
+
function io(e, t, n, o) {
|
|
2172
|
+
let i = "";
|
|
2173
|
+
e.text ? i = e.text.textContent : i = e.childNodes[0].textContent;
|
|
2112
2174
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
2113
|
-
|
|
2175
|
+
C(s, {
|
|
2114
2176
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2115
|
-
y:
|
|
2177
|
+
y: o + parseInt(t.paddingTop) + "",
|
|
2116
2178
|
width: t.width,
|
|
2117
2179
|
height: t.height
|
|
2118
2180
|
});
|
|
2119
2181
|
const r = document.createElement("div");
|
|
2120
|
-
return
|
|
2182
|
+
return C(r, {
|
|
2121
2183
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2122
2184
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2123
|
-
}), r.innerHTML =
|
|
2185
|
+
}), r.innerHTML = i, s.appendChild(r), s;
|
|
2124
2186
|
}
|
|
2125
|
-
function
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2128
|
-
x:
|
|
2187
|
+
function ce(e, t, n = !1) {
|
|
2188
|
+
const o = getComputedStyle(t), { offsetLeft: i, offsetTop: s } = K(e.nodes, t), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2189
|
+
C(r, {
|
|
2190
|
+
x: i + "",
|
|
2129
2191
|
y: s + "",
|
|
2130
|
-
rx:
|
|
2131
|
-
ry:
|
|
2132
|
-
width:
|
|
2133
|
-
height:
|
|
2134
|
-
fill:
|
|
2135
|
-
stroke:
|
|
2136
|
-
"stroke-width":
|
|
2192
|
+
rx: o.borderRadius,
|
|
2193
|
+
ry: o.borderRadius,
|
|
2194
|
+
width: o.width,
|
|
2195
|
+
height: o.height,
|
|
2196
|
+
fill: o.backgroundColor,
|
|
2197
|
+
stroke: o.borderColor,
|
|
2198
|
+
"stroke-width": o.borderWidth
|
|
2137
2199
|
});
|
|
2138
2200
|
const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2139
2201
|
l.appendChild(r);
|
|
2140
2202
|
let c;
|
|
2141
|
-
return n ? c =
|
|
2203
|
+
return n ? c = io(t, o, i, s) : c = oo(t, o, i, s), l.appendChild(c), l;
|
|
2142
2204
|
}
|
|
2143
|
-
function
|
|
2144
|
-
const n = getComputedStyle(t), { offsetLeft:
|
|
2145
|
-
return
|
|
2146
|
-
x:
|
|
2147
|
-
y:
|
|
2205
|
+
function so(e, t) {
|
|
2206
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = K(e.nodes, t), s = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2207
|
+
return C(r, {
|
|
2208
|
+
x: o + "",
|
|
2209
|
+
y: i + parseInt(n.fontSize) + "",
|
|
2148
2210
|
"text-anchor": "start",
|
|
2149
2211
|
"font-family": n.fontFamily,
|
|
2150
2212
|
"font-size": `${n.fontSize}`,
|
|
@@ -2152,17 +2214,17 @@ function ni(e, t) {
|
|
|
2152
2214
|
fill: `${n.color}`
|
|
2153
2215
|
}), r.innerHTML = t.textContent, s.appendChild(r), s.setAttribute("href", t.href), s;
|
|
2154
2216
|
}
|
|
2155
|
-
const
|
|
2217
|
+
const te = 100, ro = '<?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">', Ke = (e, t = !1) => {
|
|
2156
2218
|
var u, d, p;
|
|
2157
|
-
const n = e.nodes,
|
|
2158
|
-
|
|
2219
|
+
const n = e.nodes, o = n.offsetHeight + te * 2, i = n.offsetWidth + te * 2, s = to(o + "px", i + "px"), r = document.createElementNS("http://www.w3.org/2000/svg", "svg"), l = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2220
|
+
C(l, {
|
|
2159
2221
|
x: "0",
|
|
2160
2222
|
y: "0",
|
|
2161
|
-
width: `${
|
|
2162
|
-
height: `${
|
|
2223
|
+
width: `${i}`,
|
|
2224
|
+
height: `${o}`,
|
|
2163
2225
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2164
2226
|
}), s.appendChild(l), n.querySelectorAll(".subLines").forEach((g) => {
|
|
2165
|
-
const m = g.cloneNode(!0), { offsetLeft: f, offsetTop: v } =
|
|
2227
|
+
const m = g.cloneNode(!0), { offsetLeft: f, offsetTop: v } = K(n, g.parentElement);
|
|
2166
2228
|
m.setAttribute("x", `${f}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2167
2229
|
});
|
|
2168
2230
|
const c = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
|
|
@@ -2171,121 +2233,122 @@ const Z = 100, ii = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
|
|
|
2171
2233
|
h && r.appendChild(h);
|
|
2172
2234
|
const a = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
2173
2235
|
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((g) => {
|
|
2174
|
-
r.appendChild(
|
|
2236
|
+
r.appendChild(ce(e, g, !t));
|
|
2175
2237
|
}), n.querySelectorAll(".tags > span").forEach((g) => {
|
|
2176
|
-
r.appendChild(
|
|
2238
|
+
r.appendChild(ce(e, g));
|
|
2177
2239
|
}), n.querySelectorAll(".icons > span").forEach((g) => {
|
|
2178
|
-
r.appendChild(
|
|
2240
|
+
r.appendChild(ce(e, g));
|
|
2179
2241
|
}), n.querySelectorAll(".hyper-link").forEach((g) => {
|
|
2180
|
-
r.appendChild(
|
|
2181
|
-
}),
|
|
2182
|
-
x:
|
|
2183
|
-
y:
|
|
2242
|
+
r.appendChild(so(e, g));
|
|
2243
|
+
}), C(r, {
|
|
2244
|
+
x: te + "",
|
|
2245
|
+
y: te + "",
|
|
2184
2246
|
overflow: "visible"
|
|
2185
|
-
}), s.appendChild(r),
|
|
2247
|
+
}), s.appendChild(r), ro + s.outerHTML;
|
|
2186
2248
|
};
|
|
2187
|
-
function
|
|
2249
|
+
function lo(e) {
|
|
2188
2250
|
return new Promise((t, n) => {
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2191
|
-
t(
|
|
2192
|
-
},
|
|
2193
|
-
n(
|
|
2194
|
-
},
|
|
2251
|
+
const o = new FileReader();
|
|
2252
|
+
o.onload = (i) => {
|
|
2253
|
+
t(i.target.result);
|
|
2254
|
+
}, o.onerror = (i) => {
|
|
2255
|
+
n(i);
|
|
2256
|
+
}, o.readAsDataURL(e);
|
|
2195
2257
|
});
|
|
2196
2258
|
}
|
|
2197
|
-
const
|
|
2198
|
-
const t =
|
|
2259
|
+
const co = function(e = !1) {
|
|
2260
|
+
const t = Ke(this, e);
|
|
2199
2261
|
return new Blob([t], { type: "image/svg+xml" });
|
|
2200
|
-
},
|
|
2201
|
-
const t =
|
|
2202
|
-
return new Promise((
|
|
2262
|
+
}, ao = async function(e = !1) {
|
|
2263
|
+
const t = Ke(this, e), n = new Blob([t], { type: "image/svg+xml" }), o = await lo(n);
|
|
2264
|
+
return new Promise((i, s) => {
|
|
2203
2265
|
const r = new Image();
|
|
2204
2266
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2205
2267
|
const l = document.createElement("canvas");
|
|
2206
|
-
l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(
|
|
2207
|
-
}, r.src =
|
|
2268
|
+
l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(i, "image/png", 1);
|
|
2269
|
+
}, r.src = o, r.onerror = s;
|
|
2208
2270
|
});
|
|
2209
|
-
},
|
|
2271
|
+
}, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2210
2272
|
__proto__: null,
|
|
2211
|
-
exportPng:
|
|
2212
|
-
exportSvg:
|
|
2273
|
+
exportPng: ao,
|
|
2274
|
+
exportSvg: co
|
|
2213
2275
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2214
|
-
function
|
|
2276
|
+
function uo(e, t) {
|
|
2215
2277
|
return async function(...n) {
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2278
|
+
const o = this.before[t];
|
|
2279
|
+
o && !await o.apply(this, n) || e.apply(this, n);
|
|
2218
2280
|
};
|
|
2219
2281
|
}
|
|
2220
|
-
const Se = Object.keys(
|
|
2282
|
+
const Se = Object.keys(We), Ue = {};
|
|
2221
2283
|
for (let e = 0; e < Se.length; e++) {
|
|
2222
2284
|
const t = Se[e];
|
|
2223
|
-
|
|
2285
|
+
Ue[t] = uo(We[t], t);
|
|
2224
2286
|
}
|
|
2225
|
-
const
|
|
2226
|
-
getObjById:
|
|
2227
|
-
generateNewObj:
|
|
2228
|
-
layout:
|
|
2229
|
-
linkDiv:
|
|
2230
|
-
editTopic:
|
|
2231
|
-
createWrapper:
|
|
2232
|
-
createParent:
|
|
2233
|
-
createChildren:
|
|
2234
|
-
createTopic:
|
|
2235
|
-
findEle:
|
|
2236
|
-
changeTheme:
|
|
2237
|
-
...
|
|
2238
|
-
...
|
|
2239
|
-
...
|
|
2240
|
-
...
|
|
2241
|
-
...
|
|
2287
|
+
const fo = {
|
|
2288
|
+
getObjById: oe,
|
|
2289
|
+
generateNewObj: Xe,
|
|
2290
|
+
layout: et,
|
|
2291
|
+
linkDiv: ht,
|
|
2292
|
+
editTopic: lt,
|
|
2293
|
+
createWrapper: ot,
|
|
2294
|
+
createParent: it,
|
|
2295
|
+
createChildren: st,
|
|
2296
|
+
createTopic: rt,
|
|
2297
|
+
findEle: N,
|
|
2298
|
+
changeTheme: At,
|
|
2299
|
+
...ln,
|
|
2300
|
+
...Ue,
|
|
2301
|
+
...Vn,
|
|
2302
|
+
...eo,
|
|
2303
|
+
...ho,
|
|
2242
2304
|
init(e) {
|
|
2243
2305
|
if (!e || !e.nodeData)
|
|
2244
2306
|
return new Error("MindElixir: `data` is required");
|
|
2245
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
2307
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, $(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.tidyCustomLink(), this.toolBar && St(this), this.keypress && bt(this), this.editable && Ot(this), Ye() && this.mobileMenu ? yt(this) : this.contextMenu && mt(this, this.contextMenuOption), this.draggable && Et(this), this.allowUndo && Ct(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2246
2308
|
}
|
|
2247
|
-
},
|
|
2248
|
-
function
|
|
2309
|
+
}, Y = document;
|
|
2310
|
+
function D({
|
|
2249
2311
|
el: e,
|
|
2250
2312
|
direction: t,
|
|
2251
2313
|
locale: n,
|
|
2252
|
-
draggable:
|
|
2253
|
-
editable:
|
|
2314
|
+
draggable: o,
|
|
2315
|
+
editable: i,
|
|
2254
2316
|
contextMenu: s,
|
|
2255
2317
|
contextMenuOption: r,
|
|
2256
2318
|
toolBar: l,
|
|
2257
2319
|
keypress: c,
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2320
|
+
mouseSelectionButton: h,
|
|
2321
|
+
before: a,
|
|
2322
|
+
newTopicName: u,
|
|
2323
|
+
allowUndo: d,
|
|
2324
|
+
mainLinkStyle: p,
|
|
2325
|
+
subLinkStyle: g,
|
|
2326
|
+
overflowHidden: m,
|
|
2327
|
+
mobileMenu: f,
|
|
2328
|
+
theme: v
|
|
2266
2329
|
}) {
|
|
2267
|
-
console.log("ME_version " +
|
|
2268
|
-
let
|
|
2269
|
-
const
|
|
2270
|
-
if (
|
|
2330
|
+
console.log("ME_version " + D.version, this);
|
|
2331
|
+
let y = null;
|
|
2332
|
+
const b = Object.prototype.toString.call(e);
|
|
2333
|
+
if (b === "[object HTMLDivElement]" ? y = e : b === "[object String]" && (y = document.querySelector(e)), !y)
|
|
2271
2334
|
throw new Error("MindElixir: el is not a valid element");
|
|
2272
|
-
|
|
2273
|
-
const
|
|
2274
|
-
this.theme =
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2335
|
+
y.className += " mind-elixir", y.innerHTML = "", y.style.setProperty("--gap", T + "px"), this.mindElixirBox = y, this.before = a || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = s === void 0 ? !0 : s, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = h || 0, this.mobileMenu = f || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = u || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = d === void 0 ? !1 : d, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = p || 0, this.subLinkStyle = g || 0, this.overflowHidden = m || !1, this.bus = Ze.create(), this.container = Y.createElement("div"), this.container.className = "map-container";
|
|
2336
|
+
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2337
|
+
this.theme = v || (x.matches ? Me : Le);
|
|
2338
|
+
const w = Y.createElement("div");
|
|
2339
|
+
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 = G("lines"), this.summarySvg = G("summary"), this.linkController = G("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 = pe(), this.line2 = pe(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = G("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Qe(this);
|
|
2277
2340
|
}
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2341
|
+
D.prototype = fo;
|
|
2342
|
+
D.LEFT = L;
|
|
2343
|
+
D.RIGHT = z;
|
|
2344
|
+
D.SIDE = X;
|
|
2345
|
+
D.THEME = Le;
|
|
2346
|
+
D.DARK_THEME = Me;
|
|
2347
|
+
D.version = "3.3.0";
|
|
2348
|
+
D.E = N;
|
|
2349
|
+
D.new = (e) => ({
|
|
2287
2350
|
nodeData: {
|
|
2288
|
-
id:
|
|
2351
|
+
id: J(),
|
|
2289
2352
|
topic: e || "new topic",
|
|
2290
2353
|
root: !0,
|
|
2291
2354
|
children: []
|
|
@@ -2293,5 +2356,5 @@ $.new = (e) => ({
|
|
|
2293
2356
|
linkData: {}
|
|
2294
2357
|
});
|
|
2295
2358
|
export {
|
|
2296
|
-
|
|
2359
|
+
D as default
|
|
2297
2360
|
};
|