mind-elixir 4.1.2 → 4.1.4

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.
Files changed (44) hide show
  1. package/dist/MindElixir.iife.js +7 -7
  2. package/dist/MindElixir.js +485 -489
  3. package/dist/MindElixirLite.iife.js +5 -5
  4. package/dist/MindElixirLite.js +388 -395
  5. package/package.json +6 -3
  6. package/dist/types/arrow.d.ts +0 -31
  7. package/dist/types/const.d.ts +0 -8
  8. package/dist/types/dev.d.ts +0 -1
  9. package/dist/types/docs.d.ts +0 -9
  10. package/dist/types/exampleData/1.cn.d.ts +0 -125
  11. package/dist/types/exampleData/1.d.ts +0 -3
  12. package/dist/types/exampleData/2.d.ts +0 -3
  13. package/dist/types/exampleData/3.d.ts +0 -3
  14. package/dist/types/exampleData/htmlText.d.ts +0 -3
  15. package/dist/types/i18n.d.ts +0 -16
  16. package/dist/types/index.d.ts +0 -107
  17. package/dist/types/interact.d.ts +0 -132
  18. package/dist/types/linkDiv.d.ts +0 -15
  19. package/dist/types/methods.d.ts +0 -86
  20. package/dist/types/mouse.d.ts +0 -2
  21. package/dist/types/nodeOperation.d.ts +0 -18
  22. package/dist/types/plugin/contextMenu.d.ts +0 -3
  23. package/dist/types/plugin/exportImage.d.ts +0 -3
  24. package/dist/types/plugin/keypress.d.ts +0 -2
  25. package/dist/types/plugin/mobileMenu.d.ts +0 -3
  26. package/dist/types/plugin/nodeDraggable.d.ts +0 -2
  27. package/dist/types/plugin/operationHistory.d.ts +0 -2
  28. package/dist/types/plugin/selection.d.ts +0 -2
  29. package/dist/types/plugin/toolBar.d.ts +0 -3
  30. package/dist/types/summary.d.ts +0 -18
  31. package/dist/types/types/dom.d.ts +0 -50
  32. package/dist/types/types/global.d.ts +0 -7
  33. package/dist/types/types/index.d.ts +0 -169
  34. package/dist/types/utils/LinkDragMoveHelper.d.ts +0 -28
  35. package/dist/types/utils/dom.d.ts +0 -18
  36. package/dist/types/utils/domManipulation.d.ts +0 -5
  37. package/dist/types/utils/dragMoveHelper.d.ts +0 -7
  38. package/dist/types/utils/generateBranch.d.ts +0 -27
  39. package/dist/types/utils/index.d.ts +0 -30
  40. package/dist/types/utils/layout.d.ts +0 -4
  41. package/dist/types/utils/objectManipulation.d.ts +0 -7
  42. package/dist/types/utils/pubsub.d.ts +0 -80
  43. package/dist/types/utils/svg.d.ts +0 -7
  44. package/dist/types/utils/theme.d.ts +0 -4
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var i=document.createElement("style");i.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none;margin-left:.3em}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;color:var(--root-color);padding:10px var(--gap);border-radius:var(--root-radius);white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container .map-canvas me-root me-tpc #input-box{padding:10px var(--gap)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-main>me-wrapper>me-parent>me-tpc #input-box{padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(i)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  (function(e) {
3
3
  var t, n, o, s, i, r, 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__) {
@@ -14,8 +14,8 @@
14
14
  i || (i = !0, o());
15
15
  }
16
16
  t = function() {
17
- var h, u, a, p;
18
- (p = document.createElement("div")).innerHTML = l, l = null, (a = p.getElementsByTagName("svg")[0]) && (a.setAttribute("aria-hidden", "true"), a.style.position = "absolute", a.style.width = 0, a.style.height = 0, a.style.overflow = "hidden", h = a, (u = document.body).firstChild ? (p = h, (a = u.firstChild).parentNode.insertBefore(p, a)) : u.appendChild(h));
17
+ var h, a, f, m;
18
+ (m = document.createElement("div")).innerHTML = l, l = null, (f = m.getElementsByTagName("svg")[0]) && (f.setAttribute("aria-hidden", "true"), f.style.position = "absolute", f.style.width = 0, f.style.height = 0, f.style.overflow = "hidden", h = f, (a = document.body).firstChild ? (m = h, (f = a.firstChild).parentNode.insertBefore(m, f)) : a.appendChild(h));
19
19
  }, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
20
20
  document.removeEventListener("DOMContentLoaded", n, !1), t();
21
21
  }, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, s = e.document, i = !1, (r = function() {
@@ -29,7 +29,7 @@
29
29
  s.readyState == "complete" && (s.onreadystatechange = null, d());
30
30
  });
31
31
  })(window);
32
- const q = 0, Q = 1, Z = 2, N = 30, ge = {
32
+ const q = 0, Q = 1, Z = 2, N = 30, ve = {
33
33
  name: "Latte",
34
34
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
35
35
  cssVar: {
@@ -41,7 +41,7 @@ const q = 0, Q = 1, Z = 2, N = 30, ge = {
41
41
  "--panel-bgcolor": "#ffffff",
42
42
  "--panel-border-color": "#eaeaea"
43
43
  }
44
- }, ve = {
44
+ }, ye = {
45
45
  name: "Dark",
46
46
  palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
47
47
  cssVar: {
@@ -74,7 +74,7 @@ const K = function(e, t) {
74
74
  for (let n = 0; n < e.children.length; n++)
75
75
  ee(e.children[n], e);
76
76
  };
77
- function ye(e, t, n, o) {
77
+ function be(e, t, n, o) {
78
78
  const s = o - t, i = e - n;
79
79
  let r = Math.atan(Math.abs(s) / Math.abs(i)) / 3.14 * 180;
80
80
  i < 0 && s > 0 && (r = 180 - r), i < 0 && s < 0 && (r = 180 + r), i > 0 && s < 0 && (r = 360 - r);
@@ -95,7 +95,7 @@ const $e = function() {
95
95
  topic: this.newTopicName,
96
96
  id: e
97
97
  };
98
- }, $ = (e, t) => {
98
+ }, A = (e, t) => {
99
99
  let n = 0, o = 0;
100
100
  for (; t && t !== e; )
101
101
  n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
@@ -118,7 +118,7 @@ const $e = function() {
118
118
  this.moved = !1, this.mousedown = !1;
119
119
  }
120
120
  };
121
- function Ae(e) {
121
+ function ke(e) {
122
122
  e.map.addEventListener("click", (t) => {
123
123
  var o, s;
124
124
  if (t.button !== 0)
@@ -165,7 +165,7 @@ function Ae(e) {
165
165
  t.preventDefault();
166
166
  });
167
167
  }
168
- const ke = {
168
+ const De = {
169
169
  create() {
170
170
  return {
171
171
  handlers: {},
@@ -193,10 +193,10 @@ const ke = {
193
193
  }
194
194
  };
195
195
  }
196
- }, U = document, De = function() {
196
+ }, U = document, He = function() {
197
197
  this.nodes.innerHTML = "";
198
198
  const e = this.createTopic(this.nodeData);
199
- be(e, this.nodeData), e.draggable = !1;
199
+ xe(e, this.nodeData), e.draggable = !1;
200
200
  const t = U.createElement("me-root");
201
201
  t.appendChild(e);
202
202
  const n = this.nodeData.children || [];
@@ -206,8 +206,8 @@ const ke = {
206
206
  i.direction === q ? o += 1 : i.direction === Q ? s += 1 : o <= s ? (i.direction = q, o += 1) : (i.direction = Q, s += 1);
207
207
  });
208
208
  }
209
- He(this, n, t);
210
- }, He = function(e, t, n) {
209
+ Be(this, n, t);
210
+ }, Be = function(e, t, n) {
211
211
  const o = U.createElement("me-main");
212
212
  o.className = "lhs";
213
213
  const s = U.createElement("me-main");
@@ -217,19 +217,19 @@ const ke = {
217
217
  e.direction === Z ? r.direction === q ? o.appendChild(l) : s.appendChild(l) : e.direction === q ? o.appendChild(l) : s.appendChild(l);
218
218
  }
219
219
  e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
220
- }, Be = function(e, t) {
220
+ }, Pe = function(e, t) {
221
221
  const n = U.createElement("me-children");
222
222
  for (let o = 0; o < t.length; o++) {
223
223
  const s = t[o], { grp: i } = e.createWrapper(s);
224
224
  n.appendChild(i);
225
225
  }
226
226
  return n;
227
- }, C = document, L = (e, t) => {
228
- const o = (t ? t.mindElixirBox : C).querySelector(`[data-nodeid=me${e}]`);
227
+ }, S = document, L = (e, t) => {
228
+ const o = (t ? t.mindElixirBox : S).querySelector(`[data-nodeid=me${e}]`);
229
229
  if (!o)
230
230
  throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
231
231
  return o;
232
- }, be = function(e, t) {
232
+ }, xe = function(e, t) {
233
233
  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.dangerouslySetInnerHTML) {
234
234
  e.innerHTML = t.dangerouslySetInnerHTML;
235
235
  return;
@@ -237,61 +237,61 @@ const ke = {
237
237
  if (t.image) {
238
238
  const n = t.image;
239
239
  if (n.url && n.width && n.height) {
240
- const o = C.createElement("img");
240
+ const o = S.createElement("img");
241
241
  o.src = n.url, o.style.width = n.width + "px", o.style.height = n.height + "px", e.appendChild(o), e.image = o;
242
242
  }
243
243
  } else
244
244
  e.image && (e.image = void 0);
245
245
  {
246
- const n = C.createElement("span");
246
+ const n = S.createElement("span");
247
247
  n.className = "text", n.textContent = t.topic, e.appendChild(n), e.text = n;
248
248
  }
249
249
  if (t.hyperLink) {
250
- const n = C.createElement("a");
250
+ const n = S.createElement("a");
251
251
  n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n;
252
252
  } else
253
253
  e.linkContainer && (e.linkContainer = void 0);
254
254
  if (t.icons && t.icons.length) {
255
- const n = C.createElement("span");
255
+ const n = S.createElement("span");
256
256
  n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
257
257
  } else
258
258
  e.icons && (e.icons = void 0);
259
259
  if (t.tags && t.tags.length) {
260
- const n = C.createElement("div");
260
+ const n = S.createElement("div");
261
261
  n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
262
262
  } else
263
263
  e.tags && (e.tags = void 0);
264
- }, Pe = function(e, t) {
265
- const n = C.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
264
+ }, ze = function(e, t) {
265
+ const n = S.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
266
266
  if (n.appendChild(o), !t && e.children && e.children.length > 0) {
267
- const i = Re(e.expanded);
267
+ const i = Ve(e.expanded);
268
268
  if (o.appendChild(i), e.expanded !== !1) {
269
- const r = Be(this, e.children);
269
+ const r = Pe(this, e.children);
270
270
  n.appendChild(r);
271
271
  }
272
272
  }
273
273
  return { grp: n, top: o, tpc: s };
274
- }, ze = function(e) {
275
- const t = C.createElement("me-parent"), n = this.createTopic(e);
276
- return be(n, e), t.appendChild(n), { p: t, tpc: n };
274
+ }, Oe = function(e) {
275
+ const t = S.createElement("me-parent"), n = this.createTopic(e);
276
+ return xe(n, e), t.appendChild(n), { p: t, tpc: n };
277
277
  }, je = function(e) {
278
- const t = C.createElement("me-children");
278
+ const t = S.createElement("me-children");
279
279
  return t.append(...e), t;
280
- }, Oe = function(e) {
281
- const t = C.createElement("me-tpc");
280
+ }, qe = function(e) {
281
+ const t = S.createElement("me-tpc");
282
282
  return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
283
283
  };
284
- function xe(e) {
285
- const t = C.createRange();
284
+ function we(e) {
285
+ const t = S.createRange();
286
286
  t.selectNodeContents(e);
287
287
  const n = window.getSelection();
288
288
  n && (n.removeAllRanges(), n.addRange(t));
289
289
  }
290
- const qe = function(e) {
290
+ const Re = function(e) {
291
291
  if (!e)
292
292
  return;
293
- const t = C.createElement("div"), n = e.text.textContent;
294
- 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 === q && (t.style.right = "0"), t.focus(), xe(t), this.bus.fire("operation", {
293
+ const t = S.createElement("div"), n = e.text.textContent;
294
+ 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 === q && (t.style.right = "0"), t.focus(), we(t), this.bus.fire("operation", {
295
295
  name: "beginEdit",
296
296
  obj: e.nodeObj
297
297
  }), t.addEventListener("keydown", (o) => {
@@ -313,11 +313,11 @@ const qe = function(e) {
313
313
  origin: n
314
314
  }));
315
315
  });
316
- }, Re = function(e) {
317
- const t = C.createElement("me-epd");
316
+ }, Ve = function(e) {
317
+ const t = S.createElement("me-epd");
318
318
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
319
- }, j = document, O = "http://www.w3.org/2000/svg", we = function(e, t, n) {
320
- const o = j.createElementNS(O, "path");
319
+ }, O = document, j = "http://www.w3.org/2000/svg", _e = function(e, t, n) {
320
+ const o = O.createElementNS(j, "path");
321
321
  return x(o, {
322
322
  d: e,
323
323
  stroke: t || "#666",
@@ -325,18 +325,18 @@ const qe = function(e) {
325
325
  "stroke-width": n
326
326
  }), o;
327
327
  }, I = function(e) {
328
- const t = j.createElementNS(O, "svg");
328
+ const t = O.createElementNS(j, "svg");
329
329
  return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
330
330
  }, le = function() {
331
- const e = j.createElementNS(O, "line");
331
+ const e = O.createElementNS(j, "line");
332
332
  return e.setAttribute("stroke", "#bbb"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e;
333
- }, Ve = function(e, t) {
333
+ }, Ie = function(e, t) {
334
334
  const n = {
335
335
  stroke: "rgb(235, 95, 82)",
336
336
  fill: "none",
337
337
  "stroke-linecap": "cap",
338
338
  "stroke-width": "2"
339
- }, o = j.createElementNS(O, "g"), s = j.createElementNS(O, "path"), i = j.createElementNS(O, "path");
339
+ }, o = O.createElementNS(j, "g"), s = O.createElementNS(j, "path"), i = O.createElementNS(j, "path");
340
340
  return x(i, {
341
341
  d: t,
342
342
  ...n
@@ -345,7 +345,7 @@ const qe = function(e) {
345
345
  ...n,
346
346
  "stroke-dasharray": "8,2"
347
347
  }), o.appendChild(s), o.appendChild(i), o;
348
- }, _e = function(e, t, n) {
348
+ }, Ee = function(e, t, n) {
349
349
  if (!t)
350
350
  return;
351
351
  const o = document.createElement("div");
@@ -355,7 +355,7 @@ const qe = function(e) {
355
355
  const i = t.getAttribute("x"), r = t.getAttribute("y");
356
356
  o.style.cssText = `min-width:88px;position:absolute;left:${i}px;top:${r}px;`;
357
357
  const l = t.getAttribute("text-anchor");
358
- l === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), xe(o), o.addEventListener("keydown", (c) => {
358
+ l === "end" ? o.style.cssText += "transform: translate(-100%, -100%);" : l === "middle" ? o.style.cssText += "transform: translate(-50%, -100%);" : o.style.cssText += "transform: translate(0, -100%);", o.focus(), we(o), o.addEventListener("keydown", (c) => {
359
359
  c.stopPropagation();
360
360
  const d = c.key;
361
361
  if (d === "Enter" || d === "Tab") {
@@ -366,46 +366,46 @@ const qe = function(e) {
366
366
  }), o.addEventListener("blur", () => {
367
367
  o && n(o);
368
368
  });
369
- }, Ie = function(e) {
369
+ }, Fe = function(e) {
370
370
  const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, s = t.offsetWidth, i = t.offsetHeight;
371
371
  this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - o - s / 2}px`;
372
372
  const r = this.map.querySelectorAll("me-main > me-wrapper");
373
373
  this.lines.innerHTML = "";
374
374
  for (let l = 0; l < r.length; l++) {
375
- const c = r[l], d = c.querySelector("me-tpc"), { offsetLeft: h, offsetTop: u } = $(this.nodes, d), a = d.offsetWidth, p = d.offsetHeight, m = c.parentNode.className, f = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: u, cL: h, cW: a, cH: p, direction: m, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, y = d.nodeObj.branchColor || g[l % g.length];
376
- d.style.borderColor = y, this.lines.appendChild(we(f, y, "3"));
375
+ const c = r[l], d = c.querySelector("me-tpc"), { offsetLeft: h, offsetTop: a } = A(this.nodes, d), f = d.offsetWidth, m = d.offsetHeight, u = c.parentNode.className, p = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: a, cL: h, cW: f, cH: m, direction: u, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, y = d.nodeObj.branchColor || g[l % g.length];
376
+ d.style.borderColor = y, this.lines.appendChild(_e(p, y, "3"));
377
377
  const v = c.children[0].children[1];
378
- if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", m === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), e && e !== c)
378
+ if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", u === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), e && e !== c)
379
379
  continue;
380
- const w = I("subLines"), E = c.lastChild;
381
- E.tagName === "svg" && E.remove(), c.appendChild(w), Ee(this, w, y, c, m, !0);
380
+ const w = I("subLines"), _ = c.lastChild;
381
+ _.tagName === "svg" && _.remove(), c.appendChild(w), Se(this, w, y, c, u, !0);
382
382
  }
383
383
  this.renderArrow(), this.renderSummary();
384
- }, Ee = function(e, t, n, o, s, i) {
384
+ }, Se = function(e, t, n, o, s, i) {
385
385
  const r = o.firstChild, l = o.children[1].children;
386
386
  if (l.length === 0)
387
387
  return;
388
- const c = r.offsetTop, d = r.offsetLeft, h = r.offsetWidth, u = r.offsetHeight;
389
- for (let a = 0; a < l.length; a++) {
390
- const p = l[a], m = p.firstChild, f = m.offsetTop, g = m.offsetLeft, y = m.offsetWidth, v = m.offsetHeight, w = m.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: c, pL: d, pW: h, pH: u, cT: f, cL: g, cW: y, cH: v, direction: s, isFirst: i });
391
- t.appendChild(we(E, w, "2"));
392
- const _ = m.children[1];
393
- if (_) {
394
- if (_.style.bottom = -(_.offsetHeight / 2) + "px", s === "lhs" ? _.style.left = "10px" : s === "rhs" && (_.style.right = "10px"), !_.expanded)
388
+ const c = r.offsetTop, d = r.offsetLeft, h = r.offsetWidth, a = r.offsetHeight;
389
+ for (let f = 0; f < l.length; f++) {
390
+ const m = l[f], u = m.firstChild, p = u.offsetTop, g = u.offsetLeft, y = u.offsetWidth, v = u.offsetHeight, w = u.firstChild.nodeObj.branchColor || n, _ = e.generateSubBranch({ pT: c, pL: d, pW: h, pH: a, cT: p, cL: g, cW: y, cH: v, direction: s, isFirst: i });
391
+ t.appendChild(_e(_, w, "2"));
392
+ const E = u.children[1];
393
+ if (E) {
394
+ if (E.style.bottom = -(E.offsetHeight / 2) + "px", s === "lhs" ? E.style.left = "10px" : s === "rhs" && (E.style.right = "10px"), !E.expanded)
395
395
  continue;
396
396
  } else
397
397
  continue;
398
- Ee(e, t, w, p, s);
398
+ Se(e, t, w, m, s);
399
399
  }
400
400
  };
401
- const H = (e, t) => {
401
+ const B = (e, t) => {
402
402
  const n = document.createElement("span");
403
403
  return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
404
404
  <use xlink:href="#icon-${t}"></use>
405
405
  </svg>`, n;
406
406
  };
407
- function Fe(e) {
408
- const t = document.createElement("div"), n = H("fullscreen", "full"), o = H("toCenter", "living"), s = H("zoomout", "move"), i = H("zoomin", "add"), r = document.createElement("span");
407
+ function We(e) {
408
+ const t = document.createElement("div"), n = B("fullscreen", "full"), o = B("toCenter", "living"), s = B("zoomout", "move"), i = B("zoomin", "add"), r = document.createElement("span");
409
409
  return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
410
410
  e.mindElixirBox.requestFullscreen();
411
411
  }, o.onclick = () => {
@@ -416,8 +416,8 @@ function Fe(e) {
416
416
  e.scaleVal > 1.6 || e.scale(e.scaleVal += 0.2);
417
417
  }, t;
418
418
  }
419
- function We(e) {
420
- const t = document.createElement("div"), n = H("tbltl", "left"), o = H("tbltr", "right"), s = H("tblts", "side");
419
+ function Xe(e) {
420
+ const t = document.createElement("div"), n = B("tbltl", "left"), o = B("tbltr", "right"), s = B("tblts", "side");
421
421
  return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
422
422
  e.initLeft();
423
423
  }, o.onclick = () => {
@@ -426,12 +426,12 @@ function We(e) {
426
426
  e.initSide();
427
427
  }, t;
428
428
  }
429
- function Xe(e) {
430
- e.container.append(Fe(e)), e.container.append(We(e));
429
+ function Ye(e) {
430
+ e.container.append(We(e)), e.container.append(Xe(e));
431
431
  }
432
- /*! @viselect/vanilla v3.5.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
433
- var Ye = Object.defineProperty, Ge = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t, n) => (Ge(e, typeof t != "symbol" ? t + "" : t, n), n);
434
- class Ke {
432
+ /*! @viselect/vanilla v3.6.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
433
+ var Ge = Object.defineProperty, Ke = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t, n) => Ke(e, typeof t != "symbol" ? t + "" : t, n);
434
+ class Ue {
435
435
  constructor() {
436
436
  b(this, "_listeners", /* @__PURE__ */ new Map()), b(this, "on", this.addEventListener), b(this, "off", this.removeEventListener), b(this, "emit", this.dispatchEvent);
437
437
  }
@@ -454,7 +454,7 @@ class Ke {
454
454
  }
455
455
  }
456
456
  const ce = (e, t = "px") => typeof e == "number" ? e + t : e;
457
- function M({ style: e }, t, n) {
457
+ function T({ style: e }, t, n) {
458
458
  if (typeof t == "object")
459
459
  for (const [o, s] of Object.entries(t))
460
460
  s !== void 0 && (e[o] = ce(s));
@@ -468,7 +468,7 @@ const Ce = (e) => (t, n, o, s = {}) => {
468
468
  for (const r of n)
469
469
  i[e](r, o, { capture: !1, ...s });
470
470
  return [t, n, o, s];
471
- }, B = Ce("addEventListener"), T = Ce("removeEventListener"), X = (e) => {
471
+ }, D = Ce("addEventListener"), M = Ce("removeEventListener"), X = (e) => {
472
472
  var t;
473
473
  const { clientX: n, clientY: o, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
474
474
  return { x: n, y: o, target: s };
@@ -494,7 +494,7 @@ function P(e, t = document) {
494
494
  }
495
495
  return o;
496
496
  }
497
- const Ue = () => matchMedia("(hover: none), (pointer: coarse)").matches, Je = () => "safari" in window, Qe = (e) => {
497
+ const Je = () => matchMedia("(hover: none), (pointer: coarse)").matches, Qe = () => "safari" in window, Ze = (e) => {
498
498
  let t, n = -1, o = !1;
499
499
  return {
500
500
  next(...s) {
@@ -507,7 +507,7 @@ const Ue = () => matchMedia("(hover: none), (pointer: coarse)").matches, Je = ()
507
507
  }
508
508
  };
509
509
  };
510
- function Ze(e, t) {
510
+ function et(e, t) {
511
511
  for (const n of t) {
512
512
  if (typeof n == "number")
513
513
  return e.button === n;
@@ -527,21 +527,16 @@ function Ze(e, t) {
527
527
  }
528
528
  return !1;
529
529
  }
530
- const { abs: D, max: he, min: de, ceil: ue } = Math;
531
- class et extends Ke {
530
+ const { abs: H, max: he, min: de, ceil: ue } = Math, fe = (e = []) => ({
531
+ stored: e,
532
+ selected: [],
533
+ touched: [],
534
+ changed: { added: [], removed: [] }
535
+ });
536
+ class tt extends Ue {
532
537
  constructor(t) {
533
538
  var n, o, s, i, r;
534
- super(), b(this, "_options"), b(this, "_selection", {
535
- stored: [],
536
- selected: [],
537
- touched: [],
538
- changed: {
539
- added: [],
540
- // Added elements since last selection
541
- removed: []
542
- // Removed elements since last selection
543
- }
544
- }), b(this, "_area"), b(this, "_clippingElement"), b(this, "_targetElement"), b(this, "_targetRect"), b(this, "_selectables", []), b(this, "_latestElement"), b(this, "_areaRect", new DOMRect()), b(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), b(this, "_singleClick", !0), b(this, "_frame"), b(this, "_scrollAvailable", !0), b(this, "_scrollingActive", !1), b(this, "_scrollSpeed", { x: 0, y: 0 }), b(this, "_scrollDelta", { x: 0, y: 0 }), b(this, "disable", this._bindStartEvents.bind(this, !1)), b(this, "enable", this._bindStartEvents), this._options = {
539
+ super(), b(this, "_options"), b(this, "_selection", fe()), b(this, "_area"), b(this, "_clippingElement"), b(this, "_targetElement"), b(this, "_targetBoundary"), b(this, "_targetBoundaryScrolled", !0), b(this, "_targetRect"), b(this, "_selectables", []), b(this, "_latestElement"), b(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), b(this, "_areaRect", new DOMRect()), b(this, "_singleClick", !0), b(this, "_frame"), b(this, "_scrollAvailable", !0), b(this, "_scrollingActive", !1), b(this, "_scrollSpeed", { x: 0, y: 0 }), b(this, "_scrollDelta", { x: 0, y: 0 }), b(this, "disable", this._toggleStartEvents.bind(this, !1)), b(this, "enable", this._toggleStartEvents), this._options = {
545
540
  selectionAreaClass: "selection-area",
546
541
  selectionContainerClass: void 0,
547
542
  selectables: [],
@@ -570,6 +565,7 @@ class et extends Ke {
570
565
  features: {
571
566
  range: !0,
572
567
  touch: !0,
568
+ deselectOnBlur: !1,
573
569
  ...t.features,
574
570
  singleTap: {
575
571
  allow: !0,
@@ -581,42 +577,40 @@ class et extends Ke {
581
577
  for (const h of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
582
578
  typeof this[h] == "function" && (this[h] = this[h].bind(this));
583
579
  const { document: l, selectionAreaClass: c, selectionContainerClass: d } = this._options;
584
- this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), d && this._clippingElement.classList.add(d), M(this._area, {
580
+ this._area = l.createElement("div"), this._clippingElement = l.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(c), d && this._clippingElement.classList.add(d), T(this._area, {
585
581
  willChange: "top, left, bottom, right, width, height",
586
582
  top: 0,
587
583
  left: 0,
588
584
  position: "fixed"
589
- }), M(this._clippingElement, {
585
+ }), T(this._clippingElement, {
590
586
  overflow: "hidden",
591
587
  position: "fixed",
592
588
  transform: "translate3d(0, 0, 0)",
593
589
  // https://stackoverflow.com/a/38268846
594
590
  pointerEvents: "none",
595
591
  zIndex: "1"
596
- }), this._frame = Qe((h) => {
592
+ }), this._frame = Ze((h) => {
597
593
  this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
598
594
  }), this.enable();
599
595
  }
600
- _bindStartEvents(t = !0) {
601
- const { document: n, features: o } = this._options, s = t ? B : T;
602
- s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, {
603
- passive: !1
604
- });
596
+ _toggleStartEvents(t = !0) {
597
+ const { document: n, features: o } = this._options, s = t ? D : M;
598
+ s(n, "mousedown", this._onTapStart), o.touch && s(n, "touchstart", this._onTapStart, { passive: !1 });
605
599
  }
606
600
  _onTapStart(t, n = !1) {
607
- const { x: o, y: s, target: i } = X(t), { _options: r } = this, { document: l } = this._options, c = i.getBoundingClientRect();
608
- if (t instanceof MouseEvent && !Ze(t, r.behaviour.triggers))
601
+ const { x: o, y: s, target: i } = X(t), { document: r, startAreas: l, boundaries: c, features: d, behaviour: h } = this._options, a = i.getBoundingClientRect();
602
+ if (t instanceof MouseEvent && !et(t, h.triggers))
609
603
  return;
610
- const d = P(r.startAreas, r.document), h = P(r.boundaries, r.document);
611
- this._targetElement = h.find(
612
- (p) => ae(p.getBoundingClientRect(), c)
604
+ const f = P(l, r), m = P(c, r);
605
+ this._targetElement = m.find(
606
+ (y) => ae(y.getBoundingClientRect(), a)
613
607
  );
614
- const u = t.composedPath();
615
- if (!this._targetElement || !d.find((p) => u.includes(p)) || !h.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
608
+ const u = t.composedPath(), p = f.find((y) => u.includes(y));
609
+ if (this._targetBoundary = m.find((y) => u.includes(y)), !this._targetElement || !p || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
616
610
  return;
617
611
  this._areaLocation = { x1: o, y1: s, x2: 0, y2: 0 };
618
- const a = l.scrollingElement ?? l.body;
619
- this._scrollDelta = { x: a.scrollLeft, y: a.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), B(l, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), B(l, ["mouseup", "touchcancel", "touchend"], this._onTapStop), B(l, "scroll", this._onScroll);
612
+ const g = r.scrollingElement ?? r.body;
613
+ this._scrollDelta = { x: g.scrollLeft, y: g.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), D(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), D(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), D(r, "scroll", this._onScroll), d.deselectOnBlur && (this._targetBoundaryScrolled = !1, D(this._targetBoundary, "scroll", this._onStartAreaScroll));
620
614
  }
621
615
  _onSingleTap(t) {
622
616
  const { singleTap: { intersect: n }, range: o } = this._options.features, s = X(t);
@@ -627,21 +621,23 @@ class et extends Ke {
627
621
  this.resolveSelectables();
628
622
  const { x: l, y: c } = s;
629
623
  i = this._selectables.find((d) => {
630
- const { right: h, left: u, top: a, bottom: p } = d.getBoundingClientRect();
631
- return l < h && l > u && c < p && c > a;
624
+ const { right: h, left: a, top: f, bottom: m } = d.getBoundingClientRect();
625
+ return l < h && l > a && c < m && c > f;
632
626
  });
633
627
  }
634
628
  if (!i)
635
629
  return;
636
- for (this.resolveSelectables(); !this._selectables.includes(i); ) {
637
- if (!i.parentElement)
630
+ for (this.resolveSelectables(); !this._selectables.includes(i); )
631
+ if (i.parentElement)
632
+ i = i.parentElement;
633
+ else {
634
+ this._targetBoundaryScrolled || this.clearSelection();
638
635
  return;
639
- i = i.parentElement;
640
- }
636
+ }
641
637
  const { stored: r } = this._selection;
642
638
  if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
643
639
  const l = this._latestElement, [c, d] = l.compareDocumentPosition(i) & 4 ? [i, l] : [l, i], h = [...this._selectables.filter(
644
- (u) => u.compareDocumentPosition(c) & 4 && u.compareDocumentPosition(d) & 2
640
+ (a) => a.compareDocumentPosition(c) & 4 && a.compareDocumentPosition(d) & 2
645
641
  ), c, d];
646
642
  this.select(h), this._latestElement = l;
647
643
  } else
@@ -651,73 +647,76 @@ class et extends Ke {
651
647
  const { container: n, document: o, behaviour: { startThreshold: s } } = this._options, { x1: i, y1: r } = this._areaLocation, { x: l, y: c } = X(t);
652
648
  if (
653
649
  // Single number for both coordinates
654
- typeof s == "number" && D(l + c - (i + r)) >= s || // Different x and y threshold
655
- typeof s == "object" && D(l - i) >= s.x || D(c - r) >= s.y
650
+ typeof s == "number" && H(l + c - (i + r)) >= s || // Different x and y threshold
651
+ typeof s == "object" && H(l - i) >= s.x || H(c - r) >= s.y
656
652
  ) {
657
- if (T(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
658
- T(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
653
+ if (M(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
654
+ M(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
659
655
  return;
660
656
  }
661
- B(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), M(this._area, "display", "block"), P(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((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
657
+ D(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), T(this._area, "display", "block"), P(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 && (D(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
662
658
  }
663
659
  this._handleMoveEvent(t);
664
660
  }
665
661
  _setupSelectionArea() {
666
662
  const { _clippingElement: t, _targetElement: n, _area: o } = this, s = this._targetRect = n.getBoundingClientRect();
667
- this._scrollAvailable ? (M(t, {
663
+ this._scrollAvailable ? (T(t, {
668
664
  top: s.top,
669
665
  left: s.left,
670
666
  width: s.width,
671
667
  height: s.height
672
- }), M(o, {
668
+ }), T(o, {
673
669
  marginTop: -s.top,
674
670
  marginLeft: -s.left
675
- })) : (M(t, {
671
+ })) : (T(t, {
676
672
  top: 0,
677
673
  left: 0,
678
674
  width: "100%",
679
675
  height: "100%"
680
- }), M(o, {
676
+ }), T(o, {
681
677
  marginTop: 0,
682
678
  marginLeft: 0
683
679
  }));
684
680
  }
685
681
  _onTapMove(t) {
686
- const { x: n, y: o } = X(t), { _scrollSpeed: s, _areaLocation: i, _options: r, _frame: l } = this, { speedDivider: c } = r.behaviour.scrolling, d = this._targetElement;
687
- if (i.x2 = n, i.y2 = o, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
682
+ const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: r } = s.behaviour.scrolling, l = this._targetElement, { x: c, y: d } = X(t);
683
+ if (o.x2 = c, o.y2 = d, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
688
684
  this._scrollingActive = !0;
689
685
  const h = () => {
690
- if (!s.x && !s.y) {
686
+ if (!n.x && !n.y) {
691
687
  this._scrollingActive = !1;
692
688
  return;
693
689
  }
694
- const { scrollTop: u, scrollLeft: a } = d;
695
- s.y && (d.scrollTop += ue(s.y / c), i.y1 -= d.scrollTop - u), s.x && (d.scrollLeft += ue(s.x / c), i.x1 -= d.scrollLeft - a), l.next(t), requestAnimationFrame(h);
690
+ const { scrollTop: a, scrollLeft: f } = l;
691
+ n.y && (l.scrollTop += ue(n.y / r), o.y1 -= l.scrollTop - a), n.x && (l.scrollLeft += ue(n.x / r), o.x1 -= l.scrollLeft - f), i.next(t), requestAnimationFrame(h);
696
692
  };
697
693
  requestAnimationFrame(h);
698
694
  } else
699
- l.next(t);
695
+ i.next(t);
700
696
  this._handleMoveEvent(t);
701
697
  }
702
698
  _handleMoveEvent(t) {
703
699
  const { features: n } = this._options;
704
- (n.touch && Ue() || this._scrollAvailable && Je()) && t.preventDefault();
700
+ (n.touch && Je() || this._scrollAvailable && Qe()) && t.preventDefault();
705
701
  }
706
702
  _onScroll() {
707
703
  const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: s } = n.scrollingElement ?? n.body;
708
704
  this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - o, t.x = s, t.y = o, this._setupSelectionArea(), this._frame.next(null);
709
705
  }
706
+ _onStartAreaScroll() {
707
+ this._targetBoundaryScrolled = !0, M(this._targetElement, "scroll", this._onStartAreaScroll);
708
+ }
710
709
  _manualScroll(t) {
711
710
  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;
712
711
  this._scrollSpeed.y += o * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
713
712
  }
714
713
  _recalculateSelectionAreaRect() {
715
- const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: s, _options: i } = this, { scrollTop: r, scrollHeight: l, clientHeight: c, scrollLeft: d, scrollWidth: h, clientWidth: u } = s, a = this._targetRect, { x1: p, y1: m } = n;
716
- let { x2: f, y2: g } = n;
717
- const { behaviour: { scrolling: { startScrollMargins: y } } } = i;
718
- f < a.left + y.x ? (t.x = d ? -D(a.left - f + y.x) : 0, f = f < a.left ? a.left : f) : f > a.right - y.x ? (t.x = h - d - u ? D(a.left + a.width - f - y.x) : 0, f = f > a.right ? a.right : f) : t.x = 0, g < a.top + y.y ? (t.y = r ? -D(a.top - g + y.y) : 0, g = g < a.top ? a.top : g) : g > a.bottom - y.y ? (t.y = l - r - c ? D(a.top + a.height - g - y.y) : 0, g = g > a.bottom ? a.bottom : g) : t.y = 0;
719
- const v = de(p, f), w = de(m, g), E = he(p, f), _ = he(m, g);
720
- o.x = v, o.y = w, o.width = E - v, o.height = _ - w;
714
+ const { _scrollSpeed: t, _areaLocation: n, _targetElement: o, _options: s } = this, { scrollTop: i, scrollHeight: r, clientHeight: l, scrollLeft: c, scrollWidth: d, clientWidth: h } = o, a = this._targetRect, { x1: f, y1: m } = n;
715
+ let { x2: u, y2: p } = n;
716
+ const { behaviour: { scrolling: { startScrollMargins: g } } } = s;
717
+ u < a.left + g.x ? (t.x = c ? -H(a.left - u + g.x) : 0, u = u < a.left ? a.left : u) : u > a.right - g.x ? (t.x = d - c - h ? H(a.left + a.width - u - g.x) : 0, u = u > a.right ? a.right : u) : t.x = 0, p < a.top + g.y ? (t.y = i ? -H(a.top - p + g.y) : 0, p = p < a.top ? a.top : p) : p > a.bottom - g.y ? (t.y = r - i - l ? H(a.top + a.height - p - g.y) : 0, p = p > a.bottom ? a.bottom : p) : t.y = 0;
718
+ const y = de(f, u), v = de(m, p), w = he(f, u), _ = he(m, p);
719
+ this._areaRect = new DOMRect(y, v, w - y, _ - v);
721
720
  }
722
721
  _redrawSelectionArea() {
723
722
  const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
@@ -726,32 +725,32 @@ class et extends Ke {
726
725
  _onTapStop(t, n) {
727
726
  var o;
728
727
  const { document: s, features: i } = this._options, { _singleClick: r } = this;
729
- T(s, ["mousemove", "touchmove"], this._delayedTapMove), T(s, ["touchmove", "mousemove"], this._onTapMove), T(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), T(s, "scroll", this._onScroll), this._keepSelection(), t && r && i.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, T(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), M(this._area, "display", "none");
728
+ M(this._targetElement, "scroll", this._onStartAreaScroll), M(s, ["mousemove", "touchmove"], this._delayedTapMove), M(s, ["touchmove", "mousemove"], this._onTapMove), M(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), M(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, M(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), T(this._area, "display", "none");
730
729
  }
731
730
  _updateElementSelection() {
732
- const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: l } = o, { intersect: c, overlap: d } = n.behaviour, h = d === "invert", u = [], a = [], p = [];
733
- for (let f = 0; f < t.length; f++) {
734
- const g = t[f];
731
+ const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: r, touched: l } = o, { intersect: c, overlap: d } = n.behaviour, h = d === "invert", a = [], f = [], m = [];
732
+ for (let p = 0; p < t.length; p++) {
733
+ const g = t[p];
735
734
  if (ae(s, g.getBoundingClientRect(), c)) {
736
735
  if (r.includes(g))
737
736
  i.includes(g) && !l.includes(g) && l.push(g);
738
737
  else if (h && i.includes(g)) {
739
- p.push(g);
738
+ m.push(g);
740
739
  continue;
741
740
  } else
742
- a.push(g);
743
- u.push(g);
741
+ f.push(g);
742
+ a.push(g);
744
743
  }
745
744
  }
746
- h && a.push(...i.filter((f) => !r.includes(f)));
747
- const m = d === "keep";
748
- for (let f = 0; f < r.length; f++) {
749
- const g = r[f];
750
- !u.includes(g) && !// Check if user wants to keep previously selected elements, e.g.
745
+ h && f.push(...i.filter((p) => !r.includes(p)));
746
+ const u = d === "keep";
747
+ for (let p = 0; p < r.length; p++) {
748
+ const g = r[p];
749
+ !a.includes(g) && !// Check if the user wants to keep previously selected elements, e.g.,
751
750
  // not make them part of the current selection as soon as they're touched.
752
- (m && i.includes(g)) && p.push(g);
751
+ (u && i.includes(g)) && m.push(g);
753
752
  }
754
- o.selected = u, o.changed = { added: a, removed: p }, this._latestElement = void 0;
753
+ o.selected = a, o.changed = { added: f, removed: m }, this._latestElement = void 0;
755
754
  }
756
755
  _emitEvent(t, n) {
757
756
  return this.emit(t, {
@@ -791,7 +790,7 @@ class et extends Ke {
791
790
  }
792
791
  /**
793
792
  * Manually triggers the start of a selection
794
- * @param evt A MouseEvent / TouchEvent -like object
793
+ * @param evt A MouseEvent / TouchEvent-like object
795
794
  * @param silent If beforestart should be fired,
796
795
  */
797
796
  trigger(t, n = !0) {
@@ -799,13 +798,13 @@ class et extends Ke {
799
798
  }
800
799
  /**
801
800
  * Can be used if during a selection elements have been added.
802
- * Will update everything which can be selected.
801
+ * Will update everything that can be selected.
803
802
  */
804
803
  resolveSelectables() {
805
804
  this._selectables = P(this._options.selectables, this._options.document);
806
805
  }
807
806
  /**
808
- * Same as deselect, but for all elements currently selected.
807
+ * Same as deselecting, but for all elements currently selected.
809
808
  * @param includeStored If the store should also get cleared
810
809
  * @param quiet If move / stop events should be fired
811
810
  */
@@ -814,12 +813,7 @@ class et extends Ke {
814
813
  i.added = [], i.removed.push(
815
814
  ...o,
816
815
  ...t ? s : []
817
- ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
818
- stored: t ? [] : s,
819
- selected: [],
820
- touched: [],
821
- changed: { added: [], removed: [] }
822
- };
816
+ ), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = fe(t ? [] : s);
823
817
  }
824
818
  /**
825
819
  * @returns {Array} Selected elements
@@ -834,8 +828,7 @@ class et extends Ke {
834
828
  return this._area;
835
829
  }
836
830
  /**
837
- * Cancel the current selection process.
838
- * @param keepEvent {boolean} true to fire a stop event after cancel.
831
+ * Cancel the current selection process, pass true to fire a stop event after cancel.
839
832
  */
840
833
  cancel(t = !1) {
841
834
  this._onTapStop(null, !t);
@@ -871,8 +864,8 @@ class et extends Ke {
871
864
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
872
865
  }
873
866
  }
874
- b(et, "version", "3.5.1");
875
- const tt = function(e, t = !0) {
867
+ b(tt, "version", "3.6.0");
868
+ const nt = function(e, t = !0) {
876
869
  this.theme = e;
877
870
  const n = this.theme.cssVar, o = Object.keys(n);
878
871
  for (let s = 0; s < o.length; s++) {
@@ -880,11 +873,11 @@ const tt = function(e, t = !0) {
880
873
  this.mindElixirBox.style.setProperty(i, n[i]);
881
874
  }
882
875
  t && this.refresh();
883
- }, nt = function(e) {
876
+ }, ot = function(e) {
884
877
  const n = e.parentElement.parentElement.lastElementChild;
885
878
  (n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
886
879
  };
887
- function Se(e) {
880
+ function Le(e) {
888
881
  return {
889
882
  nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
890
883
  arrows: e.arrows,
@@ -893,7 +886,7 @@ function Se(e) {
893
886
  theme: e.theme
894
887
  };
895
888
  }
896
- const ot = function(e, t, n) {
889
+ const st = function(e, t, n) {
897
890
  if (e) {
898
891
  if (this.clearSelection(), typeof e == "string") {
899
892
  const o = L(e);
@@ -901,9 +894,9 @@ const ot = function(e, t, n) {
901
894
  }
902
895
  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);
903
896
  }
904
- }, st = function() {
897
+ }, it = function() {
905
898
  this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
906
- }, it = function(e) {
899
+ }, rt = function(e) {
907
900
  this.clearSelection();
908
901
  for (const t of e)
909
902
  t.className = "selected";
@@ -911,23 +904,23 @@ const ot = function(e, t, n) {
911
904
  "selectNodes",
912
905
  e.map((t) => t.nodeObj)
913
906
  );
914
- }, rt = function() {
907
+ }, lt = function() {
915
908
  if (this.currentNodes)
916
909
  for (const e of this.currentNodes)
917
910
  e.classList.remove("selected");
918
911
  this.currentNodes = null, this.bus.fire("unselectNodes");
919
- }, lt = function() {
920
- this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
921
912
  }, ct = function() {
922
- const e = Se(this);
913
+ this.unselectNode(), this.unselectNodes(), this.unselectSummary(), this.unselectArrow();
914
+ }, at = function() {
915
+ const e = Le(this);
923
916
  return JSON.stringify(e, (t, n) => {
924
917
  if (!(t === "parent" && typeof n != "string"))
925
918
  return n;
926
919
  });
927
- }, at = function() {
928
- return JSON.parse(this.getDataString());
929
920
  }, ht = function() {
930
- const e = Se(this).nodeData;
921
+ return JSON.parse(this.getDataString());
922
+ }, dt = function() {
923
+ const e = Le(this).nodeData;
931
924
  let t = "# " + e.topic + `
932
925
 
933
926
  `;
@@ -939,33 +932,33 @@ const ot = function(e, t, n) {
939
932
  `, o[i].children && n(o[i].children || [], s + 1);
940
933
  }
941
934
  return n(e.children || [], 2), t;
942
- }, dt = function() {
943
- this.editable = !0;
944
935
  }, ut = function() {
936
+ this.editable = !0;
937
+ }, ft = function() {
945
938
  this.editable = !1;
946
- }, ft = function(e) {
939
+ }, pt = function(e) {
947
940
  this.scaleVal = e, this.map.style.transform = "scale(" + e + ")";
948
- }, pt = function() {
941
+ }, mt = function() {
949
942
  this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
950
- }, mt = function(e) {
951
- e(this);
952
943
  }, gt = function(e) {
944
+ e(this);
945
+ }, vt = function(e) {
953
946
  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());
954
- }, vt = function() {
955
- this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
956
947
  }, yt = function() {
957
- this.direction = 0, this.refresh();
948
+ this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
958
949
  }, bt = function() {
959
- this.direction = 1, this.refresh();
950
+ this.direction = 0, this.refresh();
960
951
  }, xt = function() {
952
+ this.direction = 1, this.refresh();
953
+ }, wt = function() {
961
954
  this.direction = 2, this.refresh();
962
- }, wt = function(e) {
955
+ }, _t = function(e) {
963
956
  this.locale = e, this.refresh();
964
- }, _t = function(e, t) {
957
+ }, Et = function(e, t) {
965
958
  const n = e.nodeObj;
966
959
  typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
967
960
  const o = e.parentNode, s = o.children[1];
968
- if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", nt(e), n.expanded) {
961
+ if (s.expanded = n.expanded, s.className = n.expanded ? "minus" : "", ot(e), n.expanded) {
969
962
  const i = this.createChildren(
970
963
  n.children.map((r) => this.createWrapper(r).grp)
971
964
  );
@@ -973,32 +966,32 @@ const ot = function(e, t, n) {
973
966
  } else
974
967
  o.parentNode.children[1].remove();
975
968
  this.linkDiv(), this.bus.fire("expandNode", n);
976
- }, Et = function(e) {
969
+ }, St = function(e) {
977
970
  e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), ee(this.nodeData), this.layout(), this.linkDiv();
978
971
  }, Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
979
972
  __proto__: null,
980
- cancelFocus: vt,
981
- clearSelection: lt,
982
- disableEdit: ut,
983
- enableEdit: dt,
984
- expandNode: _t,
985
- focusNode: gt,
986
- getData: at,
987
- getDataMd: ht,
988
- getDataString: ct,
989
- initLeft: yt,
990
- initRight: bt,
991
- initSide: xt,
992
- install: mt,
993
- refresh: Et,
994
- scale: ft,
995
- selectNode: ot,
996
- selectNodes: it,
997
- setLocale: wt,
998
- toCenter: pt,
999
- unselectNode: st,
1000
- unselectNodes: rt
1001
- }, Symbol.toStringTag, { value: "Module" })), St = function(e) {
973
+ cancelFocus: yt,
974
+ clearSelection: ct,
975
+ disableEdit: ft,
976
+ enableEdit: ut,
977
+ expandNode: Et,
978
+ focusNode: vt,
979
+ getData: ht,
980
+ getDataMd: dt,
981
+ getDataString: at,
982
+ initLeft: bt,
983
+ initRight: xt,
984
+ initSide: wt,
985
+ install: gt,
986
+ refresh: St,
987
+ scale: pt,
988
+ selectNode: st,
989
+ selectNodes: rt,
990
+ setLocale: _t,
991
+ toCenter: mt,
992
+ unselectNode: it,
993
+ unselectNodes: lt
994
+ }, Symbol.toStringTag, { value: "Module" })), Lt = function(e) {
1002
995
  return {
1003
996
  dom: e,
1004
997
  moved: !1,
@@ -1024,11 +1017,11 @@ const ot = function(e, t, n) {
1024
1017
  this.moved = !1, this.mousedown = !1;
1025
1018
  }
1026
1019
  };
1027
- }, fe = {
1028
- create: St
1020
+ }, pe = {
1021
+ create: Lt
1029
1022
  };
1030
1023
  function J(e, t, n) {
1031
- const { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, l = o + i / 2, c = s + r / 2, d = l + n.x, h = c + n.y;
1024
+ const { offsetLeft: o, offsetTop: s } = A(e.nodes, t), i = t.offsetWidth, r = t.offsetHeight, l = o + i / 2, c = s + r / 2, d = l + n.x, h = c + n.y;
1032
1025
  return {
1033
1026
  w: i,
1034
1027
  h: r,
@@ -1046,7 +1039,7 @@ function z(e) {
1046
1039
  y: n
1047
1040
  };
1048
1041
  }
1049
- const Lt = function(e, t, n, o) {
1042
+ const Mt = function(e, t, n, o) {
1050
1043
  const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
1051
1044
  return x(s, {
1052
1045
  "text-anchor": "middle",
@@ -1054,16 +1047,16 @@ const Lt = function(e, t, n, o) {
1054
1047
  y: n + "",
1055
1048
  fill: o || "#666"
1056
1049
  }), s.dataset.type = "custom-link", s.innerHTML = e, s;
1057
- }, Le = function(e, t, n, o, s) {
1050
+ }, Me = function(e, t, n, o, s) {
1058
1051
  if (!t || !n)
1059
1052
  return;
1060
1053
  performance.now();
1061
- const i = J(e, t, o.delta1), r = J(e, n, o.delta2), { x: l, y: c } = z(i), { ctrlX: d, ctrlY: h } = i, { ctrlX: u, ctrlY: a } = r, { x: p, y: m } = z(r), f = ye(u, a, p, m), g = Ve(
1062
- `M ${l} ${c} C ${d} ${h} ${u} ${a} ${p} ${m}`,
1063
- `M ${f.x1} ${f.y1} L ${p} ${m} L ${f.x2} ${f.y2}`
1064
- ), y = l / 8 + d * 3 / 8 + u * 3 / 8 + p / 8, v = c / 8 + h * 3 / 8 + a * 3 / 8 + m / 8, w = Lt(o.label, y, v, e.theme.cssVar["--color"]);
1065
- g.appendChild(w), g.arrowObj = o, g.dataset.linkid = o.id, e.linkSvgGroup.appendChild(g), s || (e.arrows.push(o), e.currentArrow = g, Te(e, o, i, r)), performance.now();
1066
- }, Mt = function(e, t) {
1054
+ const i = J(e, t, o.delta1), r = J(e, n, o.delta2), { x: l, y: c } = z(i), { ctrlX: d, ctrlY: h } = i, { ctrlX: a, ctrlY: f } = r, { x: m, y: u } = z(r), p = be(a, f, m, u), g = Ie(
1055
+ `M ${l} ${c} C ${d} ${h} ${a} ${f} ${m} ${u}`,
1056
+ `M ${p.x1} ${p.y1} L ${m} ${u} L ${p.x2} ${p.y2}`
1057
+ ), y = l / 8 + d * 3 / 8 + a * 3 / 8 + m / 8, v = c / 8 + h * 3 / 8 + f * 3 / 8 + u / 8, w = Mt(o.label, y, v, e.theme.cssVar["--color"]);
1058
+ g.appendChild(w), g.arrowObj = o, g.dataset.linkid = o.id, e.linkSvgGroup.appendChild(g), s || (e.arrows.push(o), e.currentArrow = g, Ne(e, o, i, r)), performance.now();
1059
+ }, Tt = function(e, t) {
1067
1060
  const n = {
1068
1061
  id: te(),
1069
1062
  label: "Custom Link",
@@ -1078,15 +1071,15 @@ const Lt = function(e, t, n, o) {
1078
1071
  y: -200
1079
1072
  }
1080
1073
  };
1081
- Le(this, e, t, n), this.bus.fire("operation", {
1074
+ Me(this, e, t, n), this.bus.fire("operation", {
1082
1075
  name: "createArrow",
1083
1076
  obj: n
1084
1077
  });
1085
- }, Tt = function(e) {
1078
+ }, Nt = function(e) {
1086
1079
  let t;
1087
1080
  if (e ? t = e : t = this.currentArrow, !t)
1088
1081
  return;
1089
- Me(this);
1082
+ Te(this);
1090
1083
  const n = t.arrowObj.id;
1091
1084
  this.arrows = this.arrows.filter((o) => o.id !== n), t.remove(), this.bus.fire("operation", {
1092
1085
  name: "removeArrow",
@@ -1094,18 +1087,18 @@ const Lt = function(e, t, n, o) {
1094
1087
  id: n
1095
1088
  }
1096
1089
  });
1097
- }, Nt = function(e) {
1090
+ }, At = function(e) {
1098
1091
  this.currentArrow = e;
1099
1092
  const t = e.arrowObj, n = L(t.from), o = L(t.to), s = J(this, n, t.delta1), i = J(this, o, t.delta2);
1100
- Te(this, t, s, i);
1093
+ Ne(this, t, s, i);
1101
1094
  }, $t = function() {
1102
- this.currentArrow = null, Me(this);
1103
- }, Me = function(e) {
1095
+ this.currentArrow = null, Te(this);
1096
+ }, Te = function(e) {
1104
1097
  e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
1105
- }, Te = function(e, t, n, o) {
1106
- var a;
1098
+ }, Ne = function(e, t, n, o) {
1099
+ var f;
1107
1100
  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);
1108
- let { x: s, y: i } = z(n), { ctrlX: r, ctrlY: l } = n, { ctrlX: c, ctrlY: d } = o, { x: h, y: u } = z(o);
1101
+ let { x: s, y: i } = z(n), { ctrlX: r, ctrlY: l } = n, { ctrlX: c, ctrlY: d } = o, { x: h, y: a } = z(o);
1109
1102
  e.P2.style.cssText = `top:${l}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${c}px;`, x(e.line1, {
1110
1103
  x1: s + "",
1111
1104
  y1: i + "",
@@ -1115,14 +1108,14 @@ const Lt = function(e, t, n, o) {
1115
1108
  x1: c + "",
1116
1109
  y1: d + "",
1117
1110
  x2: h + "",
1118
- y2: u + ""
1119
- }), e.helper1 && (e.helper1.destory(e.map), (a = e.helper2) == null || a.destory(e.map)), e.helper1 = fe.create(e.P2), e.helper2 = fe.create(e.P3), e.helper1.init(e.map, (p, m) => {
1111
+ y2: a + ""
1112
+ }), e.helper1 && (e.helper1.destory(e.map), (f = e.helper2) == null || f.destory(e.map)), e.helper1 = pe.create(e.P2), e.helper2 = pe.create(e.P3), e.helper1.init(e.map, (m, u) => {
1120
1113
  var v;
1121
- r = r + p / e.scaleVal, l = l + m / e.scaleVal;
1122
- const f = z({ ...n, ctrlX: r, ctrlY: l });
1123
- s = f.x, i = f.y;
1124
- const g = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, y = i / 8 + l * 3 / 8 + d * 3 / 8 + u / 8;
1125
- e.P2.style.top = l + "px", e.P2.style.left = r + "px", (v = e.currentArrow) == null || v.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${u}`), x(e.currentArrow.children[2], {
1114
+ r = r + m / e.scaleVal, l = l + u / e.scaleVal;
1115
+ const p = z({ ...n, ctrlX: r, ctrlY: l });
1116
+ s = p.x, i = p.y;
1117
+ const g = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, y = i / 8 + l * 3 / 8 + d * 3 / 8 + a / 8;
1118
+ e.P2.style.top = l + "px", e.P2.style.left = r + "px", (v = e.currentArrow) == null || v.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${a}`), x(e.currentArrow.children[2], {
1126
1119
  x: g + "",
1127
1120
  y: y + ""
1128
1121
  }), x(e.line1, {
@@ -1131,39 +1124,39 @@ const Lt = function(e, t, n, o) {
1131
1124
  x2: r + "",
1132
1125
  y2: l + ""
1133
1126
  }), t.delta1.x = r - n.cx, t.delta1.y = l - n.cy;
1134
- }), e.helper2.init(e.map, (p, m) => {
1135
- var w, E;
1136
- c = c + p / e.scaleVal, d = d + m / e.scaleVal;
1137
- const f = z({ ...o, ctrlX: c, ctrlY: d });
1138
- h = f.x, u = f.y;
1139
- const g = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, y = i / 8 + l * 3 / 8 + d * 3 / 8 + u / 8, v = ye(c, d, h, u);
1140
- e.P3.style.top = d + "px", e.P3.style.left = c + "px", (w = e.currentArrow) == null || w.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${u}`), (E = e.currentArrow) == null || E.children[1].setAttribute("d", `M ${v.x1} ${v.y1} L ${h} ${u} L ${v.x2} ${v.y2}`), x(e.currentArrow.children[2], {
1127
+ }), e.helper2.init(e.map, (m, u) => {
1128
+ var w, _;
1129
+ c = c + m / e.scaleVal, d = d + u / e.scaleVal;
1130
+ const p = z({ ...o, ctrlX: c, ctrlY: d });
1131
+ h = p.x, a = p.y;
1132
+ const g = s / 8 + r * 3 / 8 + c * 3 / 8 + h / 8, y = i / 8 + l * 3 / 8 + d * 3 / 8 + a / 8, v = be(c, d, h, a);
1133
+ e.P3.style.top = d + "px", e.P3.style.left = c + "px", (w = e.currentArrow) == null || w.children[0].setAttribute("d", `M ${s} ${i} C ${r} ${l} ${c} ${d} ${h} ${a}`), (_ = e.currentArrow) == null || _.children[1].setAttribute("d", `M ${v.x1} ${v.y1} L ${h} ${a} L ${v.x2} ${v.y2}`), x(e.currentArrow.children[2], {
1141
1134
  x: g + "",
1142
1135
  y: y + ""
1143
1136
  }), x(e.line2, {
1144
1137
  x1: c + "",
1145
1138
  y1: d + "",
1146
1139
  x2: h + "",
1147
- y2: u + ""
1140
+ y2: a + ""
1148
1141
  }), t.delta2.x = c - o.cx, t.delta2.y = d - o.cy;
1149
1142
  });
1150
1143
  };
1151
- function At() {
1144
+ function kt() {
1152
1145
  this.linkSvgGroup.innerHTML = "";
1153
1146
  for (let e = 0; e < this.arrows.length; e++) {
1154
1147
  const t = this.arrows[e];
1155
1148
  try {
1156
- Le(this, L(t.from), L(t.to), t, !0);
1149
+ Me(this, L(t.from), L(t.to), t, !0);
1157
1150
  } catch {
1158
1151
  }
1159
1152
  }
1160
1153
  this.nodes.appendChild(this.linkSvgGroup);
1161
1154
  }
1162
- function kt(e) {
1155
+ function Dt(e) {
1163
1156
  if (!e)
1164
1157
  return;
1165
1158
  const t = e.children[2];
1166
- _e(this, t, (n) => {
1159
+ Ee(this, t, (n) => {
1167
1160
  var i;
1168
1161
  const o = e.arrowObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
1169
1162
  s === "" ? o.label = origin : o.label = s, n.remove(), s !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
@@ -1172,49 +1165,49 @@ function kt(e) {
1172
1165
  }));
1173
1166
  });
1174
1167
  }
1175
- function Dt() {
1168
+ function Ht() {
1176
1169
  this.arrows = this.arrows.filter((e) => K(e.from, this.nodeData) && K(e.to, this.nodeData));
1177
1170
  }
1178
- const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1171
+ const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1179
1172
  __proto__: null,
1180
- createArrow: Mt,
1181
- editArrowLabel: kt,
1182
- removeArrow: Tt,
1183
- renderArrow: At,
1184
- selectArrow: Nt,
1185
- tidyArrow: Dt,
1173
+ createArrow: Tt,
1174
+ editArrowLabel: Dt,
1175
+ removeArrow: Nt,
1176
+ renderArrow: kt,
1177
+ selectArrow: At,
1178
+ tidyArrow: Ht,
1186
1179
  unselectArrow: $t
1187
- }, Symbol.toStringTag, { value: "Module" })), Bt = function(e) {
1180
+ }, Symbol.toStringTag, { value: "Module" })), Pt = function(e) {
1188
1181
  var c, d;
1189
1182
  if (e.length === 0)
1190
1183
  throw new Error("No selected node.");
1191
1184
  if (e.length === 1) {
1192
- const h = e[0].nodeObj, u = e[0].nodeObj.parent;
1193
- if (!u)
1185
+ const h = e[0].nodeObj, a = e[0].nodeObj.parent;
1186
+ if (!a)
1194
1187
  throw new Error("Can not select root node.");
1195
- const a = u.children.findIndex((p) => h === p);
1188
+ const f = a.children.findIndex((m) => h === m);
1196
1189
  return {
1197
- parent: u.id,
1198
- start: a,
1199
- end: a
1190
+ parent: a.id,
1191
+ start: f,
1192
+ end: f
1200
1193
  };
1201
1194
  }
1202
1195
  let t = 0;
1203
1196
  const n = e.map((h) => {
1204
- let u = h.nodeObj;
1205
- const a = [];
1206
- for (; u.parent; ) {
1207
- const p = u.parent, m = p.children, f = m == null ? void 0 : m.indexOf(u);
1208
- u = p, a.unshift({ node: u, index: f });
1197
+ let a = h.nodeObj;
1198
+ const f = [];
1199
+ for (; a.parent; ) {
1200
+ const m = a.parent, u = m.children, p = u == null ? void 0 : u.indexOf(a);
1201
+ a = m, f.unshift({ node: a, index: p });
1209
1202
  }
1210
- return a.length > t && (t = a.length), a;
1203
+ return f.length > t && (t = f.length), f;
1211
1204
  });
1212
1205
  let o = 0;
1213
1206
  e:
1214
1207
  for (; o < t; o++) {
1215
1208
  const h = (c = n[0][o]) == null ? void 0 : c.node;
1216
- for (let u = 1; u < n.length; u++)
1217
- if (((d = n[u][o]) == null ? void 0 : d.node) !== h)
1209
+ for (let a = 1; a < n.length; a++)
1210
+ if (((d = n[a][o]) == null ? void 0 : d.node) !== h)
1218
1211
  break e;
1219
1212
  }
1220
1213
  if (!o)
@@ -1227,10 +1220,10 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1227
1220
  start: i,
1228
1221
  end: r
1229
1222
  };
1230
- }, Pt = function(e) {
1223
+ }, zt = function(e) {
1231
1224
  const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1232
1225
  return t.setAttribute("id", e), t;
1233
- }, pe = function(e, t) {
1226
+ }, me = function(e, t) {
1234
1227
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
1235
1228
  return x(n, {
1236
1229
  d: e,
@@ -1239,7 +1232,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1239
1232
  "stroke-linecap": "round",
1240
1233
  "stroke-width": "2"
1241
1234
  }), n;
1242
- }, me = function(e, t, n, o, s) {
1235
+ }, ge = function(e, t, n, o, s) {
1243
1236
  const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
1244
1237
  return x(i, {
1245
1238
  "text-anchor": o,
@@ -1247,43 +1240,43 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1247
1240
  y: n + "",
1248
1241
  fill: s || "#666"
1249
1242
  }), i.innerHTML = e, i;
1250
- }, zt = (e) => L(e).parentElement.parentElement, jt = function({ parent: e, start: t }) {
1243
+ }, Ot = (e) => L(e).parentElement.parentElement, jt = function({ parent: e, start: t }) {
1251
1244
  var i, r;
1252
1245
  const n = L(e), o = n.nodeObj;
1253
1246
  let s;
1254
1247
  return o.parent ? s = (i = n.closest("me-main")) == null ? void 0 : i.className : s = (r = L(o.children[t].id).closest("me-main")) == null ? void 0 : r.className, s;
1255
- }, Ne = function(e, t) {
1248
+ }, Ae = function(e, t) {
1256
1249
  var ne;
1257
1250
  const { id: n, text: o, parent: s, start: i, end: r } = t, l = e.nodes, d = L(s).nodeObj, h = jt(t);
1258
- let u = 1 / 0, a = 0, p = 0, m = 0;
1251
+ let a = 1 / 0, f = 0, m = 0, u = 0;
1259
1252
  for (let R = i; R <= r; R++) {
1260
1253
  const oe = (ne = d.children) == null ? void 0 : ne[R];
1261
1254
  if (!oe)
1262
1255
  return e.removeSummary(n), null;
1263
- const F = zt(oe.id), { offsetLeft: W, offsetTop: se } = $(l, F);
1264
- R === i && (p = se), R === r && (m = se + F.offsetHeight), W < u && (u = W), F.offsetWidth + W > a && (a = F.offsetWidth + W);
1256
+ const F = Ot(oe.id), { offsetLeft: W, offsetTop: se } = A(l, F);
1257
+ R === i && (m = se), R === r && (u = se + F.offsetHeight), W < a && (a = W), F.offsetWidth + W > f && (f = F.offsetWidth + W);
1265
1258
  }
1266
- let f, g;
1267
- const y = p + 10, v = m + 10, w = (y + v) / 2, E = e.theme.cssVar["--color"];
1268
- h === "lhs" ? (f = pe(`M ${u + 10} ${y} c -5 0 -10 5 -10 10 L ${u} ${v - 10} c 0 5 5 10 10 10 M ${u} ${w} h -10`, E), g = me(o, u - 20, w + 6, "end", E)) : (f = pe(`M ${a - 10} ${y} c 5 0 10 5 10 10 L ${a} ${v - 10} c 0 5 -5 10 -10 10 M ${a} ${w} h 10`, E), g = me(o, a + 20, w + 6, "start", E));
1269
- const _ = Pt("s-" + n);
1270
- return _.appendChild(f), _.appendChild(g), _.summaryObj = t, e.summarySvg.appendChild(_), _;
1271
- }, Ot = function() {
1259
+ let p, g;
1260
+ const y = m + 10, v = u + 10, w = (y + v) / 2, _ = e.theme.cssVar["--color"];
1261
+ h === "lhs" ? (p = me(`M ${a + 10} ${y} c -5 0 -10 5 -10 10 L ${a} ${v - 10} c 0 5 5 10 10 10 M ${a} ${w} h -10`, _), g = ge(o, a - 20, w + 6, "end", _)) : (p = me(`M ${f - 10} ${y} c 5 0 10 5 10 10 L ${f} ${v - 10} c 0 5 -5 10 -10 10 M ${f} ${w} h 10`, _), g = ge(o, f + 20, w + 6, "start", _));
1262
+ const E = zt("s-" + n);
1263
+ return E.appendChild(p), E.appendChild(g), E.summaryObj = t, e.summarySvg.appendChild(E), E;
1264
+ }, qt = function() {
1272
1265
  let e = [];
1273
1266
  this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
1274
- const { parent: t, start: n, end: o } = Bt(e), s = { id: te(), parent: t, start: n, end: o, text: "summary" }, i = Ne(this, s);
1267
+ const { parent: t, start: n, end: o } = Pt(e), s = { id: te(), parent: t, start: n, end: o, text: "summary" }, i = Ae(this, s);
1275
1268
  this.summaries.push(s), this.editSummary(i), this.bus.fire("operation", {
1276
1269
  name: "createSummary",
1277
1270
  obj: s
1278
1271
  });
1279
- }, qt = function(e) {
1272
+ }, Rt = function(e) {
1280
1273
  var n;
1281
1274
  const t = this.summaries.findIndex((o) => o.id === e);
1282
1275
  t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove()), this.bus.fire("operation", {
1283
1276
  name: "removeSummary",
1284
1277
  obj: { id: e }
1285
1278
  });
1286
- }, Rt = function(e) {
1279
+ }, Vt = function(e) {
1287
1280
  const t = e.children[1].getBBox(), n = 6, o = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
1288
1281
  x(s, {
1289
1282
  x: t.x - n + "",
@@ -1295,21 +1288,21 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
1288
  "stroke-width": "2",
1296
1289
  fill: "none"
1297
1290
  }), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
1298
- }, Vt = function() {
1291
+ }, It = function() {
1299
1292
  var e, t;
1300
1293
  (t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
1301
- }, It = function() {
1294
+ }, Ft = function() {
1302
1295
  this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
1303
1296
  try {
1304
- Ne(this, e);
1297
+ Ae(this, e);
1305
1298
  } catch {
1306
1299
  }
1307
1300
  }), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
1308
- }, Ft = function(e) {
1301
+ }, Wt = function(e) {
1309
1302
  if (!e)
1310
1303
  return;
1311
1304
  const t = e.childNodes[1];
1312
- _e(this, t, (n) => {
1305
+ Ee(this, t, (n) => {
1313
1306
  var i;
1314
1307
  const o = e.summaryObj, s = ((i = n.textContent) == null ? void 0 : i.trim()) || "";
1315
1308
  s === "" ? o.text = origin : o.text = s, n.remove(), s !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
@@ -1317,36 +1310,36 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1317
1310
  obj: o
1318
1311
  }));
1319
1312
  });
1320
- }, Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1313
+ }, Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1321
1314
  __proto__: null,
1322
- createSummary: Ot,
1323
- editSummary: Ft,
1324
- removeSummary: qt,
1325
- renderSummary: It,
1326
- selectSummary: Rt,
1327
- unselectSummary: Vt
1328
- }, Symbol.toStringTag, { value: "Module" })), S = "http://www.w3.org/2000/svg";
1329
- function Xt(e, t) {
1330
- const n = document.createElementNS(S, "svg");
1315
+ createSummary: qt,
1316
+ editSummary: Wt,
1317
+ removeSummary: Rt,
1318
+ renderSummary: Ft,
1319
+ selectSummary: Vt,
1320
+ unselectSummary: It
1321
+ }, Symbol.toStringTag, { value: "Module" })), C = "http://www.w3.org/2000/svg";
1322
+ function Yt(e, t) {
1323
+ const n = document.createElementNS(C, "svg");
1331
1324
  return x(n, {
1332
1325
  version: "1.1",
1333
- xmlns: S,
1326
+ xmlns: C,
1334
1327
  height: e,
1335
1328
  width: t
1336
1329
  }), n;
1337
1330
  }
1338
- function Yt(e, t) {
1331
+ function Gt(e, t) {
1339
1332
  return (parseInt(e) - parseInt(t)) / 2;
1340
1333
  }
1341
- function Gt(e, t, n, o) {
1342
- const s = document.createElementNS(S, "g");
1334
+ function Kt(e, t, n, o) {
1335
+ const s = document.createElementNS(C, "g");
1343
1336
  let i = "";
1344
1337
  return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
1345
1338
  `).forEach((l, c) => {
1346
- const d = document.createElementNS(S, "text");
1339
+ const d = document.createElementNS(C, "text");
1347
1340
  x(d, {
1348
1341
  x: n + parseInt(t.paddingLeft) + "",
1349
- y: o + parseInt(t.paddingTop) + Yt(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
1342
+ y: o + parseInt(t.paddingTop) + Gt(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
1350
1343
  "text-anchor": "start",
1351
1344
  "font-family": t.fontFamily,
1352
1345
  "font-size": `${t.fontSize}`,
@@ -1355,11 +1348,11 @@ function Gt(e, t, n, o) {
1355
1348
  }), d.innerHTML = l, s.appendChild(d);
1356
1349
  }), s;
1357
1350
  }
1358
- function Kt(e, t, n, o) {
1351
+ function Ut(e, t, n, o) {
1359
1352
  var l;
1360
1353
  let s = "";
1361
1354
  (l = e.nodeObj) != null && l.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
1362
- const i = document.createElementNS(S, "foreignObject");
1355
+ const i = document.createElementNS(C, "foreignObject");
1363
1356
  x(i, {
1364
1357
  x: n + parseInt(t.paddingLeft) + "",
1365
1358
  y: o + parseInt(t.paddingTop) + "",
@@ -1372,8 +1365,8 @@ function Kt(e, t, n, o) {
1372
1365
  style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
1373
1366
  }), r.innerHTML = s, i.appendChild(r), i;
1374
1367
  }
1375
- function Ut(e, t) {
1376
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(S, "rect");
1368
+ function Jt(e, t) {
1369
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = A(e.nodes, t), i = document.createElementNS(C, "rect");
1377
1370
  return x(i, {
1378
1371
  x: o + "",
1379
1372
  y: s + "",
@@ -1387,7 +1380,7 @@ function Ut(e, t) {
1387
1380
  }), i;
1388
1381
  }
1389
1382
  function Y(e, t, n = !1) {
1390
- const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = $(e.nodes, t), r = document.createElementNS(S, "rect");
1383
+ const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = A(e.nodes, t), r = document.createElementNS(C, "rect");
1391
1384
  x(r, {
1392
1385
  x: s + "",
1393
1386
  y: i + "",
@@ -1399,13 +1392,13 @@ function Y(e, t, n = !1) {
1399
1392
  stroke: o.borderColor,
1400
1393
  "stroke-width": o.borderWidth
1401
1394
  });
1402
- const l = document.createElementNS(S, "g");
1395
+ const l = document.createElementNS(C, "g");
1403
1396
  l.appendChild(r);
1404
1397
  let c;
1405
- return n ? c = Kt(t, o, s, i) : c = Gt(t, o, s, i), l.appendChild(c), l;
1398
+ return n ? c = Ut(t, o, s, i) : c = Kt(t, o, s, i), l.appendChild(c), l;
1406
1399
  }
1407
- function Jt(e, t) {
1408
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(S, "a"), r = document.createElementNS(S, "text");
1400
+ function Qt(e, t) {
1401
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = A(e.nodes, t), i = document.createElementNS(C, "a"), r = document.createElementNS(C, "text");
1409
1402
  return x(r, {
1410
1403
  x: o + "",
1411
1404
  y: s + parseInt(n.fontSize) + "",
@@ -1416,8 +1409,8 @@ function Jt(e, t) {
1416
1409
  fill: `${n.color}`
1417
1410
  }), r.innerHTML = t.textContent, i.appendChild(r), i.setAttribute("href", t.href), i;
1418
1411
  }
1419
- function Qt(e, t) {
1420
- const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(S, "image");
1412
+ function Zt(e, t) {
1413
+ const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = A(e.nodes, t), i = document.createElementNS(C, "image");
1421
1414
  return x(i, {
1422
1415
  x: o + "",
1423
1416
  y: s + "",
@@ -1426,41 +1419,41 @@ function Qt(e, t) {
1426
1419
  href: t.src
1427
1420
  }), i;
1428
1421
  }
1429
- const G = 100, Zt = '<?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">', en = (e, t = !1) => {
1430
- var u, a, p;
1431
- const n = e.nodes, o = n.offsetHeight + G * 2, s = n.offsetWidth + G * 2, i = Xt(o + "px", s + "px"), r = document.createElementNS(S, "svg"), l = document.createElementNS(S, "rect");
1422
+ const G = 100, en = '<?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">', tn = (e, t = !1) => {
1423
+ var a, f, m;
1424
+ const n = e.nodes, o = n.offsetHeight + G * 2, s = n.offsetWidth + G * 2, i = Yt(o + "px", s + "px"), r = document.createElementNS(C, "svg"), l = document.createElementNS(C, "rect");
1432
1425
  x(l, {
1433
1426
  x: "0",
1434
1427
  y: "0",
1435
1428
  width: `${s}`,
1436
1429
  height: `${o}`,
1437
1430
  fill: e.theme.cssVar["--bgcolor"]
1438
- }), i.appendChild(l), n.querySelectorAll(".subLines").forEach((m) => {
1439
- const f = m.cloneNode(!0), { offsetLeft: g, offsetTop: y } = $(n, m.parentElement);
1440
- f.setAttribute("x", `${g}`), f.setAttribute("y", `${y}`), r.appendChild(f);
1431
+ }), i.appendChild(l), n.querySelectorAll(".subLines").forEach((u) => {
1432
+ const p = u.cloneNode(!0), { offsetLeft: g, offsetTop: y } = A(n, u.parentElement);
1433
+ p.setAttribute("x", `${g}`), p.setAttribute("y", `${y}`), r.appendChild(p);
1441
1434
  });
1442
- const c = (u = n.querySelector(".lines")) == null ? void 0 : u.cloneNode(!0);
1435
+ const c = (a = n.querySelector(".lines")) == null ? void 0 : a.cloneNode(!0);
1443
1436
  c && r.appendChild(c);
1444
- const d = (a = n.querySelector(".topiclinks")) == null ? void 0 : a.cloneNode(!0);
1437
+ const d = (f = n.querySelector(".topiclinks")) == null ? void 0 : f.cloneNode(!0);
1445
1438
  d && r.appendChild(d);
1446
- const h = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
1447
- return h && r.appendChild(h), n.querySelectorAll("me-tpc").forEach((m) => {
1448
- m.nodeObj.dangerouslySetInnerHTML ? r.appendChild(Y(e, m, !t)) : (r.appendChild(Ut(e, m)), r.appendChild(Y(e, m.text, !t)));
1449
- }), n.querySelectorAll(".tags > span").forEach((m) => {
1450
- r.appendChild(Y(e, m));
1451
- }), n.querySelectorAll(".icons > span").forEach((m) => {
1452
- r.appendChild(Y(e, m));
1453
- }), n.querySelectorAll(".hyper-link").forEach((m) => {
1454
- r.appendChild(Jt(e, m));
1455
- }), n.querySelectorAll("img").forEach((m) => {
1456
- r.appendChild(Qt(e, m));
1439
+ const h = (m = n.querySelector(".summary")) == null ? void 0 : m.cloneNode(!0);
1440
+ return h && r.appendChild(h), n.querySelectorAll("me-tpc").forEach((u) => {
1441
+ u.nodeObj.dangerouslySetInnerHTML ? r.appendChild(Y(e, u, !t)) : (r.appendChild(Jt(e, u)), r.appendChild(Y(e, u.text, !t)));
1442
+ }), n.querySelectorAll(".tags > span").forEach((u) => {
1443
+ r.appendChild(Y(e, u));
1444
+ }), n.querySelectorAll(".icons > span").forEach((u) => {
1445
+ r.appendChild(Y(e, u));
1446
+ }), n.querySelectorAll(".hyper-link").forEach((u) => {
1447
+ r.appendChild(Qt(e, u));
1448
+ }), n.querySelectorAll("img").forEach((u) => {
1449
+ r.appendChild(Zt(e, u));
1457
1450
  }), x(r, {
1458
1451
  x: G + "",
1459
1452
  y: G + "",
1460
1453
  overflow: "visible"
1461
1454
  }), i.appendChild(r), i;
1462
- }, tn = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Zt + e.outerHTML);
1463
- function nn(e) {
1455
+ }, nn = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), en + e.outerHTML);
1456
+ function on(e) {
1464
1457
  return new Promise((t, n) => {
1465
1458
  const o = new FileReader();
1466
1459
  o.onload = (s) => {
@@ -1470,11 +1463,11 @@ function nn(e) {
1470
1463
  }, o.readAsDataURL(e);
1471
1464
  });
1472
1465
  }
1473
- const on = function(e = !1, t) {
1474
- const n = en(this, e), o = tn(n, t);
1466
+ const sn = function(e = !1, t) {
1467
+ const n = tn(this, e), o = nn(n, t);
1475
1468
  return new Blob([o], { type: "image/svg+xml" });
1476
- }, sn = async function(e = !1, t) {
1477
- const n = this.exportSvg(e, t), o = await nn(n);
1469
+ }, rn = async function(e = !1, t) {
1470
+ const n = this.exportSvg(e, t), o = await on(n);
1478
1471
  return new Promise((s, i) => {
1479
1472
  const r = new Image();
1480
1473
  r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
@@ -1482,55 +1475,55 @@ const on = function(e = !1, t) {
1482
1475
  l.width = r.width, l.height = r.height, l.getContext("2d").drawImage(r, 0, 0), l.toBlob(s, "image/png", 1);
1483
1476
  }, r.src = o, r.onerror = i;
1484
1477
  });
1485
- }, rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1478
+ }, ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1486
1479
  __proto__: null,
1487
- exportPng: sn,
1488
- exportSvg: on
1489
- }, Symbol.toStringTag, { value: "Module" })), ln = {}, cn = {
1480
+ exportPng: rn,
1481
+ exportSvg: sn
1482
+ }, Symbol.toStringTag, { value: "Module" })), cn = {}, an = {
1490
1483
  getObjById: K,
1491
1484
  generateNewObj: $e,
1492
- layout: De,
1493
- linkDiv: Ie,
1494
- editTopic: qe,
1495
- createWrapper: Pe,
1496
- createParent: ze,
1485
+ layout: He,
1486
+ linkDiv: Fe,
1487
+ editTopic: Re,
1488
+ createWrapper: ze,
1489
+ createParent: Oe,
1497
1490
  createChildren: je,
1498
- createTopic: Oe,
1491
+ createTopic: qe,
1499
1492
  findEle: L,
1500
- changeTheme: tt,
1493
+ changeTheme: nt,
1501
1494
  ...Ct,
1495
+ ...cn,
1496
+ ...Bt,
1497
+ ...Xt,
1502
1498
  ...ln,
1503
- ...Ht,
1504
- ...Wt,
1505
- ...rn,
1506
1499
  init(e) {
1507
1500
  if (!e || !e.nodeData)
1508
1501
  return new Error("MindElixir: `data` is required");
1509
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, ee(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Xe(this), this.toCenter(), this.layout(), this.linkDiv();
1502
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, ee(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Ye(this), this.toCenter(), this.layout(), this.linkDiv();
1510
1503
  },
1511
1504
  destroy() {
1512
1505
  var e, t;
1513
1506
  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;
1514
1507
  }
1515
1508
  };
1516
- function an({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, containerHeight: d }) {
1509
+ function hn({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, containerHeight: d }) {
1517
1510
  let h = t + n / 2;
1518
- const u = e + o / 2;
1519
- let a;
1520
- c === "lhs" ? a = i + r : a = i;
1521
- const p = s + l / 2, f = (1 - Math.abs(p - u) / d) * 0.25 * (n / 2);
1522
- return c === "lhs" ? h = h - n / 10 - f : h = h + n / 10 + f, `M ${h} ${u} Q ${h} ${p} ${a} ${p}`;
1511
+ const a = e + o / 2;
1512
+ let f;
1513
+ c === "lhs" ? f = i + r : f = i;
1514
+ const m = s + l / 2, p = (1 - Math.abs(m - a) / d) * 0.25 * (n / 2);
1515
+ return c === "lhs" ? h = h - n / 10 - p : h = h + n / 10 + p, `M ${h} ${a} Q ${h} ${m} ${f} ${m}`;
1523
1516
  }
1524
- function hn({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, isFirst: d }) {
1525
- let h = 0, u = 0;
1517
+ function dn({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: r, cH: l, direction: c, isFirst: d }) {
1518
+ let h = 0, a = 0;
1526
1519
  d ? h = e + o / 2 : h = e + o;
1527
- const a = s + l;
1528
- let p = 0, m = 0, f = 0;
1529
- const g = Math.abs(h - a) / 300 * N;
1530
- return c === "lhs" ? (f = t, p = f + N, m = f - N, u = i + N, `M ${p} ${h} C ${f} ${h} ${f + g} ${a} ${m} ${a} H ${u}`) : (f = t + n, p = f - N, m = f + N, u = i + r - N, `M ${p} ${h} C ${f} ${h} ${f - g} ${a} ${m} ${a} H ${u}`);
1520
+ const f = s + l;
1521
+ let m = 0, u = 0, p = 0;
1522
+ const g = Math.abs(h - f) / 300 * N;
1523
+ return c === "lhs" ? (p = t, m = p + N, u = p - N, a = i + N, `M ${m} ${h} C ${p} ${h} ${p + g} ${f} ${u} ${f} H ${a}`) : (p = t + n, m = p - N, u = p + N, a = i + r - N, `M ${m} ${h} C ${p} ${h} ${p - g} ${f} ${u} ${f} H ${a}`);
1531
1524
  }
1532
- const V = document;
1533
- function A({
1525
+ const un = "4.1.4", V = document;
1526
+ function $({
1534
1527
  el: e,
1535
1528
  direction: t,
1536
1529
  locale: n,
@@ -1542,11 +1535,11 @@ function A({
1542
1535
  keypress: c,
1543
1536
  mouseSelectionButton: d,
1544
1537
  before: h,
1545
- newTopicName: u,
1546
- allowUndo: a,
1547
- generateMainBranch: p,
1548
- generateSubBranch: m,
1549
- overflowHidden: f,
1538
+ newTopicName: a,
1539
+ allowUndo: f,
1540
+ generateMainBranch: m,
1541
+ generateSubBranch: u,
1542
+ overflowHidden: p,
1550
1543
  mobileMenu: g,
1551
1544
  theme: y
1552
1545
  }) {
@@ -1554,20 +1547,20 @@ function A({
1554
1547
  const w = Object.prototype.toString.call(e);
1555
1548
  if (w === "[object HTMLDivElement]" ? v = e : w === "[object String]" && (v = document.querySelector(e)), !v)
1556
1549
  throw new Error("MindElixir: el is not a valid element");
1557
- v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", N + "px"), this.mindElixirBox = v, this.disposable = [], this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = d || 0, this.mobileMenu = g || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = u || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = a === void 0 ? !1 : a, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = p || an, this.generateSubBranch = m || hn, this.overflowHidden = f || !1, this.bus = ke.create(), this.container = V.createElement("div"), this.container.className = "map-container";
1558
- const E = window.matchMedia("(prefers-color-scheme: dark)");
1559
- this.theme = y || (E.matches ? ve : ge);
1560
- const _ = V.createElement("div");
1561
- _.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = V.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = I("lines"), this.summarySvg = I("summary"), this.linkController = I("linkcontroller"), this.P2 = V.createElement("div"), this.P3 = V.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = le(), this.line2 = le(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = I("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : Ae(this);
1550
+ v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", N + "px"), this.mindElixirBox = v, this.disposable = [], this.before = h || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = i === void 0 ? !0 : i, this.toolBar = l === void 0 ? !0 : l, this.keypress = c === void 0 ? !0 : c, this.mouseSelectionButton = d || 0, this.mobileMenu = g || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = a || "new node", this.editable = s === void 0 ? !0 : s, this.allowUndo = f === void 0 ? !1 : f, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = m || hn, this.generateSubBranch = u || dn, this.overflowHidden = p || !1, this.bus = De.create(), this.container = V.createElement("div"), this.container.className = "map-container";
1551
+ const _ = window.matchMedia("(prefers-color-scheme: dark)");
1552
+ this.theme = y || (_.matches ? ye : ve);
1553
+ const E = V.createElement("div");
1554
+ E.className = "map-canvas", this.map = E, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = V.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = I("lines"), this.summarySvg = I("summary"), this.linkController = I("linkcontroller"), this.P2 = V.createElement("div"), this.P3 = V.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = le(), this.line2 = le(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = I("topiclinks"), this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : ke(this);
1562
1555
  }
1563
- A.prototype = cn;
1564
- A.LEFT = q;
1565
- A.RIGHT = Q;
1566
- A.SIDE = Z;
1567
- A.THEME = ge;
1568
- A.DARK_THEME = ve;
1569
- A.version = "4.1.2";
1570
- A.E = L;
1556
+ $.prototype = an;
1557
+ $.LEFT = q;
1558
+ $.RIGHT = Q;
1559
+ $.SIDE = Z;
1560
+ $.THEME = ve;
1561
+ $.DARK_THEME = ye;
1562
+ $.version = un;
1563
+ $.E = L;
1571
1564
  export {
1572
- A as default
1565
+ $ as default
1573
1566
  };