mind-elixir 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MindElixir.iife.js +4 -4
- package/dist/MindElixir.js +221 -217
- package/dist/MindElixirLite.iife.js +5 -5
- package/dist/MindElixirLite.js +479 -475
- package/package.json +1 -1
package/dist/MindElixirLite.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".mind-elixir{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--main-color: #444446;--main-bgcolor: #ffffff;--topic-padding: 3px;--color: #777777;--bgcolor: #f6f6f6;--selected: #4dc4ff;--panel-color: #444446;--panel-bgcolor: #ffffff;--panel-border-color: #eaeaea;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif}.mind-elixir .hyper-link{text-decoration:none}.map-container{-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{box-shadow:0 0 0 2px var(--selected)}.map-container .lhs{direction:rtl}.map-container .lhs me-tpc{direction:ltr}.map-container .map-canvas{height:20000px;width:20000px;position:relative;-webkit-user-select:none;user-select:none;transition:transform .3s;transform:scale(1);background-color:var(--bgcolor)}.map-container .map-canvas me-nodes{position:absolute;display:flex;justify-content:center;align-items:center;height:fit-content;width:fit-content}.map-container .map-canvas me-root{position:relative}.map-container .map-canvas me-root me-tpc{display:block;font-size:25px;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:800px;white-space:pre-wrap;padding:var(--topic-padding);line-height:1.2}.map-container me-parent me-tpc>div,.map-container me-parent me-tpc>span,.map-container me-parent me-tpc>img{pointer-events:none}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;padding:var(--topic-padding);color:var(--color);background-color:var(--bgcolor);width:max-content;max-width:800px;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:all}.map-container me-tpc>img{pointer-events:none;display:block;margin-top:8px}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#aaa;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 3px 0 0;font-size:12px;line-height:16px}.map-container .icons{display:inline-block;direction:ltr;margin-right:10px}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.selection-area{background:#4f90f22d;border:1px solid #4f90f2}.mind-elixir .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.mind-elixir .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;font:300 15px Roboto,sans-serif;color:var(--panel-color);box-shadow:0 12px 15px #0003}.mind-elixir .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:10px 14px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color)}.mind-elixir .context-menu .menu-list li a{color:#333;text-decoration:none}.mind-elixir .context-menu .menu-list li.disabled{display:none;color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .context-menu .menu-list li:hover{cursor:pointer;filter:brightness(.9)}.mind-elixir .context-menu .menu-list li:first-child{border-radius:5px 5px 0 0}.mind-elixir .context-menu .menu-list li:last-child{border-bottom:0;border-radius:0 0 5px 5px}.mind-elixir .context-menu .menu-list li span:last-child{float:right}.mind-elixir .mobile-menu{position:absolute;left:20px;bottom:70px;z-index:99;margin:0;padding:0;color:#333;border-radius:5px;box-shadow:0 12px 15px #0003;overflow:hidden}.mind-elixir .mobile-menu *{transition:color .4s,background-color .4s}.mind-elixir .mobile-menu div{float:left;text-align:center;width:30px;overflow:hidden;white-space:nowrap;padding:8px;background-color:#fff;border-bottom:1px solid #ecf0f1}.mind-elixir .mobile-menu div a{color:#333;text-decoration:none}.mind-elixir .mobile-menu div.disabled{color:#5e5e5e;background-color:#f7f7f7}.mind-elixir .mobile-menu div.disabled:hover{cursor:default;background-color:#f7f7f7}.mind-elixir .mobile-menu div:hover{cursor:pointer;background-color:#ecf0f1}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, i, n, s, o, l, r = '<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>', h = (h = document.getElementsByTagName("script"))[h.length - 1].getAttribute("data-injectcss");
|
|
4
|
-
if (
|
|
3
|
+
var t, n, i, s, o, l, r = '<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>', d = (d = document.getElementsByTagName("script"))[d.length - 1].getAttribute("data-injectcss");
|
|
4
|
+
if (d && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__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>"
|
|
9
9
|
);
|
|
10
|
-
} catch (
|
|
11
|
-
console && console.log(
|
|
10
|
+
} catch (h) {
|
|
11
|
+
console && console.log(h);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
function f() {
|
|
15
|
-
o || (o = !0,
|
|
15
|
+
o || (o = !0, i());
|
|
16
16
|
}
|
|
17
17
|
t = function() {
|
|
18
|
-
var
|
|
19
|
-
(u = document.createElement("div")).innerHTML = r, r = null, (c = u.getElementsByTagName("svg")[0]) && (c.setAttribute("aria-hidden", "true"), c.style.position = "absolute", c.style.width = 0, c.style.height = 0, c.style.overflow = "hidden",
|
|
20
|
-
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (
|
|
21
|
-
document.removeEventListener("DOMContentLoaded",
|
|
22
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
18
|
+
var h, a, c, u;
|
|
19
|
+
(u = document.createElement("div")).innerHTML = r, r = null, (c = u.getElementsByTagName("svg")[0]) && (c.setAttribute("aria-hidden", "true"), c.style.position = "absolute", c.style.width = 0, c.style.height = 0, c.style.overflow = "hidden", h = c, (a = document.body).firstChild ? (u = h, (c = a.firstChild).parentNode.insertBefore(u, c)) : a.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 && (i = t, s = e.document, o = !1, (l = function() {
|
|
23
23
|
try {
|
|
24
24
|
s.documentElement.doScroll("left");
|
|
25
25
|
} catch {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
s.readyState == "complete" && (s.onreadystatechange = null, f());
|
|
31
31
|
});
|
|
32
32
|
})(window);
|
|
33
|
-
const
|
|
33
|
+
const j = 0, G = 1, I = 2, $ = 30, M = 8, ut = {
|
|
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, K = 1, G = 2, S = 30, L = 8, ft = {
|
|
|
42
42
|
"--panel-bgcolor": "#ffffff",
|
|
43
43
|
"--panel-border-color": "#eaeaea"
|
|
44
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, ft = {
|
|
46
46
|
name: "Dark",
|
|
47
47
|
palette: ["#848FA0", "#748BE9", "#D2F9FE", "#4145A5", "#789AFA", "#706CF4", "#EF987F", "#775DD5", "#FCEECF", "#DA7FBC"],
|
|
48
48
|
cssVar: {
|
|
@@ -55,72 +55,72 @@ const q = 0, K = 1, G = 2, S = 30, L = 8, ft = {
|
|
|
55
55
|
"--panel-border-color": "#696969"
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
function
|
|
58
|
+
function et(e) {
|
|
59
59
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const pt = function(e, t) {
|
|
62
62
|
if (t.id === e)
|
|
63
63
|
return t;
|
|
64
64
|
if (t.children && t.children.length) {
|
|
65
|
-
for (let
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
65
|
+
for (let n = 0; n < t.children.length; n++) {
|
|
66
|
+
const i = pt(e, t.children[n]);
|
|
67
|
+
if (i)
|
|
68
|
+
return i;
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
} else
|
|
72
72
|
return null;
|
|
73
|
-
},
|
|
73
|
+
}, U = (e, t) => {
|
|
74
74
|
if (e.parent = t, e.children)
|
|
75
|
-
for (let
|
|
76
|
-
|
|
75
|
+
for (let n = 0; n < e.children.length; n++)
|
|
76
|
+
U(e.children[n], e);
|
|
77
77
|
};
|
|
78
|
-
function
|
|
79
|
-
const s =
|
|
78
|
+
function mt(e, t, n, i) {
|
|
79
|
+
const s = i - t, o = e - n;
|
|
80
80
|
let l = Math.atan(Math.abs(s) / Math.abs(o)) / 3.14 * 180;
|
|
81
81
|
o < 0 && s > 0 && (l = 180 - l), o < 0 && s < 0 && (l = 180 + l), o > 0 && s < 0 && (l = 360 - l);
|
|
82
|
-
const r = 20,
|
|
82
|
+
const r = 20, d = 30, f = l + d, h = l - d;
|
|
83
83
|
return {
|
|
84
|
-
x1:
|
|
85
|
-
y1:
|
|
86
|
-
x2:
|
|
87
|
-
y2:
|
|
84
|
+
x1: n + Math.cos(Math.PI * f / 180) * r,
|
|
85
|
+
y1: i - Math.sin(Math.PI * f / 180) * r,
|
|
86
|
+
x2: n + Math.cos(Math.PI * h / 180) * r,
|
|
87
|
+
y2: i - Math.sin(Math.PI * h / 180) * r
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
let
|
|
92
|
-
const o = (e.cy -
|
|
93
|
-
return o > e.h / e.w || o < -e.h / e.w ? e.cy -
|
|
94
|
-
x:
|
|
90
|
+
function K(e, t, n) {
|
|
91
|
+
let i, s;
|
|
92
|
+
const o = (e.cy - n) / (t - e.cx);
|
|
93
|
+
return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
|
|
94
|
+
x: i,
|
|
95
95
|
y: s
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
let
|
|
100
|
-
const o = (e.cy -
|
|
101
|
-
return o > e.h / e.w || o < -e.h / e.w ? e.cy -
|
|
102
|
-
x:
|
|
98
|
+
function J(e, t, n) {
|
|
99
|
+
let i, s;
|
|
100
|
+
const o = (e.cy - n) / (t - e.cx);
|
|
101
|
+
return o > e.h / e.w || o < -e.h / e.w ? e.cy - n < 0 ? (i = e.cx - e.h / 2 / o, s = e.cy + e.h / 2) : (i = e.cx + e.h / 2 / o, s = e.cy - e.h / 2) : e.cx - t < 0 ? (i = e.cx + e.w / 2, s = e.cy - e.w * o / 2) : (i = e.cx - e.w / 2, s = e.cy + e.w * o / 2), {
|
|
102
|
+
x: i,
|
|
103
103
|
y: s
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Q() {
|
|
107
107
|
return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substr(2)).substr(2, 16);
|
|
108
108
|
}
|
|
109
109
|
const Mt = function() {
|
|
110
|
-
const e =
|
|
110
|
+
const e = Q();
|
|
111
111
|
return {
|
|
112
112
|
topic: this.newTopicName,
|
|
113
113
|
id: e
|
|
114
114
|
};
|
|
115
|
-
},
|
|
116
|
-
let
|
|
115
|
+
}, gt = (e, t) => {
|
|
116
|
+
let n = 0, i = 0;
|
|
117
117
|
for (; t && t !== e; )
|
|
118
|
-
|
|
119
|
-
return { offsetLeft:
|
|
120
|
-
},
|
|
121
|
-
for (const
|
|
122
|
-
e.setAttribute(
|
|
123
|
-
},
|
|
118
|
+
n += t.offsetLeft, i += t.offsetTop, t = t.offsetParent;
|
|
119
|
+
return { offsetLeft: n, offsetTop: i };
|
|
120
|
+
}, Z = (e, t) => {
|
|
121
|
+
for (const n in t)
|
|
122
|
+
e.setAttribute(n, t[n]);
|
|
123
|
+
}, P = {
|
|
124
124
|
moved: !1,
|
|
125
125
|
// diffrentiate click and move
|
|
126
126
|
mousedown: !1,
|
|
@@ -132,8 +132,8 @@ const Mt = function() {
|
|
|
132
132
|
this.lastX = e.pageX, this.lastY = e.pageY;
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
t.scrollTo(t.scrollLeft +
|
|
135
|
+
const n = this.lastX - e.pageX, i = this.lastY - e.pageY;
|
|
136
|
+
t.scrollTo(t.scrollLeft + n, t.scrollTop + i), this.lastX = e.pageX, this.lastY = e.pageY;
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
clear() {
|
|
@@ -142,32 +142,32 @@ const Mt = function() {
|
|
|
142
142
|
}, nt = (e) => e.tagName === "ME-TPC";
|
|
143
143
|
function $t(e) {
|
|
144
144
|
e.map.addEventListener("click", (t) => {
|
|
145
|
-
var
|
|
146
|
-
if (
|
|
147
|
-
|
|
145
|
+
var i;
|
|
146
|
+
if (P.moved) {
|
|
147
|
+
P.clear();
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
e.unselectNode(), e.unselectNodes(), e.unselectSummary();
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
e.expandNode(
|
|
151
|
+
const n = t.target;
|
|
152
|
+
if (n.tagName === "ME-EPD")
|
|
153
|
+
e.expandNode(n.previousSibling);
|
|
154
154
|
else if (e.editable)
|
|
155
|
-
nt(
|
|
155
|
+
nt(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? e.selectSummary(n.parentElement) : n.tagName === "path" ? ((i = n == null ? void 0 : n.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
|
|
156
156
|
else
|
|
157
157
|
return;
|
|
158
158
|
}), e.map.addEventListener("dblclick", (t) => {
|
|
159
159
|
if (t.preventDefault(), !e.editable)
|
|
160
160
|
return;
|
|
161
|
-
const
|
|
162
|
-
nt(
|
|
161
|
+
const n = t.target;
|
|
162
|
+
nt(n) ? e.beginEdit(n) : n.tagName === "text" && e.editSummary(n.parentElement);
|
|
163
163
|
}), e.map.addEventListener("mousemove", (t) => {
|
|
164
|
-
t.target.contentEditable !== "true" &&
|
|
164
|
+
t.target.contentEditable !== "true" && P.onMove(t, e.container);
|
|
165
165
|
}), e.map.addEventListener("mousedown", (t) => {
|
|
166
|
-
t.button === 2 && t.target.contentEditable !== "true" && (
|
|
166
|
+
t.button === 2 && t.target.contentEditable !== "true" && (P.moved = !1, P.mousedown = !0);
|
|
167
167
|
}), e.map.addEventListener("mouseleave", (t) => {
|
|
168
|
-
console.log(t.button), t.button === 2 &&
|
|
168
|
+
console.log(t.button), t.button === 2 && P.clear();
|
|
169
169
|
}), e.map.addEventListener("mouseup", (t) => {
|
|
170
|
-
t.button === 2 &&
|
|
170
|
+
t.button === 2 && P.clear();
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
const kt = {
|
|
@@ -182,234 +182,234 @@ const kt = {
|
|
|
182
182
|
},
|
|
183
183
|
fire: function(e, ...t) {
|
|
184
184
|
if (this.handlers[e] instanceof Array) {
|
|
185
|
-
const
|
|
186
|
-
for (let
|
|
187
|
-
i
|
|
185
|
+
const n = this.handlers[e];
|
|
186
|
+
for (let i = 0; i < n.length; i++)
|
|
187
|
+
n[i](...t);
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
removeListener: function(e, t) {
|
|
191
191
|
if (!this.handlers[e])
|
|
192
192
|
return;
|
|
193
|
-
const
|
|
193
|
+
const n = this.handlers[e];
|
|
194
194
|
if (!t)
|
|
195
|
-
|
|
196
|
-
else if (
|
|
197
|
-
for (let
|
|
198
|
-
i
|
|
195
|
+
n.length = 0;
|
|
196
|
+
else if (n.length)
|
|
197
|
+
for (let i = 0; i < n.length; i++)
|
|
198
|
+
n[i] === t && this.handlers[e].splice(i, 1);
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
},
|
|
202
|
+
}, F = document, Nt = function() {
|
|
203
203
|
console.time("layout"), this.nodes.innerHTML = "";
|
|
204
204
|
const e = this.createTopic(this.nodeData);
|
|
205
|
-
|
|
206
|
-
const t =
|
|
205
|
+
vt(e, this.nodeData), e.draggable = !1;
|
|
206
|
+
const t = F.createElement("me-root");
|
|
207
207
|
t.appendChild(e);
|
|
208
|
-
const
|
|
209
|
-
if (this.direction ===
|
|
210
|
-
let
|
|
211
|
-
|
|
212
|
-
o.direction ===
|
|
208
|
+
const n = this.nodeData.children || [];
|
|
209
|
+
if (this.direction === I) {
|
|
210
|
+
let i = 0, s = 0;
|
|
211
|
+
n.map((o) => {
|
|
212
|
+
o.direction === j ? i += 1 : o.direction === G ? s += 1 : i <= s ? (o.direction = j, i += 1) : (o.direction = G, s += 1);
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
|
-
Tt(this,
|
|
216
|
-
}, Tt = function(e, t,
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
const s =
|
|
215
|
+
Tt(this, n, t), console.timeEnd("layout");
|
|
216
|
+
}, Tt = function(e, t, n) {
|
|
217
|
+
const i = F.createElement("me-main");
|
|
218
|
+
i.className = "lhs";
|
|
219
|
+
const s = F.createElement("me-main");
|
|
220
220
|
s.className = "rhs";
|
|
221
221
|
for (let o = 0; o < t.length; o++) {
|
|
222
222
|
const l = t[o], { grp: r } = e.createWrapper(l);
|
|
223
|
-
e.direction ===
|
|
223
|
+
e.direction === I ? l.direction === j ? i.appendChild(r) : s.appendChild(r) : e.direction === j ? i.appendChild(r) : s.appendChild(r);
|
|
224
224
|
}
|
|
225
|
-
e.nodes.appendChild(
|
|
225
|
+
e.nodes.appendChild(i), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines);
|
|
226
226
|
}, At = function(e, t) {
|
|
227
|
-
const
|
|
228
|
-
for (let
|
|
229
|
-
const s = t[
|
|
230
|
-
|
|
227
|
+
const n = F.createElement("me-children");
|
|
228
|
+
for (let i = 0; i < t.length; i++) {
|
|
229
|
+
const s = t[i], { grp: o } = e.createWrapper(s);
|
|
230
|
+
n.appendChild(o);
|
|
231
231
|
}
|
|
232
|
-
return
|
|
233
|
-
},
|
|
232
|
+
return n;
|
|
233
|
+
}, C = document, L = (e, t) => (t ? t.mindElixirBox : C).querySelector(`[data-nodeid=me${e}]`), vt = function(e, t) {
|
|
234
234
|
if (e.textContent = t.topic, 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.image) {
|
|
235
|
-
const
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
|
|
235
|
+
const n = t.image;
|
|
236
|
+
if (n.url && n.width && n.height) {
|
|
237
|
+
const i = C.createElement("img");
|
|
238
|
+
i.src = n.url, i.style.width = n.width + "px", i.style.height = n.height + "px", e.appendChild(i), e.image = i;
|
|
239
239
|
} else
|
|
240
240
|
console.warn("image url/width/height are required");
|
|
241
241
|
}
|
|
242
242
|
if (t.hyperLink) {
|
|
243
|
-
const
|
|
244
|
-
|
|
243
|
+
const n = C.createElement("a");
|
|
244
|
+
n.className = "hyper-link", n.target = "_blank", n.innerText = "🔗", n.href = t.hyperLink, e.appendChild(n), e.linkContainer = n, console.log(n);
|
|
245
245
|
} else
|
|
246
246
|
e.linkContainer && (e.linkContainer.remove(), e.linkContainer = null);
|
|
247
247
|
if (t.icons && t.icons.length) {
|
|
248
|
-
const
|
|
249
|
-
|
|
248
|
+
const n = C.createElement("span");
|
|
249
|
+
n.className = "icons", n.innerHTML = t.icons.map((i) => `<span>${et(i)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
250
250
|
}
|
|
251
251
|
if (t.tags && t.tags.length) {
|
|
252
|
-
const
|
|
253
|
-
|
|
252
|
+
const n = C.createElement("div");
|
|
253
|
+
n.className = "tags", n.innerHTML = t.tags.map((i) => `<span>${et(i)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
254
254
|
}
|
|
255
255
|
t.branchColor && (e.style.borderColor = t.branchColor);
|
|
256
256
|
}, Ht = function(e, t) {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
257
|
+
const n = C.createElement("me-wrapper"), { p: i, tpc: s } = this.createParent(e);
|
|
258
|
+
if (n.appendChild(i), !t && e.children && e.children.length > 0) {
|
|
259
259
|
const o = Dt(e.expanded);
|
|
260
|
-
if (
|
|
260
|
+
if (i.appendChild(o), e.expanded !== !1) {
|
|
261
261
|
const l = At(this, e.children);
|
|
262
|
-
|
|
262
|
+
n.appendChild(l);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
return { grp:
|
|
265
|
+
return { grp: n, top: i, tpc: s };
|
|
266
266
|
}, Pt = function(e) {
|
|
267
|
-
const t =
|
|
268
|
-
return
|
|
267
|
+
const t = C.createElement("me-parent"), n = this.createTopic(e);
|
|
268
|
+
return vt(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
269
269
|
}, Bt = function(e) {
|
|
270
|
-
const t =
|
|
270
|
+
const t = C.createElement("me-children");
|
|
271
271
|
return t.append(...e), t;
|
|
272
272
|
}, zt = function(e) {
|
|
273
|
-
const t =
|
|
273
|
+
const t = C.createElement("me-tpc");
|
|
274
274
|
return t.nodeObj = e, t.dataset.nodeid = "me" + e.id, t.draggable = this.draggable, t;
|
|
275
275
|
};
|
|
276
|
-
function
|
|
277
|
-
const t =
|
|
276
|
+
function bt(e) {
|
|
277
|
+
const t = C.createRange();
|
|
278
278
|
t.selectNodeContents(e);
|
|
279
|
-
const
|
|
280
|
-
|
|
279
|
+
const n = window.getSelection();
|
|
280
|
+
n && (n.removeAllRanges(), n.addRange(t));
|
|
281
281
|
}
|
|
282
282
|
const Vt = function(e) {
|
|
283
283
|
if (console.time("editTopic"), !e)
|
|
284
284
|
return;
|
|
285
|
-
const t =
|
|
286
|
-
e.appendChild(t), t.id = "input-box", t.textContent =
|
|
285
|
+
const t = C.createElement("div"), n = e.childNodes[0].textContent;
|
|
286
|
+
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 === j && (t.style.right = "0"), t.focus(), bt(t), this.bus.fire("operation", {
|
|
287
287
|
name: "beginEdit",
|
|
288
288
|
obj: e.nodeObj
|
|
289
|
-
}), t.addEventListener("keydown", (
|
|
290
|
-
|
|
291
|
-
const s =
|
|
289
|
+
}), t.addEventListener("keydown", (i) => {
|
|
290
|
+
i.stopPropagation();
|
|
291
|
+
const s = i.key;
|
|
292
292
|
if (s === "Enter" || s === "Tab") {
|
|
293
|
-
if (
|
|
293
|
+
if (i.shiftKey)
|
|
294
294
|
return;
|
|
295
|
-
|
|
295
|
+
i.preventDefault(), t == null || t.blur(), this.map.focus();
|
|
296
296
|
}
|
|
297
297
|
}), t.addEventListener("blur", () => {
|
|
298
298
|
var o;
|
|
299
299
|
if (!t)
|
|
300
300
|
return;
|
|
301
|
-
const
|
|
302
|
-
console.log(s), s === "" ?
|
|
301
|
+
const i = e.nodeObj, s = ((o = t.textContent) == null ? void 0 : o.trim()) || "";
|
|
302
|
+
console.log(s), s === "" ? i.topic = n : i.topic = s, t.remove(), s !== n && (e.childNodes[0].textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
303
303
|
name: "finishEdit",
|
|
304
|
-
obj:
|
|
305
|
-
origin:
|
|
304
|
+
obj: i,
|
|
305
|
+
origin: n
|
|
306
306
|
}));
|
|
307
307
|
}), console.timeEnd("editTopic");
|
|
308
308
|
}, Dt = function(e) {
|
|
309
|
-
const t =
|
|
309
|
+
const t = C.createElement("me-epd");
|
|
310
310
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
311
311
|
}, V = document, D = "http://www.w3.org/2000/svg", Rt = function(e, t) {
|
|
312
|
-
const
|
|
313
|
-
return
|
|
312
|
+
const n = V.createElementNS(D, "path");
|
|
313
|
+
return n.setAttribute("d", e), n.setAttribute("stroke", t || "#666"), n.setAttribute("fill", "none"), n.setAttribute("stroke-width", "3"), n;
|
|
314
314
|
}, X = function(e) {
|
|
315
315
|
const t = V.createElementNS(D, "svg");
|
|
316
316
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
317
|
-
},
|
|
317
|
+
}, it = function(e, t, n, i) {
|
|
318
318
|
const s = V.createElementNS(D, "line");
|
|
319
|
-
return s.setAttribute("x1", String(e)), s.setAttribute("y1", String(t)), s.setAttribute("x2", String(
|
|
319
|
+
return s.setAttribute("x1", String(e)), s.setAttribute("y1", String(t)), s.setAttribute("x2", String(n)), s.setAttribute("y2", String(i)), s.setAttribute("stroke", "#bbb"), s.setAttribute("fill", "none"), s.setAttribute("stroke-width", "2"), s;
|
|
320
320
|
}, Ot = function(e, t) {
|
|
321
|
-
const
|
|
322
|
-
return
|
|
323
|
-
},
|
|
324
|
-
const
|
|
325
|
-
return s.setAttribute("d", t), s.setAttribute("stroke", "rgb(235, 95, 82)"), s.setAttribute("fill", "none"), s.setAttribute("stroke-linecap", "cap"), s.setAttribute("stroke-width", "2"),
|
|
321
|
+
const n = V.createElementNS(D, "path");
|
|
322
|
+
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;
|
|
323
|
+
}, jt = function(e, t) {
|
|
324
|
+
const n = V.createElementNS(D, "g"), i = V.createElementNS(D, "path"), s = V.createElementNS(D, "path");
|
|
325
|
+
return s.setAttribute("d", t), s.setAttribute("stroke", "rgb(235, 95, 82)"), s.setAttribute("fill", "none"), s.setAttribute("stroke-linecap", "cap"), s.setAttribute("stroke-width", "2"), i.setAttribute("d", e), i.setAttribute("stroke", "rgb(235, 95, 82)"), i.setAttribute("fill", "none"), i.setAttribute("stroke-linecap", "cap"), i.setAttribute("stroke-width", "2"), n.appendChild(i), n.appendChild(s), n;
|
|
326
326
|
};
|
|
327
|
-
let
|
|
328
|
-
const
|
|
327
|
+
let yt = _t;
|
|
328
|
+
const qt = function(e) {
|
|
329
329
|
console.time("linkDiv");
|
|
330
330
|
const t = this.map.querySelector("me-root");
|
|
331
331
|
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.nodes.style.left = `${1e4 - t.offsetLeft - t.offsetWidth / 2}px`;
|
|
332
|
-
const
|
|
333
|
-
this.lines.innerHTML = "",
|
|
334
|
-
for (let
|
|
335
|
-
const s = i
|
|
336
|
-
let
|
|
332
|
+
const n = this.map.querySelectorAll("me-main > me-wrapper");
|
|
333
|
+
this.lines.innerHTML = "", yt = this.subLinkStyle === 2 ? Yt : _t;
|
|
334
|
+
for (let i = 0; i < n.length; i++) {
|
|
335
|
+
const s = n[i], o = s.querySelector("me-tpc"), l = s.firstChild, r = s.parentNode.className;
|
|
336
|
+
let d = t.offsetLeft + t.offsetWidth / 2;
|
|
337
337
|
const f = t.offsetTop + t.offsetHeight / 2;
|
|
338
|
-
let
|
|
339
|
-
const a = this.theme.palette, c = o.nodeObj.branchColor || a[
|
|
340
|
-
r === "lhs" ?
|
|
338
|
+
let h;
|
|
339
|
+
const a = this.theme.palette, c = o.nodeObj.branchColor || a[i % a.length], { offsetLeft: u, offsetTop: g } = gt(this.nodes, l);
|
|
340
|
+
r === "lhs" ? h = u + l.offsetWidth : h = u;
|
|
341
341
|
const m = g + l.offsetHeight / 2;
|
|
342
342
|
let p = "";
|
|
343
343
|
if (this.mainLinkStyle === 2)
|
|
344
|
-
this.direction ===
|
|
344
|
+
this.direction === I && (r === "lhs" ? d = d - t.offsetWidth / 6 : d = d + t.offsetWidth / 6), p = Xt({ x1: d, y1: f, x2: h, y2: m });
|
|
345
345
|
else {
|
|
346
346
|
const x = (1 - Math.abs(m - s.parentElement.offsetTop - s.parentElement.offsetHeight / 2) / s.parentElement.offsetHeight) * 0.25 * (t.offsetWidth / 2);
|
|
347
|
-
r === "lhs" ?
|
|
347
|
+
r === "lhs" ? d = d - t.offsetWidth / 10 - x : d = d + t.offsetWidth / 10 + x, p = Wt({ x1: d, y1: f, x2: h, y2: m });
|
|
348
348
|
}
|
|
349
349
|
this.lines.appendChild(Rt(p, c));
|
|
350
350
|
const v = s.children[0].children[1];
|
|
351
351
|
if (v && (v.style.top = (v.parentNode.offsetHeight - v.offsetHeight) / 2 + "px", r === "lhs" ? v.style.left = "-10px" : v.style.right = "-10px"), !(e && e !== s) && s.childElementCount) {
|
|
352
352
|
const y = X("subLines"), x = s.lastChild;
|
|
353
353
|
x.tagName === "svg" && x.remove(), s.appendChild(y);
|
|
354
|
-
const _ = s.firstChild,
|
|
355
|
-
y.appendChild(Ot(
|
|
354
|
+
const _ = s.firstChild, E = s.children[1].children, T = xt(E, _, r, !0);
|
|
355
|
+
y.appendChild(Ot(T, c));
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
this.linkSvgGroup.innerHTML = "";
|
|
359
|
-
for (const
|
|
360
|
-
const s = this.linkData[
|
|
361
|
-
this.createLink(
|
|
359
|
+
for (const i in this.linkData) {
|
|
360
|
+
const s = this.linkData[i];
|
|
361
|
+
this.createLink(L(s.from), L(s.to), !0, s);
|
|
362
362
|
}
|
|
363
363
|
this.renderSummary(), console.timeEnd("linkDiv");
|
|
364
|
-
},
|
|
364
|
+
}, xt = function(e, t, n, i) {
|
|
365
365
|
let s = "";
|
|
366
|
-
const o = t.offsetTop, l = t.offsetLeft, r = t.offsetWidth,
|
|
366
|
+
const o = t.offsetTop, l = t.offsetLeft, r = t.offsetWidth, d = t.offsetHeight;
|
|
367
367
|
for (let f = 0; f < e.length; f++) {
|
|
368
|
-
const
|
|
369
|
-
s +=
|
|
368
|
+
const h = e[f], a = h.firstChild, c = a.offsetTop, u = a.offsetLeft, g = a.offsetWidth, m = a.offsetHeight;
|
|
369
|
+
s += yt({ pT: o, pL: l, pW: r, pH: d, cT: c, cL: u, cW: g, cH: m, direction: n, isFirst: i });
|
|
370
370
|
const p = a.children[1];
|
|
371
371
|
if (p) {
|
|
372
|
-
if (p.style.bottom = -(p.offsetHeight / 2) + "px",
|
|
372
|
+
if (p.style.bottom = -(p.offsetHeight / 2) + "px", n === "lhs" ? p.style.left = "10px" : n === "rhs" && (p.style.right = "10px"), !p.expanded)
|
|
373
373
|
continue;
|
|
374
374
|
} else
|
|
375
375
|
continue;
|
|
376
|
-
const v =
|
|
377
|
-
v.length > 0 && (s +=
|
|
376
|
+
const v = h.children[1].children;
|
|
377
|
+
v.length > 0 && (s += xt(v, a, n));
|
|
378
378
|
}
|
|
379
379
|
return s;
|
|
380
380
|
};
|
|
381
|
-
function Xt({ x1: e, y1: t, x2:
|
|
382
|
-
return `M ${e} ${t} V ${
|
|
381
|
+
function Xt({ x1: e, y1: t, x2: n, y2: i }) {
|
|
382
|
+
return `M ${e} ${t} V ${i > t ? i - 20 : i + 20} C ${e} ${i} ${e} ${i} ${n > e ? e + 20 : e - 20} ${i} H ${n}`;
|
|
383
383
|
}
|
|
384
|
-
function Wt({ x1: e, y1: t, x2:
|
|
385
|
-
return `M ${e} ${t} Q ${e} ${
|
|
384
|
+
function Wt({ x1: e, y1: t, x2: n, y2: i }) {
|
|
385
|
+
return `M ${e} ${t} Q ${e} ${i} ${n} ${i}`;
|
|
386
386
|
}
|
|
387
|
-
function Yt({ pT: e, pL: t, pW:
|
|
388
|
-
let
|
|
389
|
-
f ?
|
|
387
|
+
function Yt({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: l, cH: r, direction: d, isFirst: f }) {
|
|
388
|
+
let h;
|
|
389
|
+
f ? h = e + i / 2 : h = e + i;
|
|
390
390
|
const a = s + r;
|
|
391
391
|
let c = 0, u = 0, g = 0;
|
|
392
|
-
return
|
|
392
|
+
return d === "lhs" ? (c = t + $, u = o, g = o + l) : d === "rhs" && (c = t + n - $, u = o + l, g = o), a < h + 50 && a > h - 50 ? `M ${c} ${h} H ${g} V ${a} H ${u}` : a >= h ? `M ${c} ${h} H ${g} V ${a - M} A ${M} ${M} 0 0 ${c > u ? 1 : 0} ${c > u ? g - M : g + M} ${a} H ${u}` : `M ${c} ${h} H ${g} V ${a + M} A ${M} ${M} 0 0 ${c > u ? 0 : 1} ${c > u ? g - M : g + M} ${a} H ${u}`;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
let
|
|
396
|
-
f ?
|
|
394
|
+
function _t({ pT: e, pL: t, pW: n, pH: i, cT: s, cL: o, cW: l, cH: r, direction: d, isFirst: f }) {
|
|
395
|
+
let h = 0, a = 0;
|
|
396
|
+
f ? h = e + i / 2 : h = e + i;
|
|
397
397
|
const c = s + r;
|
|
398
398
|
let u = 0, g = 0, m = 0;
|
|
399
|
-
const p = Math.min(Math.abs(
|
|
400
|
-
return
|
|
399
|
+
const p = Math.min(Math.abs(h - c) / 800, 1.2) * $;
|
|
400
|
+
return d === "lhs" ? (m = t, u = m + $, g = m - $, a = o + $, `M ${u} ${h} C ${m} ${h} ${m + p} ${c} ${g} ${c} H ${a}`) : (m = t + n, u = m - $, g = m + $, a = o + l - $, `M ${u} ${h} C ${m} ${h} ${m - p} ${c} ${g} ${c} H ${a}`);
|
|
401
401
|
}
|
|
402
402
|
const z = (e, t) => {
|
|
403
|
-
const
|
|
404
|
-
return
|
|
403
|
+
const n = document.createElement("span");
|
|
404
|
+
return n.id = e, n.innerHTML = `<svg class="icon" aria-hidden="true">
|
|
405
405
|
<use xlink:href="#icon-${t}"></use>
|
|
406
|
-
</svg>`,
|
|
406
|
+
</svg>`, n;
|
|
407
407
|
};
|
|
408
408
|
function Ft(e) {
|
|
409
|
-
const t = document.createElement("div"),
|
|
410
|
-
return l.innerText = "100%", t.appendChild(
|
|
409
|
+
const t = document.createElement("div"), n = z("fullscreen", "full"), i = z("toCenter", "living"), s = z("zoomout", "move"), o = z("zoomin", "add"), l = document.createElement("span");
|
|
410
|
+
return l.innerText = "100%", t.appendChild(n), t.appendChild(i), t.appendChild(s), t.appendChild(o), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
411
411
|
e.container.requestFullscreen();
|
|
412
|
-
},
|
|
412
|
+
}, i.onclick = () => {
|
|
413
413
|
e.toCenter();
|
|
414
414
|
}, s.onclick = () => {
|
|
415
415
|
e.scaleVal < 0.6 || e.scale(e.scaleVal -= 0.2);
|
|
@@ -418,10 +418,10 @@ function Ft(e) {
|
|
|
418
418
|
}, t;
|
|
419
419
|
}
|
|
420
420
|
function It(e) {
|
|
421
|
-
const t = document.createElement("div"),
|
|
422
|
-
return t.appendChild(
|
|
421
|
+
const t = document.createElement("div"), n = z("tbltl", "left"), i = z("tbltr", "right"), s = z("tblts", "side");
|
|
422
|
+
return t.appendChild(n), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
423
423
|
e.initLeft();
|
|
424
|
-
},
|
|
424
|
+
}, i.onclick = () => {
|
|
425
425
|
e.initRight();
|
|
426
426
|
}, s.onclick = () => {
|
|
427
427
|
e.initSide();
|
|
@@ -431,56 +431,56 @@ function Gt(e) {
|
|
|
431
431
|
e.container.append(Ft(e)), e.container.append(It(e));
|
|
432
432
|
}
|
|
433
433
|
/*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
|
|
434
|
-
var Kt = Object.defineProperty, Jt = (e, t,
|
|
434
|
+
var Kt = Object.defineProperty, Jt = (e, t, n) => t in e ? Kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t, n) => (Jt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
435
435
|
class Ut {
|
|
436
436
|
constructor() {
|
|
437
437
|
b(this, "_listeners", /* @__PURE__ */ new Map()), b(this, "on", this.addEventListener), b(this, "off", this.removeEventListener), b(this, "emit", this.dispatchEvent);
|
|
438
438
|
}
|
|
439
|
-
addEventListener(t,
|
|
440
|
-
const
|
|
441
|
-
return this._listeners.set(t,
|
|
439
|
+
addEventListener(t, n) {
|
|
440
|
+
const i = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
441
|
+
return this._listeners.set(t, i), i.add(n), this;
|
|
442
442
|
}
|
|
443
|
-
removeEventListener(t,
|
|
444
|
-
var
|
|
445
|
-
return (
|
|
443
|
+
removeEventListener(t, n) {
|
|
444
|
+
var i;
|
|
445
|
+
return (i = this._listeners.get(t)) == null || i.delete(n), this;
|
|
446
446
|
}
|
|
447
|
-
dispatchEvent(t, ...
|
|
448
|
-
let
|
|
447
|
+
dispatchEvent(t, ...n) {
|
|
448
|
+
let i = !0;
|
|
449
449
|
for (const s of this._listeners.get(t) ?? [])
|
|
450
|
-
|
|
451
|
-
return
|
|
450
|
+
i = s(...n) !== !1 && i;
|
|
451
|
+
return i;
|
|
452
452
|
}
|
|
453
453
|
unbindAllListeners() {
|
|
454
454
|
this._listeners.clear();
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
const
|
|
458
|
-
function
|
|
457
|
+
const st = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
458
|
+
function A({ style: e }, t, n) {
|
|
459
459
|
if (typeof t == "object")
|
|
460
|
-
for (const [
|
|
461
|
-
s !== void 0 && (e[
|
|
460
|
+
for (const [i, s] of Object.entries(t))
|
|
461
|
+
s !== void 0 && (e[i] = st(s));
|
|
462
462
|
else
|
|
463
|
-
|
|
463
|
+
n !== void 0 && (e[t] = st(n));
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return (t,
|
|
467
|
-
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(
|
|
465
|
+
function Et(e) {
|
|
466
|
+
return (t, n, i, s = {}) => {
|
|
467
|
+
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
468
468
|
for (const o of t)
|
|
469
|
-
for (const l of
|
|
470
|
-
o[e](l,
|
|
471
|
-
return [t,
|
|
469
|
+
for (const l of n)
|
|
470
|
+
o[e](l, i, { capture: !1, ...s });
|
|
471
|
+
return [t, n, i, s];
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
const R =
|
|
474
|
+
const R = Et("addEventListener"), H = Et("removeEventListener"), Y = (e) => {
|
|
475
475
|
var t;
|
|
476
|
-
const { clientX:
|
|
477
|
-
return { x:
|
|
476
|
+
const { clientX: n, clientY: i, target: s } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
477
|
+
return { x: n, y: i, target: s };
|
|
478
478
|
};
|
|
479
|
-
function
|
|
480
|
-
switch (
|
|
479
|
+
function ot(e, t, n = "touch") {
|
|
480
|
+
switch (n) {
|
|
481
481
|
case "center": {
|
|
482
|
-
const
|
|
483
|
-
return
|
|
482
|
+
const i = t.left + t.width / 2, s = t.top + t.height / 2;
|
|
483
|
+
return i >= e.left && i <= e.right && s >= e.top && s <= e.bottom;
|
|
484
484
|
}
|
|
485
485
|
case "cover":
|
|
486
486
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
@@ -489,30 +489,30 @@ function lt(e, t, i = "touch") {
|
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
function O(e, t = document) {
|
|
492
|
-
const
|
|
493
|
-
let
|
|
494
|
-
for (let s = 0, o =
|
|
495
|
-
const l =
|
|
496
|
-
typeof l == "string" ?
|
|
492
|
+
const n = Array.isArray(e) ? e : [e];
|
|
493
|
+
let i = [];
|
|
494
|
+
for (let s = 0, o = n.length; s < o; s++) {
|
|
495
|
+
const l = n[s];
|
|
496
|
+
typeof l == "string" ? i = i.concat(Array.from(t.querySelectorAll(l))) : l instanceof Element && i.push(l);
|
|
497
497
|
}
|
|
498
|
-
return
|
|
498
|
+
return i;
|
|
499
499
|
}
|
|
500
500
|
const Qt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Zt = () => "safari" in window, te = (e) => {
|
|
501
|
-
let t,
|
|
501
|
+
let t, n = -1, i = !1;
|
|
502
502
|
return {
|
|
503
503
|
next(...s) {
|
|
504
|
-
t = s,
|
|
505
|
-
e(...t),
|
|
504
|
+
t = s, i || (i = !0, n = requestAnimationFrame(() => {
|
|
505
|
+
e(...t), i = !1;
|
|
506
506
|
}));
|
|
507
507
|
},
|
|
508
508
|
cancel() {
|
|
509
|
-
cancelAnimationFrame(
|
|
509
|
+
cancelAnimationFrame(n), i = !1;
|
|
510
510
|
}
|
|
511
511
|
};
|
|
512
|
-
}, { abs: B, max:
|
|
513
|
-
class
|
|
512
|
+
}, { abs: B, max: lt, min: rt, ceil: ct } = Math;
|
|
513
|
+
class Ct extends Ut {
|
|
514
514
|
constructor(t) {
|
|
515
|
-
var
|
|
515
|
+
var n, i, s, o, l;
|
|
516
516
|
super(), b(this, "_options"), b(this, "_selection", {
|
|
517
517
|
stored: [],
|
|
518
518
|
selected: [],
|
|
@@ -536,11 +536,11 @@ class wt extends Ut {
|
|
|
536
536
|
overlap: "invert",
|
|
537
537
|
intersect: "touch",
|
|
538
538
|
...t.behaviour,
|
|
539
|
-
startThreshold: (
|
|
539
|
+
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 },
|
|
540
540
|
scrolling: {
|
|
541
541
|
speedDivider: 10,
|
|
542
542
|
manualSpeed: 750,
|
|
543
|
-
...(
|
|
543
|
+
...(i = t.behaviour) == null ? void 0 : i.scrolling,
|
|
544
544
|
startScrollMargins: {
|
|
545
545
|
x: 0,
|
|
546
546
|
y: 0,
|
|
@@ -559,54 +559,54 @@ class wt extends Ut {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
|
-
for (const
|
|
563
|
-
typeof this[
|
|
564
|
-
const { document: r, selectionAreaClass:
|
|
565
|
-
this._area = r.createElement("div"), this._clippingElement = r.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(
|
|
562
|
+
for (const h of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))
|
|
563
|
+
typeof this[h] == "function" && (this[h] = this[h].bind(this));
|
|
564
|
+
const { document: r, selectionAreaClass: d, selectionContainerClass: f } = this._options;
|
|
565
|
+
this._area = r.createElement("div"), this._clippingElement = r.createElement("div"), this._clippingElement.appendChild(this._area), this._area.classList.add(d), f && this._clippingElement.classList.add(f), A(this._area, {
|
|
566
566
|
willChange: "top, left, bottom, right, width, height",
|
|
567
567
|
top: 0,
|
|
568
568
|
left: 0,
|
|
569
569
|
position: "fixed"
|
|
570
|
-
}),
|
|
570
|
+
}), A(this._clippingElement, {
|
|
571
571
|
overflow: "hidden",
|
|
572
572
|
position: "fixed",
|
|
573
573
|
transform: "translate3d(0, 0, 0)",
|
|
574
574
|
// https://stackoverflow.com/a/38268846
|
|
575
575
|
pointerEvents: "none",
|
|
576
576
|
zIndex: "1"
|
|
577
|
-
}), this._frame = te((
|
|
578
|
-
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move",
|
|
577
|
+
}), this._frame = te((h) => {
|
|
578
|
+
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", h), this._redrawSelectionArea();
|
|
579
579
|
}), this.enable();
|
|
580
580
|
}
|
|
581
581
|
_bindStartEvents(t = !0) {
|
|
582
|
-
const { document:
|
|
583
|
-
s(
|
|
582
|
+
const { document: n, features: i } = this._options, s = t ? R : H;
|
|
583
|
+
s(n, "mousedown", this._onTapStart), i.touch && s(n, "touchstart", this._onTapStart, {
|
|
584
584
|
passive: !1
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
_onTapStart(t,
|
|
588
|
-
const { x:
|
|
589
|
-
this._targetElement =
|
|
590
|
-
(u) =>
|
|
587
|
+
_onTapStart(t, n = !1) {
|
|
588
|
+
const { x: i, y: s, target: o } = Y(t), { _options: l } = this, { document: r } = this._options, d = o.getBoundingClientRect(), f = O(l.startAreas, l.document), h = O(l.boundaries, l.document);
|
|
589
|
+
this._targetElement = h.find(
|
|
590
|
+
(u) => ot(u.getBoundingClientRect(), d)
|
|
591
591
|
);
|
|
592
592
|
const a = t.composedPath();
|
|
593
|
-
if (!this._targetElement || !f.find((u) => a.includes(u)) || !
|
|
593
|
+
if (!this._targetElement || !f.find((u) => a.includes(u)) || !h.find((u) => a.includes(u)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
594
594
|
return;
|
|
595
|
-
this._areaLocation = { x1:
|
|
595
|
+
this._areaLocation = { x1: i, y1: s, x2: 0, y2: 0 };
|
|
596
596
|
const c = r.scrollingElement ?? r.body;
|
|
597
597
|
this._scrollDelta = { x: c.scrollLeft, y: c.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), R(r, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), R(r, ["mouseup", "touchcancel", "touchend"], this._onTapStop), R(r, "scroll", this._onScroll);
|
|
598
598
|
}
|
|
599
599
|
_onSingleTap(t) {
|
|
600
|
-
const { singleTap: { intersect:
|
|
600
|
+
const { singleTap: { intersect: n }, range: i } = this._options.features, s = Y(t);
|
|
601
601
|
let o;
|
|
602
|
-
if (
|
|
602
|
+
if (n === "native")
|
|
603
603
|
o = s.target;
|
|
604
|
-
else if (
|
|
604
|
+
else if (n === "touch") {
|
|
605
605
|
this.resolveSelectables();
|
|
606
|
-
const { x: r, y:
|
|
606
|
+
const { x: r, y: d } = s;
|
|
607
607
|
o = this._selectables.find((f) => {
|
|
608
|
-
const { right:
|
|
609
|
-
return r <
|
|
608
|
+
const { right: h, left: a, top: c, bottom: u } = f.getBoundingClientRect();
|
|
609
|
+
return r < h && r > a && d < u && d > c;
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
612
|
if (!o)
|
|
@@ -617,104 +617,104 @@ class wt extends Ut {
|
|
|
617
617
|
o = o.parentElement;
|
|
618
618
|
}
|
|
619
619
|
const { stored: l } = this._selection;
|
|
620
|
-
if (this._emitEvent("start", t), t.shiftKey &&
|
|
621
|
-
const r = this._latestElement, [
|
|
622
|
-
(a) => a.compareDocumentPosition(
|
|
623
|
-
),
|
|
624
|
-
this.select(
|
|
620
|
+
if (this._emitEvent("start", t), t.shiftKey && i && this._latestElement) {
|
|
621
|
+
const r = this._latestElement, [d, f] = r.compareDocumentPosition(o) & 4 ? [o, r] : [r, o], h = [...this._selectables.filter(
|
|
622
|
+
(a) => a.compareDocumentPosition(d) & 4 && a.compareDocumentPosition(f) & 2
|
|
623
|
+
), d, f];
|
|
624
|
+
this.select(h), this._latestElement = r;
|
|
625
625
|
} else
|
|
626
626
|
l.includes(o) && (l.length === 1 || t.ctrlKey || l.every((r) => this._selection.stored.includes(r))) ? this.deselect(o) : (this.select(o), this._latestElement = o);
|
|
627
627
|
this._emitEvent("stop", t);
|
|
628
628
|
}
|
|
629
629
|
_delayedTapMove(t) {
|
|
630
|
-
const { container:
|
|
630
|
+
const { container: n, document: i, behaviour: { startThreshold: s } } = this._options, { x1: o, y1: l } = this._areaLocation, { x: r, y: d } = Y(t);
|
|
631
631
|
if (
|
|
632
632
|
// Single number for both coordinates
|
|
633
|
-
typeof s == "number" && B(r +
|
|
634
|
-
typeof s == "object" && B(r - o) >= s.x || B(
|
|
633
|
+
typeof s == "number" && B(r + d - (o + l)) >= s || // Different x and y threshold
|
|
634
|
+
typeof s == "object" && B(r - o) >= s.x || B(d - l) >= s.y
|
|
635
635
|
) {
|
|
636
|
-
if (
|
|
637
|
-
|
|
636
|
+
if (H(i, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
637
|
+
H(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
R(
|
|
640
|
+
R(i, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), A(this._area, "display", "block"), O(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 && (R(i, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((f) => this._targetElement.contains(f))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
641
641
|
}
|
|
642
642
|
this._handleMoveEvent(t);
|
|
643
643
|
}
|
|
644
644
|
_setupSelectionArea() {
|
|
645
|
-
const { _clippingElement: t, _targetElement:
|
|
646
|
-
this._scrollAvailable ? (
|
|
645
|
+
const { _clippingElement: t, _targetElement: n, _area: i } = this, s = this._targetRect = n.getBoundingClientRect();
|
|
646
|
+
this._scrollAvailable ? (A(t, {
|
|
647
647
|
top: s.top,
|
|
648
648
|
left: s.left,
|
|
649
649
|
width: s.width,
|
|
650
650
|
height: s.height
|
|
651
|
-
}),
|
|
651
|
+
}), A(i, {
|
|
652
652
|
marginTop: -s.top,
|
|
653
653
|
marginLeft: -s.left
|
|
654
|
-
})) : (
|
|
654
|
+
})) : (A(t, {
|
|
655
655
|
top: 0,
|
|
656
656
|
left: 0,
|
|
657
657
|
width: "100%",
|
|
658
658
|
height: "100%"
|
|
659
|
-
}),
|
|
659
|
+
}), A(i, {
|
|
660
660
|
marginTop: 0,
|
|
661
661
|
marginLeft: 0
|
|
662
662
|
}));
|
|
663
663
|
}
|
|
664
664
|
_onTapMove(t) {
|
|
665
|
-
const { x:
|
|
666
|
-
if (o.x2 =
|
|
665
|
+
const { x: n, y: i } = Y(t), { _scrollSpeed: s, _areaLocation: o, _options: l, _frame: r } = this, { speedDivider: d } = l.behaviour.scrolling, f = this._targetElement;
|
|
666
|
+
if (o.x2 = n, o.y2 = i, this._scrollAvailable && !this._scrollingActive && (s.y || s.x)) {
|
|
667
667
|
this._scrollingActive = !0;
|
|
668
|
-
const
|
|
668
|
+
const h = () => {
|
|
669
669
|
if (!s.x && !s.y) {
|
|
670
670
|
this._scrollingActive = !1;
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
673
|
const { scrollTop: a, scrollLeft: c } = f;
|
|
674
|
-
s.y && (f.scrollTop +=
|
|
674
|
+
s.y && (f.scrollTop += ct(s.y / d), o.y1 -= f.scrollTop - a), s.x && (f.scrollLeft += ct(s.x / d), o.x1 -= f.scrollLeft - c), r.next(t), requestAnimationFrame(h);
|
|
675
675
|
};
|
|
676
|
-
requestAnimationFrame(
|
|
676
|
+
requestAnimationFrame(h);
|
|
677
677
|
} else
|
|
678
678
|
r.next(t);
|
|
679
679
|
this._handleMoveEvent(t);
|
|
680
680
|
}
|
|
681
681
|
_handleMoveEvent(t) {
|
|
682
|
-
const { features:
|
|
683
|
-
(
|
|
682
|
+
const { features: n } = this._options;
|
|
683
|
+
(n.touch && Qt() || this._scrollAvailable && Zt()) && t.preventDefault();
|
|
684
684
|
}
|
|
685
685
|
_onScroll() {
|
|
686
|
-
const { _scrollDelta: t, _options: { document:
|
|
687
|
-
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y -
|
|
686
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: i, scrollLeft: s } = n.scrollingElement ?? n.body;
|
|
687
|
+
this._areaLocation.x1 += t.x - s, this._areaLocation.y1 += t.y - i, t.x = s, t.y = i, this._setupSelectionArea(), this._frame.next(null);
|
|
688
688
|
}
|
|
689
689
|
_manualScroll(t) {
|
|
690
|
-
const { manualSpeed:
|
|
691
|
-
this._scrollSpeed.y +=
|
|
690
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, i = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, s = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
691
|
+
this._scrollSpeed.y += i * n, this._scrollSpeed.x += s * n, this._onTapMove(t), t.preventDefault();
|
|
692
692
|
}
|
|
693
693
|
_recalculateSelectionAreaRect() {
|
|
694
|
-
const { _scrollSpeed: t, _areaLocation:
|
|
695
|
-
let { x2: m, y2: p } =
|
|
694
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: i, _targetElement: s, _options: o } = this, { scrollTop: l, scrollHeight: r, clientHeight: d, scrollLeft: f, scrollWidth: h, clientWidth: a } = s, c = this._targetRect, { x1: u, y1: g } = n;
|
|
695
|
+
let { x2: m, y2: p } = n;
|
|
696
696
|
const { behaviour: { scrolling: { startScrollMargins: v } } } = o;
|
|
697
|
-
m < c.left + v.x ? (t.x = f ? -B(c.left - m + v.x) : 0, m = m < c.left ? c.left : m) : m > c.right - v.x ? (t.x =
|
|
698
|
-
const y =
|
|
699
|
-
|
|
697
|
+
m < c.left + v.x ? (t.x = f ? -B(c.left - m + v.x) : 0, m = m < c.left ? c.left : m) : m > c.right - v.x ? (t.x = h - f - a ? B(c.left + c.width - m - v.x) : 0, m = m > c.right ? c.right : m) : t.x = 0, p < c.top + v.y ? (t.y = l ? -B(c.top - p + v.y) : 0, p = p < c.top ? c.top : p) : p > c.bottom - v.y ? (t.y = r - l - d ? B(c.top + c.height - p - v.y) : 0, p = p > c.bottom ? c.bottom : p) : t.y = 0;
|
|
698
|
+
const y = rt(u, m), x = rt(g, p), _ = lt(u, m), E = lt(g, p);
|
|
699
|
+
i.x = y, i.y = x, i.width = _ - y, i.height = E - x;
|
|
700
700
|
}
|
|
701
701
|
_redrawSelectionArea() {
|
|
702
|
-
const { x: t, y:
|
|
703
|
-
o.left = `${t}px`, o.top = `${
|
|
702
|
+
const { x: t, y: n, width: i, height: s } = this._areaRect, { style: o } = this._area;
|
|
703
|
+
o.left = `${t}px`, o.top = `${n}px`, o.width = `${i}px`, o.height = `${s}px`;
|
|
704
704
|
}
|
|
705
|
-
_onTapStop(t,
|
|
706
|
-
var
|
|
705
|
+
_onTapStop(t, n) {
|
|
706
|
+
var i;
|
|
707
707
|
const { document: s, features: o } = this._options, { _singleClick: l } = this;
|
|
708
|
-
|
|
708
|
+
H(s, ["mousemove", "touchmove"], this._delayedTapMove), H(s, ["touchmove", "mousemove"], this._onTapMove), H(s, ["mouseup", "touchcancel", "touchend"], this._onTapStop), H(s, "scroll", this._onScroll), this._keepSelection(), t && l && o.singleTap.allow ? this._onSingleTap(t) : !l && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, this._scrollAvailable && H(s, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (i = this._frame) == null || i.cancel(), A(this._area, "display", "none");
|
|
709
709
|
}
|
|
710
710
|
_updateElementSelection() {
|
|
711
|
-
const { _selectables: t, _options:
|
|
711
|
+
const { _selectables: t, _options: n, _selection: i, _areaRect: s } = this, { stored: o, selected: l, touched: r } = i, { intersect: d, overlap: f } = n.behaviour, h = f === "invert", a = [], c = [], u = [];
|
|
712
712
|
for (let m = 0; m < t.length; m++) {
|
|
713
713
|
const p = t[m];
|
|
714
|
-
if (
|
|
714
|
+
if (ot(s, p.getBoundingClientRect(), d)) {
|
|
715
715
|
if (l.includes(p))
|
|
716
716
|
o.includes(p) && !r.includes(p) && r.push(p);
|
|
717
|
-
else if (
|
|
717
|
+
else if (h && o.includes(p)) {
|
|
718
718
|
u.push(p);
|
|
719
719
|
continue;
|
|
720
720
|
} else
|
|
@@ -722,7 +722,7 @@ class wt extends Ut {
|
|
|
722
722
|
a.push(p);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
|
|
725
|
+
h && c.push(...o.filter((m) => !l.includes(m)));
|
|
726
726
|
const g = f === "keep";
|
|
727
727
|
for (let m = 0; m < l.length; m++) {
|
|
728
728
|
const p = l[m];
|
|
@@ -730,38 +730,38 @@ class wt extends Ut {
|
|
|
730
730
|
// not make them part of the current selection as soon as they're touched.
|
|
731
731
|
(g && o.includes(p)) && u.push(p);
|
|
732
732
|
}
|
|
733
|
-
|
|
733
|
+
i.selected = a, i.changed = { added: c, removed: u }, this._latestElement = void 0;
|
|
734
734
|
}
|
|
735
|
-
_emitEvent(t,
|
|
735
|
+
_emitEvent(t, n) {
|
|
736
736
|
return this.emit(t, {
|
|
737
|
-
event:
|
|
737
|
+
event: n,
|
|
738
738
|
store: this._selection,
|
|
739
739
|
selection: this
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
742
|
_keepSelection() {
|
|
743
|
-
const { _options: t, _selection:
|
|
743
|
+
const { _options: t, _selection: n } = this, { selected: i, changed: s, touched: o, stored: l } = n, r = i.filter((d) => !l.includes(d));
|
|
744
744
|
switch (t.behaviour.overlap) {
|
|
745
745
|
case "drop": {
|
|
746
|
-
|
|
746
|
+
n.stored = [
|
|
747
747
|
...r,
|
|
748
|
-
...l.filter((
|
|
748
|
+
...l.filter((d) => !o.includes(d))
|
|
749
749
|
// Elements not touched
|
|
750
750
|
];
|
|
751
751
|
break;
|
|
752
752
|
}
|
|
753
753
|
case "invert": {
|
|
754
|
-
|
|
754
|
+
n.stored = [
|
|
755
755
|
...r,
|
|
756
|
-
...l.filter((
|
|
756
|
+
...l.filter((d) => !s.removed.includes(d))
|
|
757
757
|
// Elements not removed from selection
|
|
758
758
|
];
|
|
759
759
|
break;
|
|
760
760
|
}
|
|
761
761
|
case "keep": {
|
|
762
|
-
|
|
762
|
+
n.stored = [
|
|
763
763
|
...l,
|
|
764
|
-
...
|
|
764
|
+
...i.filter((d) => !l.includes(d))
|
|
765
765
|
// Newly added
|
|
766
766
|
];
|
|
767
767
|
break;
|
|
@@ -773,8 +773,8 @@ class wt extends Ut {
|
|
|
773
773
|
* @param evt A MouseEvent / TouchEvent -like object
|
|
774
774
|
* @param silent If beforestart should be fired,
|
|
775
775
|
*/
|
|
776
|
-
trigger(t,
|
|
777
|
-
this._onTapStart(t,
|
|
776
|
+
trigger(t, n = !0) {
|
|
777
|
+
this._onTapStart(t, n);
|
|
778
778
|
}
|
|
779
779
|
/**
|
|
780
780
|
* Can be used if during a selection elements have been added.
|
|
@@ -788,12 +788,12 @@ class wt extends Ut {
|
|
|
788
788
|
* @param includeStored If the store should also get cleared
|
|
789
789
|
* @param quiet If move / stop events should be fired
|
|
790
790
|
*/
|
|
791
|
-
clearSelection(t = !0,
|
|
792
|
-
const { selected:
|
|
791
|
+
clearSelection(t = !0, n = !1) {
|
|
792
|
+
const { selected: i, stored: s, changed: o } = this._selection;
|
|
793
793
|
o.added = [], o.removed.push(
|
|
794
|
-
...
|
|
794
|
+
...i,
|
|
795
795
|
...t ? s : []
|
|
796
|
-
),
|
|
796
|
+
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
797
797
|
stored: t ? [] : s,
|
|
798
798
|
selected: [],
|
|
799
799
|
touched: [],
|
|
@@ -830,31 +830,31 @@ class wt extends Ut {
|
|
|
830
830
|
* @param query - CSS Query, can be an array of queries
|
|
831
831
|
* @param quiet - If this should not trigger the move event
|
|
832
832
|
*/
|
|
833
|
-
select(t,
|
|
834
|
-
const { changed:
|
|
833
|
+
select(t, n = !1) {
|
|
834
|
+
const { changed: i, selected: s, stored: o } = this._selection, l = O(t, this._options.document).filter(
|
|
835
835
|
(r) => !s.includes(r) && !o.includes(r)
|
|
836
836
|
);
|
|
837
|
-
return o.push(...l), s.push(...l),
|
|
837
|
+
return o.push(...l), s.push(...l), i.added.push(...l), i.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), l;
|
|
838
838
|
}
|
|
839
839
|
/**
|
|
840
840
|
* Removes a particular element from the selection.
|
|
841
841
|
* @param query - CSS Query, can be an array of queries
|
|
842
842
|
* @param quiet - If this should not trigger the move event
|
|
843
843
|
*/
|
|
844
|
-
deselect(t,
|
|
845
|
-
const { selected:
|
|
846
|
-
(r) =>
|
|
844
|
+
deselect(t, n = !1) {
|
|
845
|
+
const { selected: i, stored: s, changed: o } = this._selection, l = O(t, this._options.document).filter(
|
|
846
|
+
(r) => i.includes(r) || s.includes(r)
|
|
847
847
|
);
|
|
848
|
-
l.length && (this._selection.stored = s.filter((r) => !l.includes(r)), this._selection.selected =
|
|
848
|
+
l.length && (this._selection.stored = s.filter((r) => !l.includes(r)), this._selection.selected = i.filter((r) => !l.includes(r)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
849
849
|
...l.filter((r) => !o.removed.includes(r))
|
|
850
|
-
), this._latestElement = void 0,
|
|
850
|
+
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
b(
|
|
853
|
+
b(Ct, "version", "3.3.1");
|
|
854
854
|
function ee(e) {
|
|
855
|
-
const t = new
|
|
856
|
-
selectables: ["
|
|
857
|
-
boundaries: ["
|
|
855
|
+
const t = new Ct({
|
|
856
|
+
selectables: [".map-container me-tpc"],
|
|
857
|
+
boundaries: [".map-container"],
|
|
858
858
|
container: ".map-container",
|
|
859
859
|
behaviour: {
|
|
860
860
|
// Scroll configuration.
|
|
@@ -871,36 +871,36 @@ function ee(e) {
|
|
|
871
871
|
startScrollMargins: { x: 10, y: 10 }
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
}).on("beforestart", ({ event:
|
|
875
|
-
!
|
|
874
|
+
}).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box")).on("start", ({ event: n }) => {
|
|
875
|
+
!n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
|
|
876
876
|
}).on(
|
|
877
877
|
"move",
|
|
878
878
|
({
|
|
879
879
|
store: {
|
|
880
|
-
changed: { added:
|
|
880
|
+
changed: { added: n, removed: i }
|
|
881
881
|
}
|
|
882
882
|
}) => {
|
|
883
|
-
|
|
884
|
-
for (const s of i)
|
|
885
|
-
s.classList.add("selected");
|
|
883
|
+
P.moved = !0;
|
|
886
884
|
for (const s of n)
|
|
885
|
+
s.classList.add("selected");
|
|
886
|
+
for (const s of i)
|
|
887
887
|
s.classList.remove("selected");
|
|
888
888
|
}
|
|
889
|
-
).on("stop", ({ store: { stored:
|
|
890
|
-
console.log(
|
|
889
|
+
).on("stop", ({ store: { stored: n } }) => {
|
|
890
|
+
console.log(n, "stored"), e.selectNodes(n);
|
|
891
891
|
});
|
|
892
892
|
console.log(t, "selection");
|
|
893
893
|
}
|
|
894
|
-
const
|
|
894
|
+
const ne = function(e, t = !0) {
|
|
895
895
|
this.theme = e;
|
|
896
|
-
const
|
|
897
|
-
for (let s = 0; s <
|
|
898
|
-
const o =
|
|
899
|
-
this.mindElixirBox.style.setProperty(o,
|
|
896
|
+
const n = this.theme.cssVar, i = Object.keys(n);
|
|
897
|
+
for (let s = 0; s < i.length; s++) {
|
|
898
|
+
const o = i[s];
|
|
899
|
+
this.mindElixirBox.style.setProperty(o, n[o]);
|
|
900
900
|
}
|
|
901
901
|
t && this.refresh();
|
|
902
902
|
};
|
|
903
|
-
function
|
|
903
|
+
function wt(e) {
|
|
904
904
|
return {
|
|
905
905
|
nodeData: e.isFocusMode ? e.nodeDataBackup : e.nodeData,
|
|
906
906
|
linkData: e.linkData,
|
|
@@ -909,13 +909,13 @@ function Lt(e) {
|
|
|
909
909
|
theme: e.theme
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
const
|
|
912
|
+
const ie = function(e, t, n) {
|
|
913
913
|
if (e) {
|
|
914
914
|
if (console.time("selectNode"), typeof e == "string") {
|
|
915
|
-
const
|
|
916
|
-
return
|
|
915
|
+
const i = L(e);
|
|
916
|
+
return i ? this.selectNode(i) : void 0;
|
|
917
917
|
}
|
|
918
|
-
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,
|
|
918
|
+
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");
|
|
919
919
|
}
|
|
920
920
|
}, se = function() {
|
|
921
921
|
this.currentNode && (this.currentNode.className = ""), this.currentNode = null, this.bus.fire("unselectNode");
|
|
@@ -971,26 +971,26 @@ const ne = function(e, t, i) {
|
|
|
971
971
|
this.selectNode(t);
|
|
972
972
|
}
|
|
973
973
|
}, de = function() {
|
|
974
|
-
const e =
|
|
975
|
-
return JSON.stringify(e, (t,
|
|
976
|
-
if (t
|
|
977
|
-
return t === "from" || t === "to" ?
|
|
974
|
+
const e = wt(this);
|
|
975
|
+
return JSON.stringify(e, (t, n) => {
|
|
976
|
+
if (!(t === "parent" && typeof n != "string"))
|
|
977
|
+
return t === "from" || t === "to" ? n.nodeObj.id : n;
|
|
978
978
|
});
|
|
979
979
|
}, ue = function() {
|
|
980
980
|
return JSON.parse(this.getDataString());
|
|
981
981
|
}, fe = function() {
|
|
982
|
-
const e =
|
|
982
|
+
const e = wt(this).nodeData;
|
|
983
983
|
let t = "# " + e.topic + `
|
|
984
984
|
|
|
985
985
|
`;
|
|
986
|
-
function i
|
|
987
|
-
for (let o = 0; o <
|
|
988
|
-
s <= 6 ? t += "".padStart(s, "#") + " " +
|
|
986
|
+
function n(i, s) {
|
|
987
|
+
for (let o = 0; o < i.length; o++)
|
|
988
|
+
s <= 6 ? t += "".padStart(s, "#") + " " + i[o].topic + `
|
|
989
989
|
|
|
990
|
-
` : t += "".padStart(s - 7, " ") + "- " +
|
|
991
|
-
`,
|
|
990
|
+
` : t += "".padStart(s - 7, " ") + "- " + i[o].topic + `
|
|
991
|
+
`, i[o].children && n(i[o].children || [], s + 1);
|
|
992
992
|
}
|
|
993
|
-
return
|
|
993
|
+
return n(e.children || [], 2), t;
|
|
994
994
|
}, pe = function() {
|
|
995
995
|
this.editable = !0;
|
|
996
996
|
}, me = function() {
|
|
@@ -1014,10 +1014,10 @@ const ne = function(e, t, i) {
|
|
|
1014
1014
|
}, we = function(e) {
|
|
1015
1015
|
this.locale = e, this.refresh();
|
|
1016
1016
|
}, Le = function(e, t) {
|
|
1017
|
-
const
|
|
1018
|
-
typeof t == "boolean" ?
|
|
1017
|
+
const n = e.nodeObj;
|
|
1018
|
+
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0, this.layout(), this.linkDiv(), this.bus.fire("expandNode", n);
|
|
1019
1019
|
}, Se = function(e) {
|
|
1020
|
-
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}),
|
|
1020
|
+
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.linkData = e.linkData || {}), U(this.nodeData), this.layout(), this.linkDiv();
|
|
1021
1021
|
}, Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1022
1022
|
__proto__: null,
|
|
1023
1023
|
cancelFocus: xe,
|
|
@@ -1036,7 +1036,7 @@ const ne = function(e, t, i) {
|
|
|
1036
1036
|
scale: ge,
|
|
1037
1037
|
selectFirstChild: ae,
|
|
1038
1038
|
selectNextSibling: re,
|
|
1039
|
-
selectNode:
|
|
1039
|
+
selectNode: ie,
|
|
1040
1040
|
selectNodes: oe,
|
|
1041
1041
|
selectParent: he,
|
|
1042
1042
|
selectPrevSibling: ce,
|
|
@@ -1056,8 +1056,8 @@ const ne = function(e, t, i) {
|
|
|
1056
1056
|
this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1057
1057
|
return;
|
|
1058
1058
|
}
|
|
1059
|
-
const
|
|
1060
|
-
this.cb && this.cb(
|
|
1059
|
+
const n = this.lastX - t.pageX, i = this.lastY - t.pageY;
|
|
1060
|
+
this.cb && this.cb(n, i), this.lastX = t.pageX, this.lastY = t.pageY;
|
|
1061
1061
|
}
|
|
1062
1062
|
},
|
|
1063
1063
|
handleMouseDown(t) {
|
|
@@ -1067,8 +1067,8 @@ const ne = function(e, t, i) {
|
|
|
1067
1067
|
t.stopPropagation(), this.clear();
|
|
1068
1068
|
},
|
|
1069
1069
|
cb: null,
|
|
1070
|
-
init(t,
|
|
1071
|
-
this.cb =
|
|
1070
|
+
init(t, n) {
|
|
1071
|
+
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);
|
|
1072
1072
|
},
|
|
1073
1073
|
destory(t) {
|
|
1074
1074
|
t.removeEventListener("mousemove", this.handleMouseMove), t.removeEventListener("mouseleave", this.handleClear), t.removeEventListener("mouseup", this.handleClear), this.dom.removeEventListener("mousedown", this.handleMouseDown);
|
|
@@ -1077,87 +1077,87 @@ const ne = function(e, t, i) {
|
|
|
1077
1077
|
this.mousedown = !1, this.lastX = 0, this.lastY = 0;
|
|
1078
1078
|
}
|
|
1079
1079
|
};
|
|
1080
|
-
},
|
|
1080
|
+
}, at = {
|
|
1081
1081
|
create: $e
|
|
1082
|
-
}, ke = function(e, t,
|
|
1082
|
+
}, ke = function(e, t, n, i) {
|
|
1083
1083
|
const s = this.map.getBoundingClientRect();
|
|
1084
1084
|
if (!e || !t)
|
|
1085
1085
|
return;
|
|
1086
|
-
const o = e.getBoundingClientRect(), l = t.getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal,
|
|
1086
|
+
const o = e.getBoundingClientRect(), l = t.getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal, d = (o.y + o.height / 2 - s.y) / this.scaleVal, f = (l.x + l.width / 2 - s.x) / this.scaleVal, h = (l.y + l.height / 2 - s.y) / this.scaleVal;
|
|
1087
1087
|
let a, c, u, g;
|
|
1088
|
-
|
|
1088
|
+
n && i ? (a = r + i.delta1.x, c = d + i.delta1.y, u = f + i.delta2.x, g = h + i.delta2.y) : (d + h) / 2 - d <= o.height / 2 ? (a = (o.x + o.width - s.x) / this.scaleVal + 100, c = d, u = (l.x + l.width - s.x) / this.scaleVal + 100, g = h) : (a = (r + f) / 2, c = (d + h) / 2, u = (r + f) / 2, g = (d + h) / 2);
|
|
1089
1089
|
const m = {
|
|
1090
1090
|
cx: r,
|
|
1091
|
-
cy:
|
|
1091
|
+
cy: d,
|
|
1092
1092
|
w: o.width,
|
|
1093
1093
|
h: o.height
|
|
1094
1094
|
}, p = {
|
|
1095
1095
|
cx: f,
|
|
1096
|
-
cy:
|
|
1096
|
+
cy: h,
|
|
1097
1097
|
w: l.width,
|
|
1098
1098
|
h: l.height
|
|
1099
|
-
}, v =
|
|
1099
|
+
}, v = K(m, a, c), y = v.x, x = v.y, _ = J(p, u, g), E = _.x, T = _.y, S = mt(u, g, E, T), w = {
|
|
1100
1100
|
id: "",
|
|
1101
1101
|
label: "",
|
|
1102
1102
|
from: e.nodeObj.id,
|
|
1103
1103
|
to: t.nodeObj.id,
|
|
1104
1104
|
delta1: {
|
|
1105
1105
|
x: a - r,
|
|
1106
|
-
y: c -
|
|
1106
|
+
y: c - d
|
|
1107
1107
|
},
|
|
1108
1108
|
delta2: {
|
|
1109
1109
|
x: u - f,
|
|
1110
|
-
y: g -
|
|
1110
|
+
y: g - h
|
|
1111
1111
|
}
|
|
1112
|
-
},
|
|
1113
|
-
`M ${y} ${x} C ${a} ${c} ${u} ${g} ${
|
|
1114
|
-
`M ${
|
|
1112
|
+
}, k = jt(
|
|
1113
|
+
`M ${y} ${x} C ${a} ${c} ${u} ${g} ${E} ${T}`,
|
|
1114
|
+
`M ${S.x1} ${S.y1} L ${E} ${T} L ${S.x2} ${S.y2}`
|
|
1115
1115
|
);
|
|
1116
|
-
|
|
1116
|
+
n && i ? (w.id = i.id, this.linkData[i.id] = w) : (w.id = Q(), this.linkData[w.id] = w, this.currentLink = k), k.linkObj = w, k.dataset.linkid = w.id, this.linkSvgGroup.appendChild(k), n || this.showLinkController(a, c, u, g, w, m, p);
|
|
1117
1117
|
}, Ne = function(e) {
|
|
1118
1118
|
let t;
|
|
1119
1119
|
if (e ? t = e : t = this.currentLink, !t)
|
|
1120
1120
|
return;
|
|
1121
1121
|
console.log(t), this.hideLinkController();
|
|
1122
|
-
const
|
|
1123
|
-
console.log(
|
|
1122
|
+
const n = t.linkObj.id;
|
|
1123
|
+
console.log(n), delete this.linkData[n], t.remove(), t = null;
|
|
1124
1124
|
}, Te = function(e) {
|
|
1125
1125
|
this.currentLink = e;
|
|
1126
1126
|
const t = e.linkObj;
|
|
1127
1127
|
if (!t)
|
|
1128
1128
|
return;
|
|
1129
|
-
const
|
|
1129
|
+
const n = t.from, i = t.to, s = this.map.getBoundingClientRect(), o = L(n).getBoundingClientRect(), l = L(i).getBoundingClientRect(), r = (o.x + o.width / 2 - s.x) / this.scaleVal, d = (o.y + o.height / 2 - s.y) / this.scaleVal, f = (l.x + l.width / 2 - s.x) / this.scaleVal, h = (l.y + l.height / 2 - s.y) / this.scaleVal, a = {
|
|
1130
1130
|
cx: r,
|
|
1131
|
-
cy:
|
|
1131
|
+
cy: d,
|
|
1132
1132
|
w: o.width,
|
|
1133
1133
|
h: o.height
|
|
1134
1134
|
}, c = {
|
|
1135
1135
|
cx: f,
|
|
1136
|
-
cy:
|
|
1136
|
+
cy: h,
|
|
1137
1137
|
w: l.width,
|
|
1138
1138
|
h: l.height
|
|
1139
|
-
}, u = r + t.delta1.x, g =
|
|
1139
|
+
}, u = r + t.delta1.x, g = d + t.delta1.y, m = f + t.delta2.x, p = h + t.delta2.y;
|
|
1140
1140
|
this.showLinkController(u, g, m, p, t, a, c);
|
|
1141
1141
|
}, Ae = function() {
|
|
1142
1142
|
this.linkController.style.display = "none", this.P2.style.display = "none", this.P3.style.display = "none";
|
|
1143
|
-
}, He = function(e, t,
|
|
1143
|
+
}, He = function(e, t, n, i, s, o, l) {
|
|
1144
1144
|
this.linkController.style.display = "initial", this.P2.style.display = "initial", this.P3.style.display = "initial";
|
|
1145
|
-
const r =
|
|
1146
|
-
let
|
|
1147
|
-
const
|
|
1148
|
-
let a =
|
|
1149
|
-
this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${
|
|
1145
|
+
const r = K(o, e, t);
|
|
1146
|
+
let d = r.x, f = r.y;
|
|
1147
|
+
const h = J(l, n, i);
|
|
1148
|
+
let a = h.x, c = h.y;
|
|
1149
|
+
this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${n}px;`, this.line1.setAttribute("x1", d), this.line1.setAttribute("y1", f), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", a), this.line2.setAttribute("y2", c), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = at.create(this.P2), this.helper2 = at.create(this.P3), this.helper1.init(this.map, (u, g) => {
|
|
1150
1150
|
var p;
|
|
1151
1151
|
e = e - u / this.scaleVal, t = t - g / this.scaleVal;
|
|
1152
|
-
const m =
|
|
1153
|
-
|
|
1152
|
+
const m = K(o, e, t);
|
|
1153
|
+
d = m.x, f = m.y, this.P2.style.top = t + "px", this.P2.style.left = e + "px", (p = this.currentLink) == null || p.children[0].setAttribute("d", `M ${d} ${f} C ${e} ${t} ${n} ${i} ${a} ${c}`), this.line1.setAttribute("x1", d), this.line1.setAttribute("y1", f), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), s.delta1.x = e - o.cx, s.delta1.y = t - o.cy;
|
|
1154
1154
|
}), this.helper2.init(this.map, (u, g) => {
|
|
1155
1155
|
var v, y;
|
|
1156
|
-
|
|
1157
|
-
const m =
|
|
1156
|
+
n = n - u / this.scaleVal, i = i - g / this.scaleVal;
|
|
1157
|
+
const m = J(l, n, i);
|
|
1158
1158
|
a = m.x, c = m.y;
|
|
1159
|
-
const p =
|
|
1160
|
-
this.P3.style.top =
|
|
1159
|
+
const p = mt(n, i, a, c);
|
|
1160
|
+
this.P3.style.top = i + "px", this.P3.style.left = n + "px", (v = this.currentLink) == null || v.children[0].setAttribute("d", `M ${d} ${f} C ${e} ${t} ${n} ${i} ${a} ${c}`), (y = this.currentLink) == null || y.children[1].setAttribute("d", `M ${p.x1} ${p.y1} L ${a} ${c} L ${p.x2} ${p.y2}`), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", a), this.line2.setAttribute("y2", c), s.delta2.x = n - l.cx, s.delta2.y = i - l.cy;
|
|
1161
1161
|
});
|
|
1162
1162
|
}, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1163
1163
|
__proto__: null,
|
|
@@ -1167,14 +1167,14 @@ const ne = function(e, t, i) {
|
|
|
1167
1167
|
selectLink: Te,
|
|
1168
1168
|
showLinkController: He
|
|
1169
1169
|
}, Symbol.toStringTag, { value: "Module" })), Be = function(e) {
|
|
1170
|
-
var
|
|
1170
|
+
var d, f;
|
|
1171
1171
|
if (e.length === 0)
|
|
1172
1172
|
throw new Error("No selected node.");
|
|
1173
1173
|
if (e.length === 1) {
|
|
1174
|
-
const
|
|
1174
|
+
const h = e[0].nodeObj, a = e[0].nodeObj.parent;
|
|
1175
1175
|
if (!a)
|
|
1176
1176
|
throw new Error("Can not select root node.");
|
|
1177
|
-
const c = a.children.findIndex((u) =>
|
|
1177
|
+
const c = a.children.findIndex((u) => h === u);
|
|
1178
1178
|
return {
|
|
1179
1179
|
parent: a.id,
|
|
1180
1180
|
start: c,
|
|
@@ -1182,8 +1182,8 @@ const ne = function(e, t, i) {
|
|
|
1182
1182
|
};
|
|
1183
1183
|
}
|
|
1184
1184
|
let t = 0;
|
|
1185
|
-
const
|
|
1186
|
-
let a =
|
|
1185
|
+
const n = e.map((h) => {
|
|
1186
|
+
let a = h.nodeObj;
|
|
1187
1187
|
const c = [];
|
|
1188
1188
|
for (; a.parent; ) {
|
|
1189
1189
|
const u = a.parent, g = u.children, m = g == null ? void 0 : g.indexOf(a);
|
|
@@ -1191,15 +1191,17 @@ const ne = function(e, t, i) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
return c.length > t && (t = c.length), c;
|
|
1193
1193
|
});
|
|
1194
|
-
let
|
|
1194
|
+
let i = 0;
|
|
1195
1195
|
t:
|
|
1196
|
-
for (;
|
|
1197
|
-
const
|
|
1198
|
-
for (let a = 1; a <
|
|
1199
|
-
if (((f =
|
|
1196
|
+
for (; i < t; i++) {
|
|
1197
|
+
const h = (d = n[0][i]) == null ? void 0 : d.node;
|
|
1198
|
+
for (let a = 1; a < n.length; a++)
|
|
1199
|
+
if (((f = n[a][i]) == null ? void 0 : f.node) !== h)
|
|
1200
1200
|
break t;
|
|
1201
1201
|
}
|
|
1202
|
-
|
|
1202
|
+
if (!i)
|
|
1203
|
+
throw new Error("Can not select root node.");
|
|
1204
|
+
const s = n.map((h) => h[i - 1].index).sort(), o = s[0] || 0, l = s[s.length - 1] || 0, r = n[0][i - 1].node;
|
|
1203
1205
|
if (r.root)
|
|
1204
1206
|
throw new Error("Please select nodes in the same main topic.");
|
|
1205
1207
|
return {
|
|
@@ -1210,139 +1212,141 @@ const ne = function(e, t, i) {
|
|
|
1210
1212
|
}, ze = function(e) {
|
|
1211
1213
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
1212
1214
|
return t.setAttribute("id", e), t;
|
|
1213
|
-
},
|
|
1214
|
-
const
|
|
1215
|
-
return
|
|
1215
|
+
}, ht = function(e, t) {
|
|
1216
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1217
|
+
return Z(n, {
|
|
1216
1218
|
d: e,
|
|
1217
1219
|
stroke: t || "#666",
|
|
1218
1220
|
fill: "none",
|
|
1219
1221
|
"stroke-linecap": "round",
|
|
1220
1222
|
"stroke-width": "2"
|
|
1221
|
-
}),
|
|
1222
|
-
},
|
|
1223
|
+
}), n;
|
|
1224
|
+
}, dt = function(e, t, n, i, s) {
|
|
1223
1225
|
const o = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1224
|
-
return
|
|
1225
|
-
"text-anchor":
|
|
1226
|
+
return Z(o, {
|
|
1227
|
+
"text-anchor": i,
|
|
1226
1228
|
x: t + "",
|
|
1227
|
-
y:
|
|
1229
|
+
y: n + "",
|
|
1228
1230
|
fill: s || "#666"
|
|
1229
1231
|
}), o.innerHTML = e, o;
|
|
1230
|
-
}, Ve = (e) =>
|
|
1231
|
-
var
|
|
1232
|
-
const
|
|
1232
|
+
}, Ve = (e) => L(e).parentElement.parentElement, Lt = function({ parent: e, start: t }) {
|
|
1233
|
+
var o, l;
|
|
1234
|
+
const n = L(e), i = n.nodeObj;
|
|
1235
|
+
let s;
|
|
1236
|
+
return i.root === !0 ? s = (o = L(i.children[t].id).closest("me-main")) == null ? void 0 : o.className : s = (l = n.closest("me-main")) == null ? void 0 : l.className, s;
|
|
1237
|
+
}, St = function(e, t) {
|
|
1238
|
+
var T;
|
|
1239
|
+
const { id: n, text: i, parent: s, start: o, end: l } = t, r = e.nodes, f = L(s).nodeObj, h = Lt(t);
|
|
1233
1240
|
let a = 1 / 0, c = 0, u = 0, g = 0;
|
|
1234
|
-
for (let
|
|
1235
|
-
const
|
|
1236
|
-
if (!
|
|
1237
|
-
return console.warn("Child not found"), e.removeSummary(
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1241
|
+
for (let S = o; S <= l; S++) {
|
|
1242
|
+
const w = (T = f.children) == null ? void 0 : T[S];
|
|
1243
|
+
if (!w)
|
|
1244
|
+
return console.warn("Child not found"), e.removeSummary(n), null;
|
|
1245
|
+
const k = Ve(w.id), { offsetLeft: W, offsetTop: tt } = gt(r, k);
|
|
1246
|
+
S === o && (u = tt), S === l && (g = tt + k.offsetHeight), W < a && (a = W), k.offsetWidth + W > c && (c = k.offsetWidth + W);
|
|
1240
1247
|
}
|
|
1241
1248
|
let m, p;
|
|
1242
1249
|
const v = u + 10, y = g + 10, x = (v + y) / 2, _ = e.theme.cssVar["--color"];
|
|
1243
|
-
|
|
1244
|
-
const
|
|
1245
|
-
return
|
|
1250
|
+
h === "lhs" ? (m = ht(`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`, _), p = dt(i, a - 20, x + 6, "end", _)) : (m = ht(`M ${c - 10} ${v} c 5 0 10 5 10 10 L ${c} ${y - 10} c 0 5 -5 10 -10 10 M ${c} ${x} h 10`, _), p = dt(i, c + 20, x + 6, "start", _));
|
|
1251
|
+
const E = ze("s-" + n);
|
|
1252
|
+
return E.appendChild(m), E.appendChild(p), E.summaryObj = t, e.summarySvg.appendChild(E), E;
|
|
1246
1253
|
}, De = function() {
|
|
1247
1254
|
let e = [];
|
|
1248
1255
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
1249
|
-
const { parent: t, start:
|
|
1256
|
+
const { parent: t, start: n, end: i } = Be(e), s = { id: Q(), parent: t, start: n, end: i, text: "summary" }, o = St(this, s);
|
|
1250
1257
|
this.summaries.push(s), this.editSummary(o);
|
|
1251
1258
|
}, Re = function(e) {
|
|
1252
|
-
var
|
|
1253
|
-
const t = this.summaries.findIndex((
|
|
1254
|
-
t > -1 && (this.summaries.splice(t, 1), (
|
|
1259
|
+
var n;
|
|
1260
|
+
const t = this.summaries.findIndex((i) => i.id === e);
|
|
1261
|
+
t > -1 && (this.summaries.splice(t, 1), (n = document.querySelector("#s-" + e)) == null || n.remove());
|
|
1255
1262
|
}, Oe = function(e) {
|
|
1256
|
-
const t = e.children[1].getBBox(),
|
|
1257
|
-
|
|
1258
|
-
x: t.x -
|
|
1259
|
-
y: t.y -
|
|
1260
|
-
width: t.width +
|
|
1261
|
-
height: t.height +
|
|
1262
|
-
rx:
|
|
1263
|
+
const t = e.children[1].getBBox(), n = 6, i = 3, s = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
1264
|
+
Z(s, {
|
|
1265
|
+
x: t.x - n + "",
|
|
1266
|
+
y: t.y - n + "",
|
|
1267
|
+
width: t.width + n * 2 + "",
|
|
1268
|
+
height: t.height + n * 2 + "",
|
|
1269
|
+
rx: i + "",
|
|
1263
1270
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
1264
1271
|
"stroke-width": "2",
|
|
1265
1272
|
fill: "none"
|
|
1266
1273
|
}), s.classList.add("selected"), e.appendChild(s), this.currentSummary = e;
|
|
1267
|
-
},
|
|
1274
|
+
}, je = function() {
|
|
1268
1275
|
var e, t;
|
|
1269
1276
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
1270
|
-
},
|
|
1277
|
+
}, qe = function() {
|
|
1271
1278
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
1272
1279
|
St(this, e);
|
|
1273
1280
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
1274
1281
|
}, Xe = function(e) {
|
|
1275
|
-
var t;
|
|
1276
|
-
return (t = M(e).closest("me-main")) == null ? void 0 : t.className;
|
|
1277
|
-
}, We = function(e) {
|
|
1278
1282
|
if (console.time("editSummary"), !e)
|
|
1279
1283
|
return;
|
|
1280
|
-
const t = e.childNodes[1],
|
|
1281
|
-
this.nodes.appendChild(
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
+
const t = e.childNodes[1], n = document.createElement("div");
|
|
1285
|
+
this.nodes.appendChild(n);
|
|
1286
|
+
const i = t.innerHTML;
|
|
1287
|
+
n.id = "input-box", n.textContent = i, n.contentEditable = "true", n.spellcheck = !1;
|
|
1284
1288
|
const s = t.getAttribute("x") + "px", o = t.getAttribute("y") + "px";
|
|
1285
|
-
|
|
1289
|
+
n.style.cssText = `min-width:${100 - 8}px;position:absolute;left:${s};top:${o};`, Lt(e.summaryObj) === "lhs" ? n.style.cssText += "transform: translate(-100%, -100%);" : n.style.cssText += "transform: translate(0, -100%);", n.focus(), bt(n), n.addEventListener("keydown", (l) => {
|
|
1286
1290
|
l.stopPropagation();
|
|
1287
1291
|
const r = l.key;
|
|
1288
1292
|
if (r === "Enter" || r === "Tab") {
|
|
1289
1293
|
if (l.shiftKey)
|
|
1290
1294
|
return;
|
|
1291
|
-
l.preventDefault(),
|
|
1295
|
+
l.preventDefault(), n.blur(), this.map.focus();
|
|
1292
1296
|
}
|
|
1293
|
-
}),
|
|
1294
|
-
var
|
|
1295
|
-
if (!
|
|
1297
|
+
}), n.addEventListener("blur", () => {
|
|
1298
|
+
var d;
|
|
1299
|
+
if (!n)
|
|
1296
1300
|
return;
|
|
1297
|
-
const l = e.summaryObj, r = ((
|
|
1298
|
-
r === "" ? l.text =
|
|
1301
|
+
const l = e.summaryObj, r = ((d = n.textContent) == null ? void 0 : d.trim()) || "";
|
|
1302
|
+
r === "" ? l.text = i : l.text = r, n.remove(), r !== i && (t.innerHTML = l.text, this.linkDiv(), this.bus.fire("operation", {
|
|
1299
1303
|
name: "finishEditSummary",
|
|
1300
1304
|
obj: l,
|
|
1301
|
-
origin:
|
|
1305
|
+
origin: i
|
|
1302
1306
|
}));
|
|
1303
1307
|
}), console.timeEnd("editSummary");
|
|
1304
|
-
},
|
|
1308
|
+
}, We = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1305
1309
|
__proto__: null,
|
|
1306
1310
|
createSummary: De,
|
|
1307
|
-
editSummary:
|
|
1311
|
+
editSummary: Xe,
|
|
1308
1312
|
removeSummary: Re,
|
|
1309
|
-
renderSummary:
|
|
1313
|
+
renderSummary: qe,
|
|
1310
1314
|
selectSummary: Oe,
|
|
1311
|
-
unselectSummary:
|
|
1312
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1313
|
-
getObjById:
|
|
1315
|
+
unselectSummary: je
|
|
1316
|
+
}, Symbol.toStringTag, { value: "Module" })), Ye = {}, Fe = {
|
|
1317
|
+
getObjById: pt,
|
|
1314
1318
|
generateNewObj: Mt,
|
|
1315
1319
|
layout: Nt,
|
|
1316
|
-
linkDiv:
|
|
1320
|
+
linkDiv: qt,
|
|
1317
1321
|
editTopic: Vt,
|
|
1318
1322
|
createWrapper: Ht,
|
|
1319
1323
|
createParent: Pt,
|
|
1320
1324
|
createChildren: Bt,
|
|
1321
1325
|
createTopic: zt,
|
|
1322
|
-
findEle:
|
|
1323
|
-
changeTheme:
|
|
1326
|
+
findEle: L,
|
|
1327
|
+
changeTheme: ne,
|
|
1324
1328
|
...Me,
|
|
1325
|
-
...Fe,
|
|
1326
|
-
...Pe,
|
|
1327
1329
|
...Ye,
|
|
1330
|
+
...Pe,
|
|
1331
|
+
...We,
|
|
1328
1332
|
init(e) {
|
|
1329
1333
|
if (!e || !e.nodeData)
|
|
1330
1334
|
return new Error("MindElixir: `data` is required");
|
|
1331
|
-
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData,
|
|
1335
|
+
e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, U(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Gt(this), ee(this), this.toCenter(), this.layout(), this.linkDiv();
|
|
1332
1336
|
}
|
|
1333
|
-
},
|
|
1334
|
-
function
|
|
1337
|
+
}, q = document;
|
|
1338
|
+
function N({
|
|
1335
1339
|
el: e,
|
|
1336
1340
|
direction: t,
|
|
1337
|
-
locale:
|
|
1338
|
-
draggable:
|
|
1341
|
+
locale: n,
|
|
1342
|
+
draggable: i,
|
|
1339
1343
|
editable: s,
|
|
1340
1344
|
contextMenu: o,
|
|
1341
1345
|
contextMenuOption: l,
|
|
1342
1346
|
toolBar: r,
|
|
1343
|
-
keypress:
|
|
1347
|
+
keypress: d,
|
|
1344
1348
|
before: f,
|
|
1345
|
-
newTopicName:
|
|
1349
|
+
newTopicName: h,
|
|
1346
1350
|
allowUndo: a,
|
|
1347
1351
|
mainLinkStyle: c,
|
|
1348
1352
|
subLinkStyle: u,
|
|
@@ -1350,25 +1354,25 @@ function $({
|
|
|
1350
1354
|
mobileMenu: m,
|
|
1351
1355
|
theme: p
|
|
1352
1356
|
}) {
|
|
1353
|
-
console.log("ME_version " +
|
|
1357
|
+
console.log("ME_version " + N.version, this);
|
|
1354
1358
|
let v = null;
|
|
1355
1359
|
const y = Object.prototype.toString.call(e);
|
|
1356
1360
|
if (y === "[object HTMLDivElement]" ? v = e : y === "[object String]" && (v = document.querySelector(e)), !v)
|
|
1357
1361
|
throw new Error("MindElixir: el is not a valid element");
|
|
1358
|
-
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap",
|
|
1362
|
+
v.className += " mind-elixir", v.innerHTML = "", v.style.setProperty("--gap", $ + "px"), this.mindElixirBox = v, this.before = f || {}, this.locale = n || "en", this.contextMenuOption = l, this.contextMenu = o === void 0 ? !0 : o, this.toolBar = r === void 0 ? !0 : r, this.keypress = d === void 0 ? !0 : d, this.mobileMenu = m || !1, this.direction = typeof t == "number" ? t : 1, this.draggable = i === void 0 ? !0 : i, this.newTopicName = h || "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 = c || 0, this.subLinkStyle = u || 0, this.overflowHidden = g || !1, this.bus = kt.create(), this.container = q.createElement("div"), this.container.className = "map-container";
|
|
1359
1363
|
const x = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1360
|
-
this.theme = p || (x.matches ?
|
|
1361
|
-
const _ =
|
|
1362
|
-
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes =
|
|
1364
|
+
this.theme = p || (x.matches ? ft : ut);
|
|
1365
|
+
const _ = q.createElement("div");
|
|
1366
|
+
_.className = "map-canvas", this.map = _, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = q.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = q.createElement("div"), this.P3 = q.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = it(0, 0, 0, 0), this.line2 = it(0, 0, 0, 0), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.map.appendChild(this.nodes), this.map.appendChild(this.linkController), this.map.appendChild(this.linkSvgGroup), this.map.appendChild(this.P2), this.map.appendChild(this.P3), this.overflowHidden ? this.container.style.overflow = "hidden" : $t(this);
|
|
1363
1367
|
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1368
|
+
N.prototype = Fe;
|
|
1369
|
+
N.LEFT = j;
|
|
1370
|
+
N.RIGHT = G;
|
|
1371
|
+
N.SIDE = I;
|
|
1372
|
+
N.THEME = ut;
|
|
1373
|
+
N.DARK_THEME = ft;
|
|
1374
|
+
N.version = "3.1.3";
|
|
1375
|
+
N.E = L;
|
|
1372
1376
|
export {
|
|
1373
|
-
|
|
1377
|
+
N as default
|
|
1374
1378
|
};
|