mind-elixir 3.2.6 → 3.3.1

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