mind-elixir 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +6 -6
- package/dist/MindElixir.js +179 -173
- package/dist/MindElixirLite.iife.js +5 -5
- package/dist/MindElixirLite.js +163 -150
- package/dist/types/customLink.d.ts +1 -0
- package/dist/types/docs.d.ts +6 -0
- package/dist/types/index.d.ts +17 -16
- package/dist/types/linkDiv.d.ts +2 -1
- package/dist/types/methods.d.ts +20 -16
- package/dist/types/plugin/exportImage.d.ts +2 -2
- package/dist/types/types/dom.d.ts +2 -1
- package/dist/types/types/index.d.ts +4 -2
- package/package.json +1 -1
package/dist/MindElixir.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2em}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.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>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;line-height:1.2em;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:20px 65px}.map-container me-main>me-wrapper>me-parent{margin:var(--gap);padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px var(--gap)}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px var(--gap)}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2em}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>div,.map-container me-tpc>span,.map-container me-tpc>img{pointer-events:none}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
2
|
(function(e) {
|
|
3
3
|
var t, n, i, o, s, r, l = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', c = (c = document.getElementsByTagName("script"))[c.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (c && !e.__iconfont__svg__cssinject__) {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
o.readyState == "complete" && (o.onreadystatechange = null, h());
|
|
31
31
|
});
|
|
32
32
|
})(window);
|
|
33
|
-
const S = 0, H = 1, K = 2, M = 30, L = 8,
|
|
33
|
+
const S = 0, H = 1, K = 2, M = 30, L = 8, Le = {
|
|
34
34
|
name: "Latte",
|
|
35
35
|
palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
|
|
36
36
|
cssVar: {
|
|
@@ -42,7 +42,7 @@ const S = 0, H = 1, K = 2, M = 30, L = 8, Se = {
|
|
|
42
42
|
"--panel-bgcolor": "#ffffff",
|
|
43
43
|
"--panel-border-color": "#eaeaea"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, Me = {
|
|
46
46
|
name: "Dark",
|
|
47
47
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
48
48
|
cssVar: {
|
|
@@ -58,12 +58,12 @@ const S = 0, H = 1, K = 2, M = 30, L = 8, Se = {
|
|
|
58
58
|
function ee(e) {
|
|
59
59
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
60
60
|
}
|
|
61
|
-
const Xe = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
|
|
61
|
+
const Xe = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), te = function(e, t) {
|
|
62
62
|
if (t.id === e)
|
|
63
63
|
return t;
|
|
64
64
|
if (t.children && t.children.length) {
|
|
65
65
|
for (let n = 0; n < t.children.length; n++) {
|
|
66
|
-
const i =
|
|
66
|
+
const i = te(e, t.children[n]);
|
|
67
67
|
if (i)
|
|
68
68
|
return i;
|
|
69
69
|
}
|
|
@@ -132,7 +132,7 @@ function Qe(e) {
|
|
|
132
132
|
const { siblings: t, index: n } = P(e), i = t[n];
|
|
133
133
|
n === t.length - 1 ? (t[n] = t[0], t[0] = i) : (t[n] = t[n + 1], t[n + 1] = i);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function oe(e) {
|
|
136
136
|
const { siblings: t, index: n } = P(e);
|
|
137
137
|
return t.splice(n, 1), t.length;
|
|
138
138
|
}
|
|
@@ -149,15 +149,15 @@ function tt(e, t) {
|
|
|
149
149
|
n[i] = t, t.children = [e];
|
|
150
150
|
}
|
|
151
151
|
function nt(e, t) {
|
|
152
|
-
|
|
152
|
+
oe(e), t.children ? t.children.push(e) : t.children = [e];
|
|
153
153
|
}
|
|
154
154
|
function it(e, t) {
|
|
155
|
-
|
|
155
|
+
oe(e);
|
|
156
156
|
const { siblings: n, index: i } = P(t);
|
|
157
157
|
n.splice(i, 0, e);
|
|
158
158
|
}
|
|
159
159
|
function ot(e, t) {
|
|
160
|
-
|
|
160
|
+
oe(e);
|
|
161
161
|
const { siblings: n, index: i } = P(t);
|
|
162
162
|
n.splice(i + 1, 0, e);
|
|
163
163
|
}
|
|
@@ -196,7 +196,7 @@ const W = (e, t) => {
|
|
|
196
196
|
clear() {
|
|
197
197
|
this.moved = !1, this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
198
198
|
}
|
|
199
|
-
},
|
|
199
|
+
}, fe = (e) => e.tagName === "ME-TPC";
|
|
200
200
|
function st(e) {
|
|
201
201
|
e.map.addEventListener("click", (t) => {
|
|
202
202
|
if (D.moved) {
|
|
@@ -208,14 +208,14 @@ function st(e) {
|
|
|
208
208
|
if (n.tagName === "ME-EPD")
|
|
209
209
|
e.expandNode(n.previousSibling);
|
|
210
210
|
else if (e.editable)
|
|
211
|
-
|
|
211
|
+
fe(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? n.dataset.type === "custom-link" ? e.selectLink(n.parentElement) : e.selectSummary(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
|
|
212
212
|
else
|
|
213
213
|
return;
|
|
214
214
|
}), e.map.addEventListener("dblclick", (t) => {
|
|
215
215
|
if (t.preventDefault(), !e.editable)
|
|
216
216
|
return;
|
|
217
217
|
const n = t.target;
|
|
218
|
-
|
|
218
|
+
fe(n) ? e.beginEdit(n) : n.tagName === "text" && (n.dataset.type === "custom-link" ? e.editCutsomLinkLabel(n.parentElement) : e.editSummary(n.parentElement));
|
|
219
219
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
220
220
|
t.target.contentEditable !== "true" && D.onMove(t, e.container);
|
|
221
221
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
@@ -257,11 +257,11 @@ const rt = {
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, ne = document, lt = function() {
|
|
261
261
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
262
262
|
const e = this.createTopic(this.nodeData);
|
|
263
|
-
|
|
264
|
-
const t =
|
|
263
|
+
de(e, this.nodeData), e.draggable = !1;
|
|
264
|
+
const t = ne.createElement("me-root");
|
|
265
265
|
t.appendChild(e);
|
|
266
266
|
const n = this.nodeData.children || [];
|
|
267
267
|
if (this.direction === K) {
|
|
@@ -272,9 +272,9 @@ const rt = {
|
|
|
272
272
|
}
|
|
273
273
|
ct(this, n, t), console.timeEnd("layout");
|
|
274
274
|
}, ct = function(e, t, n) {
|
|
275
|
-
const i =
|
|
275
|
+
const i = ne.createElement("me-main");
|
|
276
276
|
i.className = "lhs";
|
|
277
|
-
const o =
|
|
277
|
+
const o = ne.createElement("me-main");
|
|
278
278
|
o.className = "rhs";
|
|
279
279
|
for (let s = 0; s < t.length; s++) {
|
|
280
280
|
const r = t[s], { grp: l } = e.createWrapper(r);
|
|
@@ -282,7 +282,7 @@ const rt = {
|
|
|
282
282
|
}
|
|
283
283
|
e.nodes.appendChild(i), e.nodes.appendChild(n), e.nodes.appendChild(o), e.nodes.appendChild(e.lines);
|
|
284
284
|
}, at = function(e, t) {
|
|
285
|
-
const n =
|
|
285
|
+
const n = ne.createElement("me-children");
|
|
286
286
|
for (let i = 0; i < t.length; i++) {
|
|
287
287
|
const o = t[i], { grp: s } = e.createWrapper(o);
|
|
288
288
|
n.appendChild(s);
|
|
@@ -293,33 +293,39 @@ const rt = {
|
|
|
293
293
|
if (!i)
|
|
294
294
|
throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
295
295
|
return i;
|
|
296
|
-
},
|
|
297
|
-
if (e.
|
|
296
|
+
}, de = function(e, t) {
|
|
297
|
+
if (e.innerHTML = "", t.style && (e.style.color = t.style.color || "", e.style.background = t.style.background || "", e.style.fontSize = t.style.fontSize + "px", e.style.fontWeight = t.style.fontWeight || "normal"), t.branchColor && (e.style.borderColor = t.branchColor), t.image) {
|
|
298
298
|
const n = t.image;
|
|
299
299
|
if (n.url && n.width && n.height) {
|
|
300
300
|
const i = k.createElement("img");
|
|
301
301
|
i.src = n.url, i.style.width = n.width + "px", i.style.height = n.height + "px", e.appendChild(i), e.image = i;
|
|
302
302
|
} else
|
|
303
303
|
console.warn("image url/width/height are required");
|
|
304
|
+
} else
|
|
305
|
+
e.image && (e.image = void 0);
|
|
306
|
+
{
|
|
307
|
+
const n = k.createElement("span");
|
|
308
|
+
n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
|
|
304
309
|
}
|
|
305
310
|
if (t.hyperLink) {
|
|
306
311
|
const n = k.createElement("a");
|
|
307
312
|
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n;
|
|
308
313
|
} else
|
|
309
|
-
e.linkContainer && (e.linkContainer
|
|
314
|
+
e.linkContainer && (e.linkContainer = void 0);
|
|
310
315
|
if (t.icons && t.icons.length) {
|
|
311
316
|
const n = k.createElement("span");
|
|
312
317
|
n.className = "icons", n.innerHTML = t.icons.map((i) => `<span>${ee(i)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
313
|
-
}
|
|
318
|
+
} else
|
|
319
|
+
e.icons && (e.icons = void 0);
|
|
314
320
|
if (t.tags && t.tags.length) {
|
|
315
321
|
const n = k.createElement("div");
|
|
316
322
|
n.className = "tags", n.innerHTML = t.tags.map((i) => `<span>${ee(i)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
317
|
-
}
|
|
318
|
-
|
|
323
|
+
} else
|
|
324
|
+
e.tags && (e.tags = void 0);
|
|
319
325
|
}, dt = function(e, t) {
|
|
320
326
|
const n = k.createElement("me-wrapper"), { p: i, tpc: o } = this.createParent(e);
|
|
321
327
|
if (n.appendChild(i), !t && e.children && e.children.length > 0) {
|
|
322
|
-
const s =
|
|
328
|
+
const s = se(e.expanded);
|
|
323
329
|
if (i.appendChild(s), e.expanded !== !1) {
|
|
324
330
|
const r = at(this, e.children);
|
|
325
331
|
n.appendChild(r);
|
|
@@ -328,7 +334,7 @@ const rt = {
|
|
|
328
334
|
return { grp: n, top: i, tpc: o };
|
|
329
335
|
}, ht = function(e) {
|
|
330
336
|
const t = k.createElement("me-parent"), n = this.createTopic(e);
|
|
331
|
-
return
|
|
337
|
+
return de(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
332
338
|
}, ut = function(e) {
|
|
333
339
|
const t = k.createElement("me-children");
|
|
334
340
|
return t.append(...e), t;
|
|
@@ -345,7 +351,7 @@ function Oe(e) {
|
|
|
345
351
|
const pt = function(e) {
|
|
346
352
|
if (console.time("editTopic"), !e)
|
|
347
353
|
return;
|
|
348
|
-
const t = k.createElement("div"), n = e.
|
|
354
|
+
const t = k.createElement("div"), n = e.text.textContent;
|
|
349
355
|
e.appendChild(t), t.id = "input-box", t.textContent = n, t.contentEditable = "true", t.spellcheck = !1, t.style.cssText = `min-width:${e.offsetWidth - 8}px;`, this.direction === S && (t.style.right = "0"), t.focus(), Oe(t), this.bus.fire("operation", {
|
|
350
356
|
name: "beginEdit",
|
|
351
357
|
obj: e.nodeObj
|
|
@@ -362,13 +368,13 @@ const pt = function(e) {
|
|
|
362
368
|
if (!t)
|
|
363
369
|
return;
|
|
364
370
|
const i = e.nodeObj, o = ((s = t.textContent) == null ? void 0 : s.trim()) || "";
|
|
365
|
-
console.log(o), o === "" ? i.topic = n : i.topic = o, t.remove(), o !== n && (e.
|
|
371
|
+
console.log(o), o === "" ? i.topic = n : i.topic = o, t.remove(), o !== n && (e.text.textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
366
372
|
name: "finishEdit",
|
|
367
373
|
obj: i,
|
|
368
374
|
origin: n
|
|
369
375
|
}));
|
|
370
376
|
}), console.timeEnd("editTopic");
|
|
371
|
-
},
|
|
377
|
+
}, se = function(e) {
|
|
372
378
|
const t = k.createElement("me-epd");
|
|
373
379
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
374
380
|
}, z = document, R = "http://www.w3.org/2000/svg", mt = function(e, t) {
|
|
@@ -377,7 +383,7 @@ const pt = function(e) {
|
|
|
377
383
|
}, X = function(e) {
|
|
378
384
|
const t = z.createElementNS(R, "svg");
|
|
379
385
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
380
|
-
},
|
|
386
|
+
}, pe = function() {
|
|
381
387
|
const e = z.createElementNS(R, "line");
|
|
382
388
|
return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
|
|
383
389
|
}, gt = function(e, t) {
|
|
@@ -490,7 +496,7 @@ function He({ pT: e, pL: t, pW: n, pH: i, cT: o, cL: s, cW: r, cH: l, direction:
|
|
|
490
496
|
const f = Math.min(Math.abs(a - d) / 800, 1.2) * M;
|
|
491
497
|
return c === "lhs" ? (m = t, p = m + M, g = m - M, u = s + M, `M ${p} ${a} C ${m} ${a} ${m + f} ${d} ${g} ${d} H ${u}`) : (m = t + n, p = m - M, g = m + M, u = s + r - M, `M ${p} ${a} C ${m} ${a} ${m - f} ${d} ${g} ${d} H ${u}`);
|
|
492
498
|
}
|
|
493
|
-
const
|
|
499
|
+
const me = {
|
|
494
500
|
addChild: "插入子节点",
|
|
495
501
|
addParent: "插入父节点",
|
|
496
502
|
addSibling: "插入同级节点",
|
|
@@ -502,9 +508,9 @@ const pe = {
|
|
|
502
508
|
link: "连接",
|
|
503
509
|
clickTips: "请点击目标节点",
|
|
504
510
|
summary: "摘要"
|
|
505
|
-
},
|
|
506
|
-
cn:
|
|
507
|
-
zh_CN:
|
|
511
|
+
}, ge = {
|
|
512
|
+
cn: me,
|
|
513
|
+
zh_CN: me,
|
|
508
514
|
zh_TW: {
|
|
509
515
|
addChild: "插入子節點",
|
|
510
516
|
addParent: "插入父節點",
|
|
@@ -578,7 +584,7 @@ function Et(e, t) {
|
|
|
578
584
|
}, i = (b, y, C) => {
|
|
579
585
|
const _ = document.createElement("li");
|
|
580
586
|
return _.id = b, _.innerHTML = `<span>${ee(y)}</span><span>${ee(C)}</span>`, _;
|
|
581
|
-
}, o =
|
|
587
|
+
}, o = ge[e.locale] ? e.locale : "en", s = ge[o], r = i("cm-add_child", s.addChild, "tab"), l = i("cm-add_parent", s.addParent, ""), c = i("cm-add_sibling", s.addSibling, "enter"), h = i("cm-remove_child", s.removeNode, "delete"), a = i("cm-fucus", s.focus, ""), u = i("cm-unfucus", s.cancelFocus, ""), d = i("cm-up", s.moveUp, "PgUp"), p = i("cm-down", s.moveDown, "Pgdn"), g = i("cm-down", s.link, ""), m = i("cm-down", s.summary, ""), f = document.createElement("ul");
|
|
582
588
|
if (f.className = "menu-list", f.appendChild(r), f.appendChild(l), f.appendChild(c), f.appendChild(h), (!t || t.focus) && (f.appendChild(a), f.appendChild(u)), f.appendChild(d), f.appendChild(p), f.appendChild(m), (!t || t.link) && f.appendChild(g), t && t.extend)
|
|
583
589
|
for (let b = 0; b < t.extend.length; b++) {
|
|
584
590
|
const y = t.extend[b], C = i(y.name, y.name, y.key || "");
|
|
@@ -640,7 +646,7 @@ const Nt = (e) => {
|
|
|
640
646
|
}, Ct = (e) => {
|
|
641
647
|
const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
|
|
642
648
|
e.selectNode(t[Math.ceil(t.length / 2) - 1]);
|
|
643
|
-
},
|
|
649
|
+
}, ve = (e) => {
|
|
644
650
|
e.selectNode(e.map.querySelector("me-root>me-tpc"));
|
|
645
651
|
};
|
|
646
652
|
function _t(e) {
|
|
@@ -676,7 +682,7 @@ function _t(e) {
|
|
|
676
682
|
if (!e.currentNode)
|
|
677
683
|
return;
|
|
678
684
|
const i = e.currentNode.nodeObj, o = e.currentNode.offsetParent.offsetParent.parentElement;
|
|
679
|
-
e.currentNode.nodeObj.root ? Nt(e) : o.className === "rhs" ? (s = i.parent) != null && s.root ?
|
|
685
|
+
e.currentNode.nodeObj.root ? Nt(e) : o.className === "rhs" ? (s = i.parent) != null && s.root ? ve(e) : e.selectParent() : o.className === "lhs" && e.selectFirstChild();
|
|
680
686
|
},
|
|
681
687
|
39: (n) => {
|
|
682
688
|
var s;
|
|
@@ -685,7 +691,7 @@ function _t(e) {
|
|
|
685
691
|
if (!e.currentNode)
|
|
686
692
|
return;
|
|
687
693
|
const i = e.currentNode.nodeObj, o = e.currentNode.offsetParent.offsetParent.parentElement;
|
|
688
|
-
i.root ? Ct(e) : o.className === "lhs" ? (s = i.parent) != null && s.root ?
|
|
694
|
+
i.root ? Ct(e) : o.className === "lhs" ? (s = i.parent) != null && s.root ? ve(e) : e.selectParent() : o.className === "rhs" && e.selectFirstChild();
|
|
689
695
|
},
|
|
690
696
|
33() {
|
|
691
697
|
e.moveUpNode();
|
|
@@ -767,24 +773,24 @@ function kt(e, t) {
|
|
|
767
773
|
e.beginEdit();
|
|
768
774
|
};
|
|
769
775
|
}
|
|
770
|
-
const
|
|
776
|
+
const ce = document, St = function(e, t) {
|
|
771
777
|
if (!t)
|
|
772
|
-
return
|
|
778
|
+
return ae(e), e;
|
|
773
779
|
const n = e.getElementsByClassName("insert-preview"), i = `insert-preview ${t} show`;
|
|
774
780
|
if (n.length > 0)
|
|
775
781
|
n[0].className = i;
|
|
776
782
|
else {
|
|
777
|
-
const o =
|
|
783
|
+
const o = ce.createElement("div");
|
|
778
784
|
o.className = i, e.appendChild(o);
|
|
779
785
|
}
|
|
780
786
|
return e;
|
|
781
|
-
},
|
|
787
|
+
}, ae = function(e) {
|
|
782
788
|
if (!e)
|
|
783
789
|
return;
|
|
784
790
|
const t = e.getElementsByClassName("insert-preview");
|
|
785
791
|
for (const n of t || [])
|
|
786
792
|
n.remove();
|
|
787
|
-
},
|
|
793
|
+
}, be = function(e, t) {
|
|
788
794
|
const n = t.parentElement.parentElement.contains(e);
|
|
789
795
|
return e && e.tagName === "ME-TPC" && e !== t && !n && e.nodeObj.root !== !0;
|
|
790
796
|
}, Lt = function(e) {
|
|
@@ -809,7 +815,7 @@ function Mt(e) {
|
|
|
809
815
|
const l = r.target;
|
|
810
816
|
if (l.style.opacity = "", !i)
|
|
811
817
|
return;
|
|
812
|
-
|
|
818
|
+
ae(i);
|
|
813
819
|
const c = t.nodeObj;
|
|
814
820
|
switch (n) {
|
|
815
821
|
case "before":
|
|
@@ -828,15 +834,15 @@ function Mt(e) {
|
|
|
828
834
|
Ke(function(r) {
|
|
829
835
|
if (!t)
|
|
830
836
|
return;
|
|
831
|
-
|
|
832
|
-
const l =
|
|
833
|
-
if (
|
|
837
|
+
ae(i);
|
|
838
|
+
const l = ce.elementFromPoint(r.clientX, r.clientY - s);
|
|
839
|
+
if (be(l, t)) {
|
|
834
840
|
i = l;
|
|
835
841
|
const c = l.getBoundingClientRect().y;
|
|
836
842
|
r.clientY > c + l.clientHeight ? n = "after" : r.clientY > c + l.clientHeight / 2 && (n = "in");
|
|
837
843
|
} else {
|
|
838
|
-
const c =
|
|
839
|
-
if (
|
|
844
|
+
const c = ce.elementFromPoint(r.clientX, r.clientY + s);
|
|
845
|
+
if (be(c, t)) {
|
|
840
846
|
i = c;
|
|
841
847
|
const h = c.getBoundingClientRect().y;
|
|
842
848
|
r.clientY < h ? n = "before" : r.clientY < h + c.clientHeight / 2 && (n = "in");
|
|
@@ -925,13 +931,13 @@ class jt {
|
|
|
925
931
|
this._listeners.clear();
|
|
926
932
|
}
|
|
927
933
|
}
|
|
928
|
-
const
|
|
934
|
+
const ye = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
929
935
|
function O({ style: e }, t, n) {
|
|
930
936
|
if (typeof t == "object")
|
|
931
937
|
for (const [i, o] of Object.entries(t))
|
|
932
|
-
o !== void 0 && (e[i] =
|
|
938
|
+
o !== void 0 && (e[i] = ye(o));
|
|
933
939
|
else
|
|
934
|
-
n !== void 0 && (e[t] =
|
|
940
|
+
n !== void 0 && (e[t] = ye(n));
|
|
935
941
|
}
|
|
936
942
|
function Be(e) {
|
|
937
943
|
return (t, n, i, o = {}) => {
|
|
@@ -947,7 +953,7 @@ const q = Be("addEventListener"), A = Be("removeEventListener"), Q = (e) => {
|
|
|
947
953
|
const { clientX: n, clientY: i, target: o } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
948
954
|
return { x: n, y: i, target: o };
|
|
949
955
|
};
|
|
950
|
-
function
|
|
956
|
+
function xe(e, t, n = "touch") {
|
|
951
957
|
switch (n) {
|
|
952
958
|
case "center": {
|
|
953
959
|
const i = t.left + t.width / 2, o = t.top + t.height / 2;
|
|
@@ -980,7 +986,7 @@ const Ht = () => matchMedia("(hover: none), (pointer: coarse)").matches, Bt = ()
|
|
|
980
986
|
cancelAnimationFrame(n), i = !1;
|
|
981
987
|
}
|
|
982
988
|
};
|
|
983
|
-
}, { abs: j, max:
|
|
989
|
+
}, { abs: j, max: we, min: Ee, ceil: Ne } = Math;
|
|
984
990
|
class ze extends jt {
|
|
985
991
|
constructor(t) {
|
|
986
992
|
var n, i, o, s, r;
|
|
@@ -1058,7 +1064,7 @@ class ze extends jt {
|
|
|
1058
1064
|
_onTapStart(t, n = !1) {
|
|
1059
1065
|
const { x: i, y: o, target: s } = Q(t), { _options: r } = this, { document: l } = this._options, c = s.getBoundingClientRect(), h = F(r.startAreas, r.document), a = F(r.boundaries, r.document);
|
|
1060
1066
|
this._targetElement = a.find(
|
|
1061
|
-
(p) =>
|
|
1067
|
+
(p) => xe(p.getBoundingClientRect(), c)
|
|
1062
1068
|
);
|
|
1063
1069
|
const u = t.composedPath();
|
|
1064
1070
|
if (!this._targetElement || !h.find((p) => u.includes(p)) || !a.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
@@ -1142,7 +1148,7 @@ class ze extends jt {
|
|
|
1142
1148
|
return;
|
|
1143
1149
|
}
|
|
1144
1150
|
const { scrollTop: u, scrollLeft: d } = h;
|
|
1145
|
-
o.y && (h.scrollTop +=
|
|
1151
|
+
o.y && (h.scrollTop += Ne(o.y / c), s.y1 -= h.scrollTop - u), o.x && (h.scrollLeft += Ne(o.x / c), s.x1 -= h.scrollLeft - d), l.next(t), requestAnimationFrame(a);
|
|
1146
1152
|
};
|
|
1147
1153
|
requestAnimationFrame(a);
|
|
1148
1154
|
} else
|
|
@@ -1166,7 +1172,7 @@ class ze extends jt {
|
|
|
1166
1172
|
let { x2: m, y2: f } = n;
|
|
1167
1173
|
const { behaviour: { scrolling: { startScrollMargins: v } } } = s;
|
|
1168
1174
|
m < d.left + v.x ? (t.x = h ? -j(d.left - m + v.x) : 0, m = m < d.left ? d.left : m) : m > d.right - v.x ? (t.x = a - h - u ? j(d.left + d.width - m - v.x) : 0, m = m > d.right ? d.right : m) : t.x = 0, f < d.top + v.y ? (t.y = r ? -j(d.top - f + v.y) : 0, f = f < d.top ? d.top : f) : f > d.bottom - v.y ? (t.y = l - r - c ? j(d.top + d.height - f - v.y) : 0, f = f > d.bottom ? d.bottom : f) : t.y = 0;
|
|
1169
|
-
const x =
|
|
1175
|
+
const x = Ee(p, m), b = Ee(g, f), y = we(p, m), C = we(g, f);
|
|
1170
1176
|
i.x = x, i.y = b, i.width = y - x, i.height = C - b;
|
|
1171
1177
|
}
|
|
1172
1178
|
_redrawSelectionArea() {
|
|
@@ -1182,7 +1188,7 @@ class ze extends jt {
|
|
|
1182
1188
|
const { _selectables: t, _options: n, _selection: i, _areaRect: o } = this, { stored: s, selected: r, touched: l } = i, { intersect: c, overlap: h } = n.behaviour, a = h === "invert", u = [], d = [], p = [];
|
|
1183
1189
|
for (let m = 0; m < t.length; m++) {
|
|
1184
1190
|
const f = t[m];
|
|
1185
|
-
if (
|
|
1191
|
+
if (xe(o, f.getBoundingClientRect(), c)) {
|
|
1186
1192
|
if (r.includes(f))
|
|
1187
1193
|
s.includes(f) && !l.includes(f) && l.push(f);
|
|
1188
1194
|
else if (a && s.includes(f)) {
|
|
@@ -1514,7 +1520,7 @@ const Ft = function(e, t, n) {
|
|
|
1514
1520
|
toCenter: nn,
|
|
1515
1521
|
unselectNode: Vt,
|
|
1516
1522
|
unselectNodes: Yt
|
|
1517
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1523
|
+
}, Symbol.toStringTag, { value: "Module" })), re = function(e) {
|
|
1518
1524
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1519
1525
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1520
1526
|
}, qe = function(e, t) {
|
|
@@ -1532,7 +1538,7 @@ const Ft = function(e, t, n) {
|
|
|
1532
1538
|
const n = e.nodeObj, i = De(n);
|
|
1533
1539
|
i.style && t.style && (t.style = Object.assign(i.style, t.style));
|
|
1534
1540
|
const o = Object.assign(n, t);
|
|
1535
|
-
|
|
1541
|
+
de(e, o), this.linkDiv(), this.bus.fire("operation", {
|
|
1536
1542
|
name: "reshapeNode",
|
|
1537
1543
|
obj: o,
|
|
1538
1544
|
origin: i
|
|
@@ -1581,7 +1587,7 @@ const Ft = function(e, t, n) {
|
|
|
1581
1587
|
const n = e || this.currentNode;
|
|
1582
1588
|
if (!n)
|
|
1583
1589
|
return;
|
|
1584
|
-
|
|
1590
|
+
re(n);
|
|
1585
1591
|
const i = n.nodeObj;
|
|
1586
1592
|
if (i.root === !0)
|
|
1587
1593
|
return;
|
|
@@ -1590,7 +1596,7 @@ const Ft = function(e, t, n) {
|
|
|
1590
1596
|
const s = n.parentElement.parentElement;
|
|
1591
1597
|
console.time("insertParent_DOM");
|
|
1592
1598
|
const { grp: r, top: l } = this.createWrapper(o, !0);
|
|
1593
|
-
l.appendChild(
|
|
1599
|
+
l.appendChild(se(!0)), s.insertAdjacentElement("afterend", r);
|
|
1594
1600
|
const c = this.createChildren([s]);
|
|
1595
1601
|
l.insertAdjacentElement("afterend", c), this.linkDiv(), t || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), console.timeEnd("insertParent_DOM"), this.bus.fire("operation", {
|
|
1596
1602
|
name: "insertParent",
|
|
@@ -1610,7 +1616,7 @@ const Ft = function(e, t, n) {
|
|
|
1610
1616
|
o.nextSibling.appendChild(s);
|
|
1611
1617
|
else {
|
|
1612
1618
|
const h = this.createChildren([s]);
|
|
1613
|
-
o.appendChild(
|
|
1619
|
+
o.appendChild(se(!0)), o.insertAdjacentElement("afterend", h);
|
|
1614
1620
|
}
|
|
1615
1621
|
this.linkDiv(s.offsetParent);
|
|
1616
1622
|
} else
|
|
@@ -1667,7 +1673,7 @@ const Ft = function(e, t, n) {
|
|
|
1667
1673
|
const n = t.nodeObj;
|
|
1668
1674
|
if (n.root === !0)
|
|
1669
1675
|
throw new Error("Can not remove root node");
|
|
1670
|
-
const i = n.parent.children, o = i.findIndex((c) => c === n), s =
|
|
1676
|
+
const i = n.parent.children, o = i.findIndex((c) => c === n), s = oe(n), r = t.parentNode;
|
|
1671
1677
|
if (s === 0) {
|
|
1672
1678
|
const c = r.parentNode.parentNode;
|
|
1673
1679
|
c.tagName !== "ME-MAIN" && c.previousSibling.children[1].remove();
|
|
@@ -1677,13 +1683,6 @@ const Ft = function(e, t, n) {
|
|
|
1677
1683
|
this.selectNode(E(c.id));
|
|
1678
1684
|
} else
|
|
1679
1685
|
this.selectNode(E(n.parent.id));
|
|
1680
|
-
for (const c in this.linkData) {
|
|
1681
|
-
const h = this.linkData[c];
|
|
1682
|
-
if (h.from === n.id || h.to === n.id) {
|
|
1683
|
-
const a = this.mindElixirBox.querySelector(`[data-linkid=${this.linkData[c].id}]`);
|
|
1684
|
-
this.removeLink(a);
|
|
1685
|
-
}
|
|
1686
|
-
}
|
|
1687
1686
|
r.parentNode.remove(), this.linkDiv(), this.bus.fire("operation", {
|
|
1688
1687
|
name: "removeNode",
|
|
1689
1688
|
obj: n,
|
|
@@ -1700,11 +1699,11 @@ const Ft = function(e, t, n) {
|
|
|
1700
1699
|
console.time("moveNode"), nt(n, i), T(this.nodeData);
|
|
1701
1700
|
const s = e.parentElement, r = t.parentElement;
|
|
1702
1701
|
if (r.tagName === "ME-PARENT")
|
|
1703
|
-
if (
|
|
1702
|
+
if (re(e), r.children[1])
|
|
1704
1703
|
r.nextSibling.appendChild(s.parentElement);
|
|
1705
1704
|
else {
|
|
1706
1705
|
const c = this.createChildren([s.parentElement]);
|
|
1707
|
-
r.appendChild(
|
|
1706
|
+
r.appendChild(se(!0)), r.parentElement.insertBefore(c, r.nextSibling);
|
|
1708
1707
|
}
|
|
1709
1708
|
else
|
|
1710
1709
|
r.tagName === "ME-ROOT" && (qe(this.direction, n), r.nextSibling.appendChild(s.parentElement));
|
|
@@ -1717,7 +1716,7 @@ const Ft = function(e, t, n) {
|
|
|
1717
1716
|
}, Cn = function(e, t) {
|
|
1718
1717
|
var h;
|
|
1719
1718
|
const n = e.nodeObj, i = t.nodeObj, o = (h = n.parent) == null ? void 0 : h.id;
|
|
1720
|
-
it(n, i), T(this.nodeData),
|
|
1719
|
+
it(n, i), T(this.nodeData), re(e);
|
|
1721
1720
|
const r = e.parentElement.parentNode;
|
|
1722
1721
|
t.parentElement.parentNode.insertAdjacentElement("beforebegin", r), this.linkDiv(), this.bus.fire("operation", {
|
|
1723
1722
|
name: "moveNodeBefore",
|
|
@@ -1728,7 +1727,7 @@ const Ft = function(e, t, n) {
|
|
|
1728
1727
|
}, _n = function(e, t) {
|
|
1729
1728
|
var h;
|
|
1730
1729
|
const n = e.nodeObj, i = t.nodeObj, o = (h = n.parent) == null ? void 0 : h.id;
|
|
1731
|
-
ot(n, i), T(this.nodeData),
|
|
1730
|
+
ot(n, i), T(this.nodeData), re(e);
|
|
1732
1731
|
const r = e.parentElement.parentElement;
|
|
1733
1732
|
t.parentElement.parentElement.insertAdjacentElement("afterend", r), this.linkDiv(), this.bus.fire("operation", {
|
|
1734
1733
|
name: "moveNodeAfter",
|
|
@@ -1740,7 +1739,7 @@ const Ft = function(e, t, n) {
|
|
|
1740
1739
|
const t = e || this.currentNode;
|
|
1741
1740
|
t && this.editTopic(t);
|
|
1742
1741
|
}, Sn = function(e, t) {
|
|
1743
|
-
e.
|
|
1742
|
+
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1744
1743
|
}, Ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1745
1744
|
__proto__: null,
|
|
1746
1745
|
addChild: bn,
|
|
@@ -1790,10 +1789,10 @@ const Ft = function(e, t, n) {
|
|
|
1790
1789
|
this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
1791
1790
|
}
|
|
1792
1791
|
};
|
|
1793
|
-
},
|
|
1792
|
+
}, Ce = {
|
|
1794
1793
|
create: Ln
|
|
1795
1794
|
};
|
|
1796
|
-
function
|
|
1795
|
+
function ie(e, t, n) {
|
|
1797
1796
|
const { offsetLeft: i, offsetTop: o } = W(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, l = i + s / 2, c = o + r / 2, h = l + n.x, a = c + n.y;
|
|
1798
1797
|
return {
|
|
1799
1798
|
w: s,
|
|
@@ -1825,7 +1824,7 @@ const Mn = function(e, t, n, i) {
|
|
|
1825
1824
|
return;
|
|
1826
1825
|
const o = performance.now();
|
|
1827
1826
|
this.hideLinkController();
|
|
1828
|
-
const s =
|
|
1827
|
+
const s = ie(this, e, n.delta1), r = ie(this, t, n.delta2), { x: l, y: c } = V(s), { ctrlX: h, ctrlY: a } = s, { ctrlX: u, ctrlY: d } = r, { x: p, y: g } = V(r), m = $e(u, d, p, g), f = vt(
|
|
1829
1828
|
`M ${l} ${c} C ${h} ${a} ${u} ${d} ${p} ${g}`,
|
|
1830
1829
|
`M ${m.x1} ${m.y1} L ${p} ${g} L ${m.x2} ${m.y2}`
|
|
1831
1830
|
), v = l / 8 + h * 3 / 8 + u * 3 / 8 + p / 8, x = c / 8 + a * 3 / 8 + d * 3 / 8 + g / 8, b = Mn(n.label, v, x, this.theme.cssVar["--color"]);
|
|
@@ -1854,10 +1853,10 @@ const Mn = function(e, t, n, i) {
|
|
|
1854
1853
|
return;
|
|
1855
1854
|
this.hideLinkController();
|
|
1856
1855
|
const n = t.linkObj.id;
|
|
1857
|
-
delete this.linkData[n], t.remove()
|
|
1856
|
+
delete this.linkData[n], t.remove();
|
|
1858
1857
|
}, On = function(e) {
|
|
1859
1858
|
this.currentLink = e;
|
|
1860
|
-
const t = e.linkObj, n = E(t.from), i = E(t.to), o =
|
|
1859
|
+
const t = e.linkObj, n = E(t.from), i = E(t.to), o = ie(this, n, t.delta1), s = ie(this, i, t.delta2);
|
|
1861
1860
|
this.showLinkController(t, o, s);
|
|
1862
1861
|
}, An = function() {
|
|
1863
1862
|
this.currentLink = null, this.hideLinkController();
|
|
@@ -1876,7 +1875,7 @@ const Mn = function(e, t, n, i) {
|
|
|
1876
1875
|
y1: c + "",
|
|
1877
1876
|
x2: h + "",
|
|
1878
1877
|
y2: a + ""
|
|
1879
|
-
}), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 =
|
|
1878
|
+
}), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = Ce.create(this.P2), this.helper2 = Ce.create(this.P3), this.helper1.init(this.map, (u, d) => {
|
|
1880
1879
|
var f;
|
|
1881
1880
|
s = s - u / this.scaleVal, r = r - d / this.scaleVal;
|
|
1882
1881
|
const p = V({ ...t, ctrlX: s, ctrlY: r });
|
|
@@ -1926,7 +1925,13 @@ function Bn(e) {
|
|
|
1926
1925
|
o === "" ? i.label = origin : i.label = o, n.remove(), o !== origin && (t.innerHTML = i.label, this.linkDiv());
|
|
1927
1926
|
}), console.timeEnd("editSummary");
|
|
1928
1927
|
}
|
|
1929
|
-
|
|
1928
|
+
function zn() {
|
|
1929
|
+
for (const e in this.linkData) {
|
|
1930
|
+
const t = this.linkData[e];
|
|
1931
|
+
(!te(t.from, this.nodeData) || !te(t.to, this.nodeData)) && delete this.linkData[t.id];
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1930
1935
|
__proto__: null,
|
|
1931
1936
|
createLink: $n,
|
|
1932
1937
|
drawCustomLink: Tn,
|
|
@@ -1936,8 +1941,9 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1936
1941
|
renderCustomLink: Hn,
|
|
1937
1942
|
selectLink: On,
|
|
1938
1943
|
showLinkController: jn,
|
|
1944
|
+
tidyCustomLink: zn,
|
|
1939
1945
|
unselectLink: An
|
|
1940
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1946
|
+
}, Symbol.toStringTag, { value: "Module" })), qn = function(e) {
|
|
1941
1947
|
var c, h;
|
|
1942
1948
|
if (e.length === 0)
|
|
1943
1949
|
throw new Error("No selected node.");
|
|
@@ -1980,10 +1986,10 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1980
1986
|
start: s,
|
|
1981
1987
|
end: r
|
|
1982
1988
|
};
|
|
1983
|
-
},
|
|
1989
|
+
}, Fn = function(e) {
|
|
1984
1990
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1985
1991
|
return t.setAttribute("id", e), t;
|
|
1986
|
-
},
|
|
1992
|
+
}, _e = function(e, t) {
|
|
1987
1993
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1988
1994
|
return N(n, {
|
|
1989
1995
|
d: e,
|
|
@@ -1992,7 +1998,7 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1992
1998
|
"stroke-linecap": "round",
|
|
1993
1999
|
"stroke-width": "2"
|
|
1994
2000
|
}), n;
|
|
1995
|
-
},
|
|
2001
|
+
}, ke = function(e, t, n, i, o) {
|
|
1996
2002
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1997
2003
|
return N(s, {
|
|
1998
2004
|
"text-anchor": i,
|
|
@@ -2000,37 +2006,37 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2000
2006
|
y: n + "",
|
|
2001
2007
|
fill: o || "#666"
|
|
2002
2008
|
}), s.innerHTML = e, s;
|
|
2003
|
-
},
|
|
2009
|
+
}, Vn = (e) => E(e).parentElement.parentElement, Wn = function({ parent: e, start: t }) {
|
|
2004
2010
|
var s, r;
|
|
2005
2011
|
const n = E(e), i = n.nodeObj;
|
|
2006
2012
|
let o;
|
|
2007
2013
|
return i.root === !0 ? o = (s = E(i.children[t].id).closest("me-main")) == null ? void 0 : s.className : o = (r = n.closest("me-main")) == null ? void 0 : r.className, o;
|
|
2008
2014
|
}, We = function(e, t) {
|
|
2009
2015
|
var _;
|
|
2010
|
-
const { id: n, text: i, parent: o, start: s, end: r } = t, l = e.nodes, h = E(o).nodeObj, a =
|
|
2016
|
+
const { id: n, text: i, parent: o, start: s, end: r } = t, l = e.nodes, h = E(o).nodeObj, a = Wn(t);
|
|
2011
2017
|
let u = 1 / 0, d = 0, p = 0, g = 0;
|
|
2012
2018
|
for (let Y = s; Y <= r; Y++) {
|
|
2013
|
-
const
|
|
2014
|
-
if (!
|
|
2019
|
+
const he = (_ = h.children) == null ? void 0 : _[Y];
|
|
2020
|
+
if (!he)
|
|
2015
2021
|
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
2016
|
-
const G =
|
|
2017
|
-
Y === s && (p =
|
|
2022
|
+
const G = Vn(he.id), { offsetLeft: J, offsetTop: ue } = W(l, G);
|
|
2023
|
+
Y === s && (p = ue), Y === r && (g = ue + G.offsetHeight), J < u && (u = J), G.offsetWidth + J > d && (d = G.offsetWidth + J);
|
|
2018
2024
|
}
|
|
2019
2025
|
let m, f;
|
|
2020
2026
|
const v = p + 10, x = g + 10, b = (v + x) / 2, y = e.theme.cssVar["--color"];
|
|
2021
|
-
a === "lhs" ? (m =
|
|
2022
|
-
const C =
|
|
2027
|
+
a === "lhs" ? (m = _e(`M ${u + 10} ${v} c -5 0 -10 5 -10 10 L ${u} ${x - 10} c 0 5 5 10 10 10 M ${u} ${b} h -10`, y), f = ke(i, u - 20, b + 6, "end", y)) : (m = _e(`M ${d - 10} ${v} c 5 0 10 5 10 10 L ${d} ${x - 10} c 0 5 -5 10 -10 10 M ${d} ${b} h 10`, y), f = ke(i, d + 20, b + 6, "start", y));
|
|
2028
|
+
const C = Fn("s-" + n);
|
|
2023
2029
|
return C.appendChild(m), C.appendChild(f), C.summaryObj = t, e.summarySvg.appendChild(C), C;
|
|
2024
|
-
},
|
|
2030
|
+
}, Yn = function() {
|
|
2025
2031
|
let e = [];
|
|
2026
2032
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2027
|
-
const { parent: t, start: n, end: i } =
|
|
2033
|
+
const { parent: t, start: n, end: i } = qn(e), o = { id: U(), parent: t, start: n, end: i, text: "summary" }, s = We(this, o);
|
|
2028
2034
|
this.summaries.push(o), this.editSummary(s);
|
|
2029
|
-
},
|
|
2035
|
+
}, In = function(e) {
|
|
2030
2036
|
var n;
|
|
2031
2037
|
const t = this.summaries.findIndex((i) => i.id === e);
|
|
2032
2038
|
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
|
|
2033
|
-
},
|
|
2039
|
+
}, Xn = function(e) {
|
|
2034
2040
|
const t = e.children[1].getBBox(), n = 6, i = 3, o = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2035
2041
|
N(o, {
|
|
2036
2042
|
x: t.x - n + "",
|
|
@@ -2042,14 +2048,14 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2042
2048
|
"stroke-width": "2",
|
|
2043
2049
|
fill: "none"
|
|
2044
2050
|
}), o.classList.add("selected"), e.appendChild(o), this.currentSummary = e;
|
|
2045
|
-
},
|
|
2051
|
+
}, Kn = function() {
|
|
2046
2052
|
var e, t;
|
|
2047
2053
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2048
|
-
},
|
|
2054
|
+
}, Un = function() {
|
|
2049
2055
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2050
2056
|
We(this, e);
|
|
2051
2057
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2052
|
-
},
|
|
2058
|
+
}, Gn = function(e) {
|
|
2053
2059
|
if (console.time("editSummary"), !e)
|
|
2054
2060
|
return;
|
|
2055
2061
|
const t = e.childNodes[1];
|
|
@@ -2062,16 +2068,16 @@ const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2062
2068
|
origin
|
|
2063
2069
|
}));
|
|
2064
2070
|
}), console.timeEnd("editSummary");
|
|
2065
|
-
},
|
|
2071
|
+
}, Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2066
2072
|
__proto__: null,
|
|
2067
|
-
createSummary:
|
|
2068
|
-
editSummary:
|
|
2069
|
-
removeSummary:
|
|
2070
|
-
renderSummary:
|
|
2071
|
-
selectSummary:
|
|
2072
|
-
unselectSummary:
|
|
2073
|
+
createSummary: Yn,
|
|
2074
|
+
editSummary: Gn,
|
|
2075
|
+
removeSummary: In,
|
|
2076
|
+
renderSummary: Un,
|
|
2077
|
+
selectSummary: Xn,
|
|
2078
|
+
unselectSummary: Kn
|
|
2073
2079
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2074
|
-
function
|
|
2080
|
+
function Qn(e, t) {
|
|
2075
2081
|
const n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
2076
2082
|
return N(n, {
|
|
2077
2083
|
version: "1.1",
|
|
@@ -2080,17 +2086,17 @@ function Jn(e, t) {
|
|
|
2080
2086
|
width: t
|
|
2081
2087
|
}), n;
|
|
2082
2088
|
}
|
|
2083
|
-
function
|
|
2089
|
+
function Zn(e, t) {
|
|
2084
2090
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2085
2091
|
}
|
|
2086
|
-
function
|
|
2092
|
+
function ei(e, t, n, i) {
|
|
2087
2093
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2088
2094
|
return e.childNodes[0].textContent.split(`
|
|
2089
2095
|
`).forEach((l, c) => {
|
|
2090
2096
|
const h = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2091
2097
|
N(h, {
|
|
2092
2098
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2093
|
-
y: i + parseInt(t.paddingTop) +
|
|
2099
|
+
y: i + parseInt(t.paddingTop) + Zn(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
2094
2100
|
"text-anchor": "start",
|
|
2095
2101
|
"font-family": t.fontFamily,
|
|
2096
2102
|
"font-size": `${t.fontSize}`,
|
|
@@ -2099,7 +2105,7 @@ function Zn(e, t, n, i) {
|
|
|
2099
2105
|
}), h.innerHTML = l, o.appendChild(h);
|
|
2100
2106
|
}), o;
|
|
2101
2107
|
}
|
|
2102
|
-
function
|
|
2108
|
+
function ti(e, t, n, i) {
|
|
2103
2109
|
const o = e.childNodes[0].textContent, s = document.createElementNS("http://www.w3.org/2000/svg", "foreignObject");
|
|
2104
2110
|
N(s, {
|
|
2105
2111
|
x: n + parseInt(t.paddingLeft) + "",
|
|
@@ -2113,7 +2119,7 @@ function ei(e, t, n, i) {
|
|
|
2113
2119
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2114
2120
|
}), r.innerHTML = o, s.appendChild(r), s;
|
|
2115
2121
|
}
|
|
2116
|
-
function
|
|
2122
|
+
function le(e, t, n = !1) {
|
|
2117
2123
|
const i = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = W(e.nodes, t), r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2118
2124
|
N(r, {
|
|
2119
2125
|
x: o + "",
|
|
@@ -2129,9 +2135,9 @@ function re(e, t, n = !1) {
|
|
|
2129
2135
|
const l = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2130
2136
|
l.appendChild(r);
|
|
2131
2137
|
let c;
|
|
2132
|
-
return n ? c =
|
|
2138
|
+
return n ? c = ti(t, i, o, s) : c = ei(t, i, o, s), l.appendChild(c), l;
|
|
2133
2139
|
}
|
|
2134
|
-
function
|
|
2140
|
+
function ni(e, t) {
|
|
2135
2141
|
const n = getComputedStyle(t), { offsetLeft: i, offsetTop: o } = W(e.nodes, t), s = document.createElementNS("http://www.w3.org/2000/svg", "a"), r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2136
2142
|
return N(r, {
|
|
2137
2143
|
x: i + "",
|
|
@@ -2143,39 +2149,39 @@ function ti(e, t) {
|
|
|
2143
2149
|
fill: `${n.color}`
|
|
2144
2150
|
}), r.innerHTML = t.textContent, s.appendChild(r), s.setAttribute("href", t.href), s;
|
|
2145
2151
|
}
|
|
2146
|
-
const Z = 100,
|
|
2147
|
-
var
|
|
2148
|
-
const
|
|
2149
|
-
N(
|
|
2152
|
+
const Z = 100, ii = '<?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">', Ye = (e, t = !1) => {
|
|
2153
|
+
var u, d, p;
|
|
2154
|
+
const n = e.nodes, i = n.offsetHeight + Z * 2, o = n.offsetWidth + Z * 2, s = Qn(i + "px", o + "px"), r = document.createElementNS("http://www.w3.org/2000/svg", "svg"), l = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2155
|
+
N(l, {
|
|
2150
2156
|
x: "0",
|
|
2151
2157
|
y: "0",
|
|
2152
|
-
width: `${
|
|
2153
|
-
height: `${
|
|
2158
|
+
width: `${o}`,
|
|
2159
|
+
height: `${i}`,
|
|
2154
2160
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2155
|
-
}),
|
|
2156
|
-
const
|
|
2157
|
-
|
|
2161
|
+
}), s.appendChild(l), n.querySelectorAll(".subLines").forEach((g) => {
|
|
2162
|
+
const m = g.cloneNode(!0), { offsetLeft: f, offsetTop: v } = W(n, g.parentElement);
|
|
2163
|
+
m.setAttribute("x", `${f}`), m.setAttribute("y", `${v}`), r.appendChild(m);
|
|
2158
2164
|
});
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2163
|
-
const
|
|
2164
|
-
return
|
|
2165
|
-
|
|
2166
|
-
}),
|
|
2167
|
-
|
|
2168
|
-
}),
|
|
2169
|
-
|
|
2170
|
-
}),
|
|
2171
|
-
|
|
2172
|
-
}), N(
|
|
2165
|
+
const c = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
|
|
2166
|
+
c && r.appendChild(c);
|
|
2167
|
+
const h = (d = n.querySelector(".topiclinks")) == null ? void 0 : d.cloneNode(!0);
|
|
2168
|
+
h && r.appendChild(h);
|
|
2169
|
+
const a = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
2170
|
+
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((g) => {
|
|
2171
|
+
r.appendChild(le(e, g.text, !t));
|
|
2172
|
+
}), n.querySelectorAll(".tags > span").forEach((g) => {
|
|
2173
|
+
r.appendChild(le(e, g));
|
|
2174
|
+
}), n.querySelectorAll(".icons > span").forEach((g) => {
|
|
2175
|
+
r.appendChild(le(e, g));
|
|
2176
|
+
}), n.querySelectorAll(".hyper-link").forEach((g) => {
|
|
2177
|
+
r.appendChild(ni(e, g));
|
|
2178
|
+
}), N(r, {
|
|
2173
2179
|
x: Z + "",
|
|
2174
2180
|
y: Z + "",
|
|
2175
2181
|
overflow: "visible"
|
|
2176
|
-
}),
|
|
2182
|
+
}), s.appendChild(r), ii + s.outerHTML;
|
|
2177
2183
|
};
|
|
2178
|
-
function
|
|
2184
|
+
function oi(e) {
|
|
2179
2185
|
return new Promise((t, n) => {
|
|
2180
2186
|
const i = new FileReader();
|
|
2181
2187
|
i.onload = (o) => {
|
|
@@ -2185,36 +2191,36 @@ function ii(e) {
|
|
|
2185
2191
|
}, i.readAsDataURL(e);
|
|
2186
2192
|
});
|
|
2187
2193
|
}
|
|
2188
|
-
const
|
|
2189
|
-
const
|
|
2190
|
-
return new Blob([
|
|
2191
|
-
},
|
|
2192
|
-
const
|
|
2193
|
-
return new Promise((
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2196
|
-
const
|
|
2197
|
-
|
|
2198
|
-
},
|
|
2194
|
+
const si = function(e = !1) {
|
|
2195
|
+
const t = Ye(this, e);
|
|
2196
|
+
return new Blob([t], { type: "image/svg+xml" });
|
|
2197
|
+
}, ri = async function(e = !1) {
|
|
2198
|
+
const t = Ye(this, e), n = new Blob([t], { type: "image/svg+xml" }), i = await oi(n);
|
|
2199
|
+
return new Promise((o, s) => {
|
|
2200
|
+
const r = new Image();
|
|
2201
|
+
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2202
|
+
const l = document.createElement("canvas");
|
|
2203
|
+
l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(o, "image/png", 1);
|
|
2204
|
+
}, r.src = i, r.onerror = s;
|
|
2199
2205
|
});
|
|
2200
|
-
},
|
|
2206
|
+
}, li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2201
2207
|
__proto__: null,
|
|
2202
|
-
exportPng:
|
|
2203
|
-
exportSvg:
|
|
2208
|
+
exportPng: ri,
|
|
2209
|
+
exportSvg: si
|
|
2204
2210
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2205
|
-
function
|
|
2211
|
+
function ci(e, t) {
|
|
2206
2212
|
return async function(...n) {
|
|
2207
2213
|
const i = this.before[t];
|
|
2208
2214
|
i && !await i.apply(this, n) || e.apply(this, n);
|
|
2209
2215
|
};
|
|
2210
2216
|
}
|
|
2211
|
-
const
|
|
2212
|
-
for (let e = 0; e <
|
|
2213
|
-
const t =
|
|
2214
|
-
Ie[t] =
|
|
2217
|
+
const Se = Object.keys(Ve), Ie = {};
|
|
2218
|
+
for (let e = 0; e < Se.length; e++) {
|
|
2219
|
+
const t = Se[e];
|
|
2220
|
+
Ie[t] = ci(Ve[t], t);
|
|
2215
2221
|
}
|
|
2216
|
-
const
|
|
2217
|
-
getObjById:
|
|
2222
|
+
const ai = {
|
|
2223
|
+
getObjById: te,
|
|
2218
2224
|
generateNewObj: Ue,
|
|
2219
2225
|
layout: lt,
|
|
2220
2226
|
linkDiv: bt,
|
|
@@ -2227,13 +2233,13 @@ const ci = {
|
|
|
2227
2233
|
changeTheme: qt,
|
|
2228
2234
|
...fn,
|
|
2229
2235
|
...Ie,
|
|
2230
|
-
...
|
|
2231
|
-
...
|
|
2232
|
-
...
|
|
2236
|
+
...Rn,
|
|
2237
|
+
...Jn,
|
|
2238
|
+
...li,
|
|
2233
2239
|
init(e) {
|
|
2234
2240
|
if (!e || !e.nodeData)
|
|
2235
2241
|
return new Error("MindElixir: `data` is required");
|
|
2236
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, T(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Ot(this), this.keypress && _t(this), this.editable && Rt(this), Xe() && this.mobileMenu ? kt(this) : this.contextMenu && Et(this, this.contextMenuOption), this.draggable && Mt(this), this.allowUndo && Tt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2242
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, T(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.tidyCustomLink(), this.toolBar && Ot(this), this.keypress && _t(this), this.editable && Rt(this), Xe() && this.mobileMenu ? kt(this) : this.contextMenu && Et(this, this.contextMenuOption), this.draggable && Mt(this), this.allowUndo && Tt(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
2237
2243
|
}
|
|
2238
2244
|
}, I = document;
|
|
2239
2245
|
function $({
|
|
@@ -2262,17 +2268,17 @@ function $({
|
|
|
2262
2268
|
throw new Error("MindElixir: el is not a valid element");
|
|
2263
2269
|
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", M + "px"), this.mindElixirBox = v, this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = s === void 0 ? !0 : s, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = a || "new node", this.editable = o === void 0 ? !0 : o, this.allowUndo = u === void 0 ? !1 : u, this.currentNode = null, this.currentLink = null, this.scaleVal = 1, this.tempDirection = null, this.mainLinkStyle = d || 0, this.subLinkStyle = p || 0, this.overflowHidden = g || !1, this.bus = rt.create(), this.container = I.createElement("div"), this.container.className = "map-container";
|
|
2264
2270
|
const b = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2265
|
-
this.theme = f || (b.matches ?
|
|
2271
|
+
this.theme = f || (b.matches ? Me : Le);
|
|
2266
2272
|
const y = I.createElement("div");
|
|
2267
|
-
y.className = "map-canvas", this.map = y, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = I.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = I.createElement("div"), this.P3 = I.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 =
|
|
2273
|
+
y.className = "map-canvas", this.map = y, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = I.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = I.createElement("div"), this.P3 = I.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = pe(), this.line2 = pe(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : st(this);
|
|
2268
2274
|
}
|
|
2269
|
-
$.prototype =
|
|
2275
|
+
$.prototype = ai;
|
|
2270
2276
|
$.LEFT = S;
|
|
2271
2277
|
$.RIGHT = H;
|
|
2272
2278
|
$.SIDE = K;
|
|
2273
|
-
$.THEME =
|
|
2274
|
-
$.DARK_THEME =
|
|
2275
|
-
$.version = "3.2.
|
|
2279
|
+
$.THEME = Le;
|
|
2280
|
+
$.DARK_THEME = Me;
|
|
2281
|
+
$.version = "3.2.5";
|
|
2276
2282
|
$.E = E;
|
|
2277
2283
|
$.new = (e) => ({
|
|
2278
2284
|
nodeData: {
|