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