mind-elixir 4.4.3 → 4.5.0
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 +3 -3
- package/dist/MindElixir.js +474 -467
- package/dist/MindElixirLite.iife.js +2 -2
- package/dist/MindElixirLite.js +97 -93
- package/dist/types/index.d.ts +1 -0
- package/dist/types/interact.d.ts +4 -0
- package/dist/types/methods.d.ts +1 -0
- package/dist/types/types/index.d.ts +19 -2
- package/package.json +1 -1
- package/readme.md +0 -5
package/dist/MindElixir.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map-container{--gap: 30px;--root-radius: 30px;--main-radius: 20px;--root-color: #ffffff;--root-bgcolor: #4c4f69;--root-border-color: rgba(0, 0, 0, 0);--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;-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;-webkit-user-select:none;user-select:none;height:100%;width:100%;overflow:scroll;font-size:15px}.map-container *{box-sizing:border-box}.map-container::-webkit-scrollbar{width:0px;height:0px}.map-container .selected{outline:2px solid var(--selected);outline-offset:1px}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.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);border:var(--root-border-color) 2px solid;white-space:pre-wrap;background-color:var(--root-bgcolor)}.map-container me-main>me-wrapper{position:relative;margin:45px 65px}.map-container me-main>me-wrapper>me-parent{margin:10px;padding:0}.map-container me-main>me-wrapper>me-parent>me-tpc{border-radius:var(--main-radius);background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);padding:8px 25px}.map-container me-wrapper{display:block;pointer-events:none;width:fit-content}.map-container me-children,.map-container me-parent{display:inline-block;vertical-align:middle}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--gap);margin-top:10px}.map-container me-parent me-tpc{position:relative;display:block;border-radius:3px;color:var(--color);pointer-events:all;max-width:35em;white-space:pre-wrap;padding:var(--topic-padding)}.map-container me-parent me-tpc .insert-preview{position:absolute;width:100%;left:0;z-index:9}.map-container me-parent me-tpc .show{background:#7ad5ff;pointer-events:none;opacity:.7}.map-container me-parent me-tpc .before{height:14px;top:-14px}.map-container me-parent me-tpc .in{height:100%;top:0}.map-container me-parent me-tpc .after{height:14px;bottom:-14px}.map-container me-parent me-epd{position:absolute;height:18px;width:18px;opacity:.8;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NDcxNzI0MiIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNDgwaC0xMzguNjY2NjY3VjM0MS4zMzMzMzNjMC0xNy4wNjY2NjctMTQuOTMzMzMzLTMyLTMyLTMycy0zMiAxNC45MzMzMzMtMzIgMzJ2MTM4LjY2NjY2N0gzNDEuMzMzMzMzYy0xNy4wNjY2NjcgMC0zMiAxNC45MzMzMzMtMzIgMzJzMTQuOTMzMzMzIDMyIDMyIDMyaDEzOC42NjY2NjdWNjgyLjY2NjY2N2MwIDE3LjA2NjY2NyAxNC45MzMzMzMgMzIgMzIgMzJzMzItMTQuOTMzMzMzIDMyLTMydi0xMzguNjY2NjY3SDY4Mi42NjY2NjdjMTcuMDY2NjY3IDAgMzItMTQuOTMzMzMzIDMyLTMycy0xNC45MzMzMzMtMzItMzItMzJ6Ij48L3BhdGg+Cjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center;pointer-events:all;z-index:9}.map-container me-parent me-epd.minus{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgdD0iMTY1NjY1NTU2NDk4NSIgY2xhc3M9Imljb24iIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHZlcnNpb249IjEuMSIKICAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+CiAgICA8cGF0aCBkPSJNNTEyIDc0LjY2NjY2N0MyNzAuOTMzMzMzIDc0LjY2NjY2NyA3NC42NjY2NjcgMjcwLjkzMzMzMyA3NC42NjY2NjcgNTEyUzI3MC45MzMzMzMgOTQ5LjMzMzMzMyA1MTIgOTQ5LjMzMzMzMyA5NDkuMzMzMzMzIDc1My4wNjY2NjcgOTQ5LjMzMzMzMyA1MTIgNzUzLjA2NjY2NyA3NC42NjY2NjcgNTEyIDc0LjY2NjY2N3oiIHN0cm9rZS13aWR0aD0iNTQiIHN0cm9rZT0nYmxhY2snIGZpbGw9J3doaXRlJyA+PC9wYXRoPgogICAgPHBhdGggZD0iTTY4Mi42NjY2NjcgNTQ0SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyLTE0LjkzMzMzMy0zMi0zMnMxNC45MzMzMzMtMzIgMzItMzJoMzQxLjMzMzMzNGMxNy4wNjY2NjcgMCAzMiAxNC45MzMzMzMgMzIgMzJzLTE0LjkzMzMzMyAzMi0zMiAzMnoiPjwvcGF0aD4KPC9zdmc+)!important;transition:opacity .3s;opacity:0}.map-container me-parent me-epd.minus:hover{opacity:.8}.map-container .icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.map-container .lines,.map-container .summary,.map-container .subLines,.map-container .topiclinks,.map-container .linkcontroller{position:absolute;height:102%;width:100%;top:0;left:0}.map-container .topiclinks,.map-container .linkcontroller,.map-container .summary{pointer-events:none}.map-container .topiclinks text,.map-container .linkcontroller text,.map-container .summary text{pointer-events:all}.map-container .topiclinks .selected,.map-container .linkcontroller .selected,.map-container .summary .selected{pointer-events:none}.map-container .lines,.map-container .subLines{pointer-events:none;z-index:-1}.map-container .topiclinks *,.map-container .linkcontroller *{z-index:100}.map-container .topiclinks g{cursor:pointer}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;z-index:11;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;background-color:var(--bgcolor)}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container me-tpc>.text{display:inline-block}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;cursor:pointer}.map-container .tags{direction:ltr}.map-container .tags span{display:inline-block;border-radius:3px;padding:2px 4px;background:#d6f0f8;color:#276f86;margin:2px 4px 0 0;font-size:12px;line-height:1.3em}.map-container .icons{display:inline-block;direction:ltr;margin-left:5px}.map-container .icons span{display:inline-block;line-height:1.3em}.map-container .mind-elixir-ghost{position:fixed;top:-100%;left:-100%;box-sizing:content-box;opacity:.5;background-color:#f6f6f6;max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;border:#666666 2px solid}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .context-menu{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99}.map-container .context-menu .menu-list{position:fixed;list-style:none;margin:0;padding:0;color:var(--panel-color);box-shadow:0 12px 15px #0003;border-radius:5px;overflow:hidden}.map-container .context-menu .menu-list li{min-width:200px;overflow:hidden;white-space:nowrap;padding:6px 10px;background:var(--panel-bgcolor);border-bottom:1px solid var(--panel-border-color);cursor:pointer}.map-container .context-menu .menu-list li span{line-height:20px}.map-container .context-menu .menu-list li a{color:#333;text-decoration:none}.map-container .context-menu .menu-list li.disabled{display:none}.map-container .context-menu .menu-list li:hover{filter:brightness(.95)}.map-container .context-menu .menu-list li:last-child{border-bottom:0}.map-container .context-menu .menu-list li span:last-child{float:right}.map-container .context-menu .key{font-size:10px;background-color:#f1f1f1;color:#333;padding:2px 5px;border-radius:3px}.map-container .tips{position:absolute;bottom:20px;left:50%;transform:translate(-50%);color:var(--panel-color);font-weight:bolder}.mind-elixir-toolbar{font-family:iconfont;position:absolute;color:var(--panel-color);background:var(--panel-bgcolor);padding:10px;border-radius:5px;box-shadow:0 1px 2px #0003}.mind-elixir-toolbar svg{display:inline-block}.mind-elixir-toolbar span:active{opacity:.5}.mind-elixir-toolbar.rb{right:20px;bottom:20px}.mind-elixir-toolbar.rb span+span{margin-left:10px}.mind-elixir-toolbar.lt{font-size:20px;left:20px;top:20px}.mind-elixir-toolbar.lt span{display:block}.mind-elixir-toolbar.lt span+span{margin-top:10px}")),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
|
|
2
2
|
(function(e) {
|
|
3
|
-
var t, n, o, s, i, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
3
|
+
var t, n, o, i, s, r, c = '<svg><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M423.765333 128a42.666667 42.666667 0 0 1 3.2 85.205333L423.765333 213.333333H234.666667a64 64 0 0 0-63.872 60.245334L170.666667 277.333333v512a64 64 0 0 0 60.245333 63.872L234.666667 853.333333h512a64 64 0 0 0 63.872-60.245333L810.666667 789.333333v-189.098666a42.666667 42.666667 0 0 1 85.205333-3.2l0.128 3.2V789.333333a149.333333 149.333333 0 0 1-144.213333 149.248L746.666667 938.666667h-512a149.333333 149.333333 0 0 1-149.248-144.213334L85.333333 789.333333v-512a149.333333 149.333333 0 0 1 144.213334-149.248L234.666667 128h189.098666z m324.949334-53.248a42.666667 42.666667 0 0 1 60.330666 0l150.869334 150.869333a42.666667 42.666667 0 0 1 0 60.330667l-329.386667 329.386667a42.666667 42.666667 0 0 1-29.44 12.458666l-153.386667 2.517334a42.666667 42.666667 0 0 1-43.349333-43.349334l2.56-153.386666a42.666667 42.666667 0 0 1 12.458667-29.44z m30.165333 90.496L491.946667 452.266667l-1.493334 91.989333 92.032-1.493333 286.976-286.976-90.538666-90.538667z" ></path></symbol><symbol id="icon-rising" viewBox="0 0 1024 1024"><path d="M553.173333 803.84h-64l0.021334-474.581333-224.021334 224-45.269333-45.226667L521.6 206.293333l301.717333 301.696-45.269333 45.269334-224.853333-224.896v475.477333z" ></path></symbol><symbol id="icon-falling" viewBox="0 0 1024 1024"><path d="M553.173333 238.314667h-64l0.021334 474.602666-224.021334-224-45.269333 45.226667L521.6 835.861333l301.717333-301.717333-45.269333-45.226667-224.853333 224.853334V238.336z" ></path></symbol><symbol id="icon-shanchu2" viewBox="0 0 1024 1024"><path d="M516.60601807 107.93026734c-82.64382935 0-149.71865844 65.51751709-152.5729065 147.77160644H171.37136841c-21.40603638 0-38.92044068 17.38504028-38.92044068 38.92126465 0 21.40686036 17.38504028 38.92208862 38.92126466 38.92208862h42.94308471v435.40136719c0 81.73498536 55.39828492 148.55026245 123.90106201 148.55026245h348.99444581c68.37341309 0 123.90106201-66.42553711 123.901062-148.55026245V333.80477906h38.92126465c21.40686036 0 38.92126464-17.38586426 38.92126465-38.92208863 0-21.40686036-17.38504028-38.92126464-38.92126465-38.92126465H668.91854859C666.45321656 173.44860839 599.24902344 107.93109131 516.60601807 107.93109131z m-79.65939331 147.77160644c2.85424805-42.16442872 37.2354126-74.85809326 79.78875732-74.85809326s76.93450927 32.82302857 79.39984131 74.85809326H436.94662476z m-98.86047364 589.01165771c-24.2611084 0-50.98754883-31.13717651-50.98754883-75.76693725V333.80477906h450.97036744V769.33551026c0 44.50039673-26.72644043 75.76776123-50.98754884 75.76776122H338.08615112v-0.38973999z m0 0" ></path><path d="M390.37063599 751.17263794c17.77313232 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.77478027 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.27124023 40.08883667 32.43493653 40.08883667z m117.41308594 0c17.7739563 0 32.43411255-17.7739563 32.43411255-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43411255-40.08966065-17.7739563 0-32.43493653 17.77478027-32.43493653 40.08966065v228.72875976c0 22.18469239 14.66098023 40.08883667 32.43493653 40.08883667z m123.51049804 0c17.7739563 0 32.43493653-17.7739563 32.43493652-40.08883667V482.35504151c0-22.31488037-14.53079224-40.08966065-32.43493652-40.08966065-17.7739563 0-32.43411255 17.77478027-32.43411255 40.08966065v228.72875976c0 22.18469239 14.14105224 40.08883667 32.43411255 40.08883667z m0 0" ></path></symbol><symbol id="icon-zijiedian" viewBox="0 0 1024 1024"><path d="M312.208 472c19.568-157.856 153.432-280 315.656-280 175.68 0 318.112 143.272 318.112 320S803.552 832 627.864 832c-162.224 0-296.08-122.144-315.656-280H120a40 40 0 0 1 0-80h192.208zM632 752c132.552 0 240-107.448 240-240 0-132.552-107.448-240-240-240-132.552 0-240 107.448-240 240 0 132.552 107.448 240 240 240z m-40-280v-80a40 40 0 0 1 80 0v80h80a40 40 0 0 1 0 80h-80v80a40 40 0 0 1-80 0v-80h-80a40 40 0 0 1 0-80h80z" ></path></symbol><symbol id="icon-tongjijiedian-" viewBox="0 0 1024 1024"><path d="M803.84 131.626667H410.24A59.733333 59.733333 0 0 0 350.506667 192v45.226667H199.68a51.626667 51.626667 0 0 0-51.626667 51.626666v465.92a51.626667 51.626667 0 0 0 51.626667 51.626667h187.52v-55.466667h-162.133333a21.333333 21.333333 0 0 1-21.333334-21.333333V313.386667a21.333333 21.333333 0 0 1 21.333334-21.333334h125.653333v64a59.733333 59.733333 0 0 0 59.733333 59.733334h393.386667a59.733333 59.733333 0 0 0 59.733333-59.733334V192a59.733333 59.733333 0 0 0-59.733333-60.373333z m4.266667 224.64a4.266667 4.266667 0 0 1-4.266667 4.266666H410.24a4.266667 4.266667 0 0 1-4.266667-4.266666V192a4.266667 4.266667 0 0 1 4.266667-4.266667h393.6a4.266667 4.266667 0 0 1 4.266667 4.266667zM716.16 749.44h-81.28v-81.493333a27.733333 27.733333 0 0 0-55.466667 0v81.28h-81.493333a27.733333 27.733333 0 1 0 0 55.466666h81.28v81.28a27.733333 27.733333 0 1 0 55.466667 0v-81.066666h81.28a27.733333 27.733333 0 0 0 0-55.466667z" ></path></symbol><symbol id="icon-close" viewBox="0 0 1024 1024"><path d="M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128L512.128 467.904l-263.04-263.84c-12.448-12.48-32.704-12.544-45.248-0.064-12.512 12.48-12.544 32.736-0.064 45.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248a31.937 31.937 0 0 0 22.688 9.44c8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408a31.94 31.94 0 0 0 22.592-9.344c12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z" fill="" ></path></symbol><symbol id="icon-menu" viewBox="0 0 1024 1024"><path d="M109.714 292.571h804.572c21.943 0 36.571-21.942 36.571-43.885 0-14.629-14.628-29.257-36.571-29.257H109.714c-21.943 0-36.571 14.628-36.571 36.571 0 14.629 14.628 36.571 36.571 36.571zM914.286 512H109.714c-21.943 0-36.571 14.629-36.571 36.571 0 14.629 14.628 36.572 36.571 36.572h804.572c21.943 0 36.571-21.943 36.571-43.886 0-14.628-14.628-29.257-36.571-29.257z m0 292.571H109.714c-21.943 0-36.571 14.629-36.571 36.572s14.628 36.571 36.571 36.571h804.572c21.943 0 36.571-21.943 36.571-36.571 0-21.943-14.628-36.572-36.571-36.572z" ></path></symbol><symbol id="icon-right" viewBox="0 0 1024 1024"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="" ></path></symbol><symbol id="icon-left" viewBox="0 0 1024 1024"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="" ></path></symbol><symbol id="icon-side" viewBox="0 0 1024 1024"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" ></path></symbol><symbol id="icon-B" viewBox="0 0 1024 1024"><path d="M98.067692 65.457231H481.28c75.854769 0 132.411077 3.150769 169.668923 9.452307 37.336615 6.301538 70.656 19.534769 100.036923 39.620924 29.459692 20.007385 53.956923 46.710154 73.570462 80.029538 19.692308 33.398154 29.459692 70.734769 29.459692 112.167385 0 44.898462-12.130462 86.094769-36.233846 123.588923a224.886154 224.886154 0 0 1-98.461539 84.283077c58.368 17.092923 103.266462 46.08 134.695385 87.04 31.350154 40.96 47.025231 89.088 47.025231 144.462769 0 43.638154-10.082462 86.016-30.404923 127.212308-20.243692 41.196308-47.891692 74.043077-83.02277 98.697846-35.052308 24.654769-78.296615 39.778462-129.732923 45.449846-32.295385 3.465846-110.119385 5.671385-233.472 6.537846H98.067692V65.457231z m193.536 159.507692V446.621538h126.818462c75.460923 0 122.328615-1.024 140.603077-3.229538 33.083077-3.938462 59.155692-15.36 78.139077-34.343385 18.904615-18.904615 28.435692-43.874462 28.435692-74.830769 0-29.696-8.192-53.720615-24.497231-72.310154-16.384-18.510769-40.644923-29.696-72.940307-33.634461-19.140923-2.205538-74.279385-3.308308-165.415385-3.308308h-111.064615z m0 381.243077v256.315077h179.2c69.710769 0 113.979077-1.969231 132.726154-5.907692 28.750769-5.198769 52.145231-17.959385 70.262154-38.281847 18.116923-20.243692 27.096615-47.340308 27.096615-81.368615 0-28.750769-6.931692-53.169231-20.873846-73.255385a118.232615 118.232615 0 0 0-60.494769-43.795692c-26.387692-9.137231-83.574154-13.705846-171.638154-13.705846H291.603692z" ></path></symbol><symbol id="icon-a" viewBox="0 0 1024 1024"><path d="M757.76 665.6q0 20.48 1.536 34.304t7.68 22.016 18.944 12.288 34.304 4.096q-3.072 25.6-15.36 44.032-11.264 16.384-33.28 29.696t-62.976 13.312q-11.264 0-20.48-0.512t-17.408-2.56l-6.144-2.048-1.024 0q-4.096-1.024-10.24-4.096-2.048-2.048-4.096-2.048-1.024-1.024-2.048-1.024-14.336-8.192-23.552-17.408t-14.336-17.408q-6.144-10.24-9.216-20.48-63.488 75.776-178.176 75.776-48.128 0-88.064-15.36t-69.12-44.032-45.056-68.096-15.872-88.576 16.896-89.088 47.616-67.584 74.24-42.496 96.768-14.848q48.128 0 88.576 17.408t66.048 49.152q0-8.192 0.512-16.384t0.512-15.36q0-71.68-39.936-104.448t-128-32.768q-43.008 0-84.992 6.656t-84.992 17.92q14.336-28.672 25.088-47.616t24.064-29.184q30.72-24.576 158.72-24.576 79.872 0 135.168 13.824t90.624 43.52 51.2 75.264 15.872 108.032l0 200.704zM487.424 743.424q50.176 0 79.872-33.28t29.696-95.744q0-61.44-28.672-93.696t-76.8-32.256q-52.224 0-82.944 33.28t-30.72 94.72q0 58.368 31.744 92.672t77.824 34.304z" ></path></symbol><symbol id="icon-full" viewBox="0 0 1024 1024"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" ></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" ></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" ></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" ></path></symbol><symbol id="icon-add" viewBox="0 0 1024 1024"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" ></path></symbol><symbol id="icon-move" viewBox="0 0 1024 1024"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" ></path></symbol><symbol id="icon-living" viewBox="0 0 1024 1024"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="" ></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="" ></path></symbol></svg>', l = (l = document.getElementsByTagName("script"))[l.length - 1].getAttribute("data-injectcss");
|
|
4
4
|
if (l && !e.__iconfont__svg__cssinject__) {
|
|
5
5
|
e.__iconfont__svg__cssinject__ = !0;
|
|
6
6
|
try {
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
function d() {
|
|
14
|
-
|
|
14
|
+
s || (s = !0, o());
|
|
15
15
|
}
|
|
16
16
|
t = function() {
|
|
17
17
|
var a, u, h, p;
|
|
18
18
|
(p = document.createElement("div")).innerHTML = c, c = null, (h = p.getElementsByTagName("svg")[0]) && (h.setAttribute("aria-hidden", "true"), h.style.position = "absolute", h.style.width = 0, h.style.height = 0, h.style.overflow = "hidden", a = h, (u = document.body).firstChild ? (p = a, (h = u.firstChild).parentNode.insertBefore(p, h)) : u.appendChild(a));
|
|
19
19
|
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function() {
|
|
20
20
|
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
21
|
-
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t,
|
|
21
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (o = t, i = e.document, s = !1, (r = function() {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
i.documentElement.doScroll("left");
|
|
24
24
|
} catch {
|
|
25
25
|
return void setTimeout(r, 50);
|
|
26
26
|
}
|
|
27
27
|
d();
|
|
28
|
-
})(),
|
|
29
|
-
|
|
28
|
+
})(), i.onreadystatechange = function() {
|
|
29
|
+
i.readyState == "complete" && (i.onreadystatechange = null, d());
|
|
30
30
|
});
|
|
31
31
|
})(window);
|
|
32
32
|
const $ = 0, P = 1, ae = 2, Pe = {
|
|
@@ -57,15 +57,15 @@ const $ = 0, P = 1, ae = 2, Pe = {
|
|
|
57
57
|
"--panel-border-color": "#696969"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function ie(e) {
|
|
61
61
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const se = function(e, t) {
|
|
64
64
|
if (t.id === e)
|
|
65
65
|
return t;
|
|
66
66
|
if (t.children && t.children.length) {
|
|
67
67
|
for (let n = 0; n < t.children.length; n++) {
|
|
68
|
-
const o =
|
|
68
|
+
const o = se(e, t.children[n]);
|
|
69
69
|
if (o)
|
|
70
70
|
return o;
|
|
71
71
|
}
|
|
@@ -89,9 +89,9 @@ const nt = (e, t) => {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
function re(e, t, n, o) {
|
|
92
|
-
const
|
|
93
|
-
let r = Math.atan(Math.abs(
|
|
94
|
-
|
|
92
|
+
const i = o - t, s = e - n;
|
|
93
|
+
let r = Math.atan(Math.abs(i) / Math.abs(s)) / 3.14 * 180;
|
|
94
|
+
s < 0 && i > 0 && (r = 180 - r), s < 0 && i < 0 && (r = 180 + r), s > 0 && i < 0 && (r = 360 - r);
|
|
95
95
|
const c = 12, l = 30, d = r + l, a = r - l;
|
|
96
96
|
return {
|
|
97
97
|
x1: n + Math.cos(Math.PI * d / 180) * c,
|
|
@@ -141,13 +141,13 @@ const R = (e, t) => {
|
|
|
141
141
|
onMove(e, t) {
|
|
142
142
|
if (this.mousedown) {
|
|
143
143
|
this.moved = !0;
|
|
144
|
-
const n = e.movementX, o = e.movementY, { container:
|
|
145
|
-
let c =
|
|
144
|
+
const n = e.movementX, o = e.movementY, { container: i, map: s, scaleVal: r } = t;
|
|
145
|
+
let c = i.scrollLeft - n, l = i.scrollTop - o;
|
|
146
146
|
if (r < 1) {
|
|
147
|
-
const d = (
|
|
148
|
-
c = Math.max(d, Math.min(
|
|
147
|
+
const d = (i.scrollWidth - s.clientWidth * r) / 2, a = (i.scrollHeight - s.clientHeight * r) / 2;
|
|
148
|
+
c = Math.max(d, Math.min(i.scrollWidth - d - i.clientWidth, c)), l = Math.max(a, Math.min(i.scrollHeight - a - i.clientHeight, l));
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
i.scrollTo(c, l);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
clear() {
|
|
@@ -156,16 +156,16 @@ const R = (e, t) => {
|
|
|
156
156
|
}, 0);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
|
-
function
|
|
159
|
+
function it(e) {
|
|
160
160
|
e.map.addEventListener("click", (t) => {
|
|
161
|
-
var o,
|
|
161
|
+
var o, i;
|
|
162
162
|
if (t.button !== 0)
|
|
163
163
|
return;
|
|
164
164
|
if ((o = e.helper1) != null && o.moved) {
|
|
165
165
|
e.helper1.clear();
|
|
166
166
|
return;
|
|
167
167
|
}
|
|
168
|
-
if ((
|
|
168
|
+
if ((i = e.helper2) != null && i.moved) {
|
|
169
169
|
e.helper2.clear();
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
@@ -201,7 +201,7 @@ function st(e) {
|
|
|
201
201
|
t.button === n && k.clear();
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const st = {
|
|
205
205
|
create() {
|
|
206
206
|
return {
|
|
207
207
|
handlers: {},
|
|
@@ -239,27 +239,27 @@ const ce = document, rt = function() {
|
|
|
239
239
|
t.appendChild(e);
|
|
240
240
|
const n = this.nodeData.children || [];
|
|
241
241
|
if (this.direction === ae) {
|
|
242
|
-
let o = 0,
|
|
243
|
-
n.map((
|
|
244
|
-
|
|
242
|
+
let o = 0, i = 0;
|
|
243
|
+
n.map((s) => {
|
|
244
|
+
s.direction === $ ? o += 1 : s.direction === P ? i += 1 : o <= i ? (s.direction = $, o += 1) : (s.direction = P, i += 1);
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
ct(this, n, t);
|
|
248
248
|
}, ct = function(e, t, n) {
|
|
249
249
|
const o = ce.createElement("me-main");
|
|
250
250
|
o.className = L.LHS;
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
for (let
|
|
254
|
-
const r = t[
|
|
255
|
-
e.direction === ae ? r.direction === $ ? o.appendChild(c) :
|
|
251
|
+
const i = ce.createElement("me-main");
|
|
252
|
+
i.className = L.RHS;
|
|
253
|
+
for (let s = 0; s < t.length; s++) {
|
|
254
|
+
const r = t[s], { grp: c } = e.createWrapper(r);
|
|
255
|
+
e.direction === ae ? r.direction === $ ? o.appendChild(c) : i.appendChild(c) : e.direction === $ ? o.appendChild(c) : i.appendChild(c);
|
|
256
256
|
}
|
|
257
|
-
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(
|
|
257
|
+
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(i), e.nodes.appendChild(e.lines);
|
|
258
258
|
}, lt = function(e, t) {
|
|
259
259
|
const n = ce.createElement("me-children");
|
|
260
260
|
for (let o = 0; o < t.length; o++) {
|
|
261
|
-
const
|
|
262
|
-
n.appendChild(
|
|
261
|
+
const i = t[o], { grp: s } = e.createWrapper(i);
|
|
262
|
+
n.appendChild(s);
|
|
263
263
|
}
|
|
264
264
|
return n;
|
|
265
265
|
}, T = document, S = (e, t) => {
|
|
@@ -291,24 +291,24 @@ const ce = document, rt = function() {
|
|
|
291
291
|
e.link && (e.link = void 0);
|
|
292
292
|
if (t.icons && t.icons.length) {
|
|
293
293
|
const n = T.createElement("span");
|
|
294
|
-
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${
|
|
294
|
+
n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
|
|
295
295
|
} else
|
|
296
296
|
e.icons && (e.icons = void 0);
|
|
297
297
|
if (t.tags && t.tags.length) {
|
|
298
298
|
const n = T.createElement("div");
|
|
299
|
-
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${
|
|
299
|
+
n.className = "tags", n.innerHTML = t.tags.map((o) => `<span>${ie(o)}</span>`).join(""), e.appendChild(n), e.tags = n;
|
|
300
300
|
} else
|
|
301
301
|
e.tags && (e.tags = void 0);
|
|
302
302
|
}, at = function(e, t) {
|
|
303
|
-
const n = T.createElement("me-wrapper"), { p: o, tpc:
|
|
303
|
+
const n = T.createElement("me-wrapper"), { p: o, tpc: i } = this.createParent(e);
|
|
304
304
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
305
|
-
const
|
|
306
|
-
if (o.appendChild(
|
|
305
|
+
const s = ve(e.expanded);
|
|
306
|
+
if (o.appendChild(s), e.expanded !== !1) {
|
|
307
307
|
const r = lt(this, e.children);
|
|
308
308
|
n.appendChild(r);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
return { grp: n, top: o, tpc:
|
|
311
|
+
return { grp: n, top: o, tpc: i };
|
|
312
312
|
}, dt = function(e) {
|
|
313
313
|
const t = T.createElement("me-parent"), n = this.createTopic(e);
|
|
314
314
|
return ge(n, e), t.appendChild(n), { p: t, tpc: n };
|
|
@@ -340,22 +340,22 @@ const ft = function(e) {
|
|
|
340
340
|
border-radius:${o.borderRadius};`, this.direction === $ && (t.style.right = "0"), t.focus(), Re(t), this.bus.fire("operation", {
|
|
341
341
|
name: "beginEdit",
|
|
342
342
|
obj: e.nodeObj
|
|
343
|
-
}), t.addEventListener("keydown", (
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
347
|
-
if (
|
|
343
|
+
}), t.addEventListener("keydown", (i) => {
|
|
344
|
+
i.stopPropagation();
|
|
345
|
+
const s = i.key;
|
|
346
|
+
if (s === "Enter" || s === "Tab") {
|
|
347
|
+
if (i.shiftKey)
|
|
348
348
|
return;
|
|
349
|
-
|
|
349
|
+
i.preventDefault(), t.blur(), this.map.focus();
|
|
350
350
|
}
|
|
351
351
|
}), t.addEventListener("blur", () => {
|
|
352
352
|
var r;
|
|
353
353
|
if (!t)
|
|
354
354
|
return;
|
|
355
|
-
const
|
|
356
|
-
|
|
355
|
+
const i = e.nodeObj, s = ((r = t.textContent) == null ? void 0 : r.trim()) || "";
|
|
356
|
+
s === "" ? i.topic = n : i.topic = s, t.remove(), s !== n && (e.text.textContent = i.topic, this.linkDiv(), this.bus.fire("operation", {
|
|
357
357
|
name: "finishEdit",
|
|
358
|
-
obj:
|
|
358
|
+
obj: i,
|
|
359
359
|
origin: n
|
|
360
360
|
}));
|
|
361
361
|
});
|
|
@@ -382,27 +382,27 @@ const ft = function(e) {
|
|
|
382
382
|
fill: "none",
|
|
383
383
|
"stroke-linecap": "cap",
|
|
384
384
|
"stroke-width": "2"
|
|
385
|
-
},
|
|
386
|
-
return [e, t, n].forEach((
|
|
385
|
+
}, i = G.createElementNS(J, "g");
|
|
386
|
+
return [e, t, n].forEach((s, r) => {
|
|
387
387
|
const c = G.createElementNS(J, "path"), l = {
|
|
388
|
-
d:
|
|
388
|
+
d: s,
|
|
389
389
|
...o
|
|
390
390
|
};
|
|
391
|
-
C(c, l), r === 0 && c.setAttribute("stroke-dasharray", "8,2"),
|
|
392
|
-
}),
|
|
391
|
+
C(c, l), r === 0 && c.setAttribute("stroke-dasharray", "8,2"), i.appendChild(c);
|
|
392
|
+
}), i;
|
|
393
393
|
}, Fe = function(e, t, n) {
|
|
394
394
|
if (!t)
|
|
395
395
|
return;
|
|
396
396
|
const o = document.createElement("div");
|
|
397
397
|
e.nodes.appendChild(o);
|
|
398
|
-
const
|
|
399
|
-
o.id = "input-box", o.textContent =
|
|
400
|
-
const
|
|
398
|
+
const i = t.innerHTML;
|
|
399
|
+
o.id = "input-box", o.textContent = i, o.contentEditable = "true", o.spellcheck = !1;
|
|
400
|
+
const s = t.getBBox();
|
|
401
401
|
o.style.cssText = `
|
|
402
|
-
min-width:${Math.max(88,
|
|
402
|
+
min-width:${Math.max(88, s.width)}px;
|
|
403
403
|
position:absolute;
|
|
404
|
-
left:${
|
|
405
|
-
top:${
|
|
404
|
+
left:${s.x}px;
|
|
405
|
+
top:${s.y}px;
|
|
406
406
|
padding: 2px 4px;
|
|
407
407
|
margin: -2px -4px;
|
|
408
408
|
`, o.focus(), Re(o), o.addEventListener("keydown", (r) => {
|
|
@@ -417,12 +417,12 @@ const ft = function(e) {
|
|
|
417
417
|
o && n(o);
|
|
418
418
|
});
|
|
419
419
|
}, mt = function(e) {
|
|
420
|
-
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft,
|
|
421
|
-
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o -
|
|
420
|
+
const t = this.map.querySelector("me-root"), n = t.offsetTop, o = t.offsetLeft, i = t.offsetWidth, s = t.offsetHeight, c = this.map.querySelector("me-nodes").offsetWidth;
|
|
421
|
+
this.nodes.style.top = `${1e4 - this.nodes.offsetHeight / 2}px`, this.alignment === "root" ? this.nodes.style.left = `${1e4 - o - i / 2}px` : this.nodes.style.left = `${1e4 - c / 2}px`;
|
|
422
422
|
const l = this.map.querySelectorAll("me-main > me-wrapper");
|
|
423
423
|
this.lines.innerHTML = "";
|
|
424
424
|
for (let d = 0; d < l.length; d++) {
|
|
425
|
-
const a = l[d], u = a.querySelector("me-tpc"), { offsetLeft: h, offsetTop: p } = R(this.nodes, u), g = u.offsetWidth, v = u.offsetHeight, m = a.parentNode.className, f = this.generateMainBranch({ pT: n, pL: o, pW:
|
|
425
|
+
const a = l[d], u = a.querySelector("me-tpc"), { offsetLeft: h, offsetTop: p } = R(this.nodes, u), g = u.offsetWidth, v = u.offsetHeight, m = a.parentNode.className, f = this.generateMainBranch({ pT: n, pL: o, pW: i, pH: s, cT: p, cL: h, cW: g, cH: v, direction: m, containerHeight: this.nodes.offsetHeight }), b = this.theme.palette, x = u.nodeObj.branchColor || b[d % b.length];
|
|
426
426
|
u.style.borderColor = x, this.lines.appendChild(ze(f, x, "3"));
|
|
427
427
|
const E = a.children[0].children[1];
|
|
428
428
|
if (E && (E.style.top = (E.parentNode.offsetHeight - E.offsetHeight) / 2 + "px", m === L.LHS ? E.style.left = "-10px" : E.style.right = "-10px"), e && e !== a)
|
|
@@ -431,21 +431,21 @@ const ft = function(e) {
|
|
|
431
431
|
w.tagName === "svg" && w.remove(), a.appendChild(y), qe(this, y, x, a, m, !0);
|
|
432
432
|
}
|
|
433
433
|
this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
434
|
-
}, qe = function(e, t, n, o,
|
|
434
|
+
}, qe = function(e, t, n, o, i, s) {
|
|
435
435
|
const r = o.firstChild, c = o.children[1].children;
|
|
436
436
|
if (c.length === 0)
|
|
437
437
|
return;
|
|
438
438
|
const l = r.offsetTop, d = r.offsetLeft, a = r.offsetWidth, u = r.offsetHeight;
|
|
439
439
|
for (let h = 0; h < c.length; h++) {
|
|
440
|
-
const p = c[h], g = p.firstChild, v = g.offsetTop, m = g.offsetLeft, f = g.offsetWidth, b = g.offsetHeight, x = g.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: l, pL: d, pW: a, pH: u, cT: v, cL: m, cW: f, cH: b, direction:
|
|
440
|
+
const p = c[h], g = p.firstChild, v = g.offsetTop, m = g.offsetLeft, f = g.offsetWidth, b = g.offsetHeight, x = g.firstChild.nodeObj.branchColor || n, E = e.generateSubBranch({ pT: l, pL: d, pW: a, pH: u, cT: v, cL: m, cW: f, cH: b, direction: i, isFirst: s });
|
|
441
441
|
t.appendChild(ze(E, x, "2"));
|
|
442
442
|
const y = g.children[1];
|
|
443
443
|
if (y) {
|
|
444
|
-
if (y.style.bottom = -(y.offsetHeight / 2) + "px",
|
|
444
|
+
if (y.style.bottom = -(y.offsetHeight / 2) + "px", i === L.LHS ? y.style.left = "10px" : i === L.RHS && (y.style.right = "10px"), !y.expanded)
|
|
445
445
|
continue;
|
|
446
446
|
} else
|
|
447
447
|
continue;
|
|
448
|
-
qe(e, t, x, p,
|
|
448
|
+
qe(e, t, x, p, i);
|
|
449
449
|
}
|
|
450
450
|
}, Ne = {
|
|
451
451
|
addChild: "插入子节点",
|
|
@@ -586,8 +586,8 @@ function gt(e, t) {
|
|
|
586
586
|
return w.innerText = y, w.className = "tips", w;
|
|
587
587
|
}, o = (y, w, _) => {
|
|
588
588
|
const M = document.createElement("li");
|
|
589
|
-
return M.id = y, M.innerHTML = `<span>${
|
|
590
|
-
},
|
|
589
|
+
return M.id = y, M.innerHTML = `<span>${ie(w)}</span><span ${_ ? 'class="key"' : ""}>${ie(_)}</span>`, M;
|
|
590
|
+
}, i = Ce[e.locale] ? e.locale : "en", s = Ce[i], r = o("cm-add_child", s.addChild, "Tab"), c = o("cm-add_parent", s.addParent, "Ctrl + Enter"), l = o("cm-add_sibling", s.addSibling, "Enter"), d = o("cm-remove_child", s.removeNode, "Delete"), a = o("cm-fucus", s.focus, ""), u = o("cm-unfucus", s.cancelFocus, ""), h = o("cm-up", s.moveUp, "PgUp"), p = o("cm-down", s.moveDown, "Pgdn"), g = o("cm-link", s.link, ""), v = o("cm-link-bidirectional", "Bidreactional Link", ""), m = o("cm-summary", s.summary, ""), f = document.createElement("ul");
|
|
591
591
|
if (f.className = "menu-list", f.appendChild(r), f.appendChild(c), f.appendChild(l), f.appendChild(d), (!t || t.focus) && (f.appendChild(a), f.appendChild(u)), f.appendChild(h), f.appendChild(p), f.appendChild(m), (!t || t.link) && (f.appendChild(g), f.appendChild(v)), t && t.extend)
|
|
592
592
|
for (let y = 0; y < t.extend.length; y++) {
|
|
593
593
|
const w = t.extend[y], _ = o(w.name, w.name, w.key || "");
|
|
@@ -628,7 +628,7 @@ function gt(e, t) {
|
|
|
628
628
|
};
|
|
629
629
|
const E = (y) => {
|
|
630
630
|
b.hidden = !0;
|
|
631
|
-
const w = e.currentNode, _ = n(
|
|
631
|
+
const w = e.currentNode, _ = n(s.clickTips);
|
|
632
632
|
e.container.appendChild(_), e.map.addEventListener(
|
|
633
633
|
"click",
|
|
634
634
|
(M) => {
|
|
@@ -668,19 +668,19 @@ const vt = (e) => {
|
|
|
668
668
|
e.selectNode(o);
|
|
669
669
|
}
|
|
670
670
|
}, Se = function(e, t) {
|
|
671
|
-
var
|
|
672
|
-
const n = e.currentNode || ((
|
|
671
|
+
var s, r;
|
|
672
|
+
const n = e.currentNode || ((s = e.currentNodes) == null ? void 0 : s[0]);
|
|
673
673
|
if (!n)
|
|
674
674
|
return;
|
|
675
|
-
const o = n.nodeObj,
|
|
676
|
-
o.parent ?
|
|
675
|
+
const o = n.nodeObj, i = n.offsetParent.offsetParent.parentElement;
|
|
676
|
+
o.parent ? i.className === t ? wt(e, n) : (r = o.parent) != null && r.parent ? xt(e, n) : yt(e) : t === L.LHS ? vt(e) : bt(e);
|
|
677
677
|
}, _e = function(e, t) {
|
|
678
678
|
var r;
|
|
679
679
|
const n = e.currentNode || ((r = e.currentNodes) == null ? void 0 : r[0]);
|
|
680
680
|
if (!n || !n.nodeObj.parent)
|
|
681
681
|
return;
|
|
682
|
-
const
|
|
683
|
-
|
|
682
|
+
const i = t + "Sibling", s = n.parentElement.parentElement[i];
|
|
683
|
+
s && e.selectNode(s.firstChild.firstChild);
|
|
684
684
|
}, ee = function(e, t, n = 1) {
|
|
685
685
|
switch (t) {
|
|
686
686
|
case "in":
|
|
@@ -760,13 +760,13 @@ function Et(e) {
|
|
|
760
760
|
e.map.onkeydown = (o) => {
|
|
761
761
|
if (o.preventDefault(), !e.editable || o.target !== o.currentTarget)
|
|
762
762
|
return;
|
|
763
|
-
const
|
|
764
|
-
|
|
763
|
+
const i = n[o.key];
|
|
764
|
+
i && i(o);
|
|
765
765
|
}, e.map.onwheel = (o) => {
|
|
766
766
|
if (o.ctrlKey || o.metaKey) {
|
|
767
767
|
o.preventDefault();
|
|
768
|
-
const
|
|
769
|
-
o.deltaY < 0 ? ee(e, "in",
|
|
768
|
+
const i = Math.abs(o.deltaY / 100);
|
|
769
|
+
o.deltaY < 0 ? ee(e, "in", i) : e.scaleVal - 0.2 > 0 && ee(e, "out", i), o.stopPropagation();
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
772
|
}
|
|
@@ -795,7 +795,7 @@ const ue = document, Nt = function(e, t) {
|
|
|
795
795
|
};
|
|
796
796
|
function St(e) {
|
|
797
797
|
let t = null, n = null, o = null;
|
|
798
|
-
const
|
|
798
|
+
const i = Ct(e), s = 12;
|
|
799
799
|
e.map.addEventListener("dragstart", (r) => {
|
|
800
800
|
var l, d;
|
|
801
801
|
const c = r.target;
|
|
@@ -803,10 +803,10 @@ function St(e) {
|
|
|
803
803
|
r.preventDefault();
|
|
804
804
|
return;
|
|
805
805
|
}
|
|
806
|
-
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes,
|
|
806
|
+
(l = e.currentNodes) != null && l.includes(c) || (e.unselectNodes(), e.selectNode(c)), e.currentNodes ? (t = e.currentNodes, i.innerHTML = e.currentNodes.length + " nodes") : (t = [c], i.innerHTML = c.innerHTML);
|
|
807
807
|
for (const a of t)
|
|
808
808
|
a.parentElement.parentElement.style.opacity = "0.5";
|
|
809
|
-
(d = r.dataTransfer) == null || d.setDragImage(
|
|
809
|
+
(d = r.dataTransfer) == null || d.setDragImage(i, 0, 0), k.clear();
|
|
810
810
|
}), e.map.addEventListener("dragend", async (r) => {
|
|
811
811
|
if (!t)
|
|
812
812
|
return;
|
|
@@ -820,13 +820,13 @@ function St(e) {
|
|
|
820
820
|
if (!t)
|
|
821
821
|
return;
|
|
822
822
|
fe(o);
|
|
823
|
-
const c = ue.elementFromPoint(r.clientX, r.clientY -
|
|
823
|
+
const c = ue.elementFromPoint(r.clientX, r.clientY - s);
|
|
824
824
|
if (Le(c, t)) {
|
|
825
825
|
o = c;
|
|
826
826
|
const l = c.getBoundingClientRect().y;
|
|
827
827
|
r.clientY > l + c.clientHeight ? n = "after" : n = "in";
|
|
828
828
|
} else {
|
|
829
|
-
const l = ue.elementFromPoint(r.clientX, r.clientY +
|
|
829
|
+
const l = ue.elementFromPoint(r.clientX, r.clientY + s);
|
|
830
830
|
if (Le(l, t)) {
|
|
831
831
|
o = l;
|
|
832
832
|
const d = l.getBoundingClientRect().y;
|
|
@@ -855,18 +855,18 @@ const _t = function(e) {
|
|
|
855
855
|
};
|
|
856
856
|
function Lt(e) {
|
|
857
857
|
let t = [], n = -1, o = e.getData();
|
|
858
|
-
e.bus.addListener("operation", (
|
|
859
|
-
if (
|
|
858
|
+
e.bus.addListener("operation", (i) => {
|
|
859
|
+
if (i.name === "beginEdit")
|
|
860
860
|
return;
|
|
861
861
|
t = t.slice(0, n + 1);
|
|
862
|
-
const
|
|
863
|
-
t.push({ prev: o, currentObject: _t(
|
|
862
|
+
const s = e.getData();
|
|
863
|
+
t.push({ prev: o, currentObject: _t(i), next: s }), o = s, n = t.length - 1;
|
|
864
864
|
}), e.undo = function() {
|
|
865
865
|
if (n > -1) {
|
|
866
|
-
const
|
|
867
|
-
o =
|
|
866
|
+
const i = t[n];
|
|
867
|
+
o = i.prev, e.refresh(i.prev);
|
|
868
868
|
try {
|
|
869
|
-
|
|
869
|
+
i.currentObject.type === "node" ? e.selectNode(S(i.currentObject.value)) : i.currentObject.type === "nodes" && e.selectNodes(i.currentObject.value.map((s) => S(s)));
|
|
870
870
|
} catch {
|
|
871
871
|
} finally {
|
|
872
872
|
n--;
|
|
@@ -875,11 +875,11 @@ function Lt(e) {
|
|
|
875
875
|
}, e.redo = function() {
|
|
876
876
|
if (n < t.length - 1) {
|
|
877
877
|
n++;
|
|
878
|
-
const
|
|
879
|
-
o =
|
|
878
|
+
const i = t[n];
|
|
879
|
+
o = i.next, e.refresh(i.next), i.currentObject.type === "node" ? e.selectNode(S(i.currentObject.value)) : i.currentObject.type === "nodes" && e.selectNodes(i.currentObject.value.map((s) => S(s)));
|
|
880
880
|
}
|
|
881
|
-
}, e.map.addEventListener("keydown", (
|
|
882
|
-
(
|
|
881
|
+
}, e.map.addEventListener("keydown", (i) => {
|
|
882
|
+
(i.metaKey || i.ctrlKey) && (i.shiftKey && i.key === "Z" || i.key === "y") ? e.redo() : (i.metaKey || i.ctrlKey) && i.key === "z" && e.undo();
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
const q = (e, t) => {
|
|
@@ -889,24 +889,24 @@ const q = (e, t) => {
|
|
|
889
889
|
</svg>`, n;
|
|
890
890
|
};
|
|
891
891
|
function Mt(e) {
|
|
892
|
-
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"),
|
|
893
|
-
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
892
|
+
const t = document.createElement("div"), n = q("fullscreen", "full"), o = q("toCenter", "living"), i = q("zoomout", "move"), s = q("zoomin", "add"), r = document.createElement("span");
|
|
893
|
+
return r.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(i), t.appendChild(s), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
894
894
|
e.mindElixirBox.requestFullscreen();
|
|
895
895
|
}, o.onclick = () => {
|
|
896
896
|
e.toCenter();
|
|
897
|
-
}, s.onclick = () => {
|
|
898
|
-
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
899
897
|
}, i.onclick = () => {
|
|
898
|
+
e.scaleVal < 0.6 || e.scale(e.scaleVal - 0.2);
|
|
899
|
+
}, s.onclick = () => {
|
|
900
900
|
e.scaleVal > 1.6 || e.scale(e.scaleVal + 0.2);
|
|
901
901
|
}, t;
|
|
902
902
|
}
|
|
903
903
|
function kt(e) {
|
|
904
|
-
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"),
|
|
905
|
-
return t.appendChild(n), t.appendChild(o), t.appendChild(
|
|
904
|
+
const t = document.createElement("div"), n = q("tbltl", "left"), o = q("tbltr", "right"), i = q("tblts", "side");
|
|
905
|
+
return t.appendChild(n), t.appendChild(o), t.appendChild(i), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
906
906
|
e.initLeft();
|
|
907
907
|
}, o.onclick = () => {
|
|
908
908
|
e.initRight();
|
|
909
|
-
},
|
|
909
|
+
}, i.onclick = () => {
|
|
910
910
|
e.initSide();
|
|
911
911
|
}, t;
|
|
912
912
|
}
|
|
@@ -929,8 +929,8 @@ class jt {
|
|
|
929
929
|
}
|
|
930
930
|
dispatchEvent(t, ...n) {
|
|
931
931
|
let o = !0;
|
|
932
|
-
for (const
|
|
933
|
-
o =
|
|
932
|
+
for (const i of this._listeners.get(t) ?? [])
|
|
933
|
+
o = i(...n) !== !1 && o;
|
|
934
934
|
return o;
|
|
935
935
|
}
|
|
936
936
|
unbindAllListeners() {
|
|
@@ -940,28 +940,28 @@ class jt {
|
|
|
940
940
|
const Me = (e, t = "px") => typeof e == "number" ? e + t : e;
|
|
941
941
|
function O({ style: e }, t, n) {
|
|
942
942
|
if (typeof t == "object")
|
|
943
|
-
for (const [o,
|
|
944
|
-
|
|
943
|
+
for (const [o, i] of Object.entries(t))
|
|
944
|
+
i !== void 0 && (e[o] = Me(i));
|
|
945
945
|
else
|
|
946
946
|
n !== void 0 && (e[t] = Me(n));
|
|
947
947
|
}
|
|
948
|
-
const Ve = (e) => (t, n, o,
|
|
948
|
+
const Ve = (e) => (t, n, o, i = {}) => {
|
|
949
949
|
t instanceof HTMLCollection || t instanceof NodeList ? t = Array.from(t) : Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
950
|
-
for (const
|
|
951
|
-
if (
|
|
950
|
+
for (const s of t)
|
|
951
|
+
if (s)
|
|
952
952
|
for (const r of n)
|
|
953
|
-
|
|
954
|
-
return [t, n, o,
|
|
953
|
+
s[e](r, o, { capture: !1, ...i });
|
|
954
|
+
return [t, n, o, i];
|
|
955
955
|
}, V = Ve("addEventListener"), H = Ve("removeEventListener"), te = (e) => {
|
|
956
956
|
var t;
|
|
957
|
-
const { clientX: n, clientY: o, target:
|
|
958
|
-
return { x: n, y: o, target:
|
|
957
|
+
const { clientX: n, clientY: o, target: i } = ((t = e.touches) == null ? void 0 : t[0]) ?? e;
|
|
958
|
+
return { x: n, y: o, target: i };
|
|
959
959
|
};
|
|
960
960
|
function ke(e, t, n = "touch") {
|
|
961
961
|
switch (n) {
|
|
962
962
|
case "center": {
|
|
963
|
-
const o = t.left + t.width / 2,
|
|
964
|
-
return o >= e.left && o <= e.right &&
|
|
963
|
+
const o = t.left + t.width / 2, i = t.top + t.height / 2;
|
|
964
|
+
return o >= e.left && o <= e.right && i >= e.top && i <= e.bottom;
|
|
965
965
|
}
|
|
966
966
|
case "cover":
|
|
967
967
|
return t.left >= e.left && t.top >= e.top && t.right <= e.right && t.bottom <= e.bottom;
|
|
@@ -969,11 +969,11 @@ function ke(e, t, n = "touch") {
|
|
|
969
969
|
return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function W(e, t = document) {
|
|
973
973
|
const n = Array.isArray(e) ? e : [e];
|
|
974
974
|
let o = [];
|
|
975
|
-
for (let
|
|
976
|
-
const r = n[
|
|
975
|
+
for (let i = 0, s = n.length; i < s; i++) {
|
|
976
|
+
const r = n[i];
|
|
977
977
|
typeof r == "string" ? o = o.concat(Array.from(t.querySelectorAll(r))) : r instanceof Element && o.push(r);
|
|
978
978
|
}
|
|
979
979
|
return o;
|
|
@@ -981,8 +981,8 @@ function I(e, t = document) {
|
|
|
981
981
|
const Dt = () => matchMedia("(hover: none), (pointer: coarse)").matches, Ot = () => "safari" in window, Ht = (e) => {
|
|
982
982
|
let t, n = -1, o = !1;
|
|
983
983
|
return {
|
|
984
|
-
next(...
|
|
985
|
-
t =
|
|
984
|
+
next(...i) {
|
|
985
|
+
t = i, o || (o = !0, n = requestAnimationFrame(() => {
|
|
986
986
|
e(...t), o = !1;
|
|
987
987
|
}));
|
|
988
988
|
},
|
|
@@ -996,8 +996,8 @@ function Pt(e, t) {
|
|
|
996
996
|
if (typeof n == "number")
|
|
997
997
|
return e.button === n;
|
|
998
998
|
if (typeof n == "object") {
|
|
999
|
-
const o = n.button === e.button,
|
|
1000
|
-
switch (
|
|
999
|
+
const o = n.button === e.button, i = n.modifiers.every((s) => {
|
|
1000
|
+
switch (s) {
|
|
1001
1001
|
case "alt":
|
|
1002
1002
|
return e.altKey;
|
|
1003
1003
|
case "ctrl":
|
|
@@ -1006,15 +1006,15 @@ function Pt(e, t) {
|
|
|
1006
1006
|
return e.shiftKey;
|
|
1007
1007
|
}
|
|
1008
1008
|
});
|
|
1009
|
-
return o &&
|
|
1009
|
+
return o && i;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
return !1;
|
|
1013
1013
|
}
|
|
1014
1014
|
const { abs: F, max: Te, min: Ae, ceil: $e } = Math;
|
|
1015
|
-
class
|
|
1015
|
+
class We extends jt {
|
|
1016
1016
|
constructor(t) {
|
|
1017
|
-
var n, o,
|
|
1017
|
+
var n, o, i, s, r;
|
|
1018
1018
|
super(), N(this, "_options"), N(this, "_selection", {
|
|
1019
1019
|
stored: [],
|
|
1020
1020
|
selected: [],
|
|
@@ -1047,7 +1047,7 @@ class Ie extends jt {
|
|
|
1047
1047
|
startScrollMargins: {
|
|
1048
1048
|
x: 0,
|
|
1049
1049
|
y: 0,
|
|
1050
|
-
...(
|
|
1050
|
+
...(s = (i = t.behaviour) == null ? void 0 : i.scrolling) == null ? void 0 : s.startScrollMargins
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
},
|
|
@@ -1082,80 +1082,80 @@ class Ie extends jt {
|
|
|
1082
1082
|
}), this.enable();
|
|
1083
1083
|
}
|
|
1084
1084
|
_bindStartEvents(t = !0) {
|
|
1085
|
-
const { document: n, features: o } = this._options,
|
|
1086
|
-
|
|
1085
|
+
const { document: n, features: o } = this._options, i = t ? V : H;
|
|
1086
|
+
i(n, "mousedown", this._onTapStart), o.touch && i(n, "touchstart", this._onTapStart, {
|
|
1087
1087
|
passive: !1
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
_onTapStart(t, n = !1) {
|
|
1091
|
-
const { x: o, y:
|
|
1091
|
+
const { x: o, y: i, target: s } = te(t), { _options: r } = this, { document: c } = this._options, l = s.getBoundingClientRect();
|
|
1092
1092
|
if (t instanceof MouseEvent && !Pt(t, r.behaviour.triggers))
|
|
1093
1093
|
return;
|
|
1094
|
-
const d =
|
|
1094
|
+
const d = W(r.startAreas, r.document), a = W(r.boundaries, r.document);
|
|
1095
1095
|
this._targetElement = a.find(
|
|
1096
1096
|
(p) => ke(p.getBoundingClientRect(), l)
|
|
1097
1097
|
);
|
|
1098
1098
|
const u = t.composedPath();
|
|
1099
1099
|
if (!this._targetElement || !d.find((p) => u.includes(p)) || !a.find((p) => u.includes(p)) || !n && this._emitEvent("beforestart", t) === !1)
|
|
1100
1100
|
return;
|
|
1101
|
-
this._areaLocation = { x1: o, y1:
|
|
1101
|
+
this._areaLocation = { x1: o, y1: i, x2: 0, y2: 0 };
|
|
1102
1102
|
const h = c.scrollingElement ?? c.body;
|
|
1103
1103
|
this._scrollDelta = { x: h.scrollLeft, y: h.scrollTop }, this._singleClick = !0, this.clearSelection(!1, !0), V(c, ["touchmove", "mousemove"], this._delayedTapMove, { passive: !1 }), V(c, ["mouseup", "touchcancel", "touchend"], this._onTapStop), V(c, "scroll", this._onScroll);
|
|
1104
1104
|
}
|
|
1105
1105
|
_onSingleTap(t) {
|
|
1106
|
-
const { singleTap: { intersect: n }, range: o } = this._options.features,
|
|
1107
|
-
let
|
|
1106
|
+
const { singleTap: { intersect: n }, range: o } = this._options.features, i = te(t);
|
|
1107
|
+
let s;
|
|
1108
1108
|
if (n === "native")
|
|
1109
|
-
|
|
1109
|
+
s = i.target;
|
|
1110
1110
|
else if (n === "touch") {
|
|
1111
1111
|
this.resolveSelectables();
|
|
1112
|
-
const { x: c, y: l } =
|
|
1113
|
-
|
|
1112
|
+
const { x: c, y: l } = i;
|
|
1113
|
+
s = this._selectables.find((d) => {
|
|
1114
1114
|
const { right: a, left: u, top: h, bottom: p } = d.getBoundingClientRect();
|
|
1115
1115
|
return c < a && c > u && l < p && l > h;
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
|
-
if (!
|
|
1118
|
+
if (!s)
|
|
1119
1119
|
return;
|
|
1120
|
-
for (this.resolveSelectables(); !this._selectables.includes(
|
|
1121
|
-
if (!
|
|
1120
|
+
for (this.resolveSelectables(); !this._selectables.includes(s); ) {
|
|
1121
|
+
if (!s.parentElement)
|
|
1122
1122
|
return;
|
|
1123
|
-
|
|
1123
|
+
s = s.parentElement;
|
|
1124
1124
|
}
|
|
1125
1125
|
const { stored: r } = this._selection;
|
|
1126
1126
|
if (this._emitEvent("start", t), t.shiftKey && o && this._latestElement) {
|
|
1127
|
-
const c = this._latestElement, [l, d] = c.compareDocumentPosition(
|
|
1127
|
+
const c = this._latestElement, [l, d] = c.compareDocumentPosition(s) & 4 ? [s, c] : [c, s], a = [...this._selectables.filter(
|
|
1128
1128
|
(u) => u.compareDocumentPosition(l) & 4 && u.compareDocumentPosition(d) & 2
|
|
1129
1129
|
), l, d];
|
|
1130
1130
|
this.select(a), this._latestElement = c;
|
|
1131
1131
|
} else
|
|
1132
|
-
r.includes(
|
|
1132
|
+
r.includes(s) && (r.length === 1 || t.ctrlKey || r.every((c) => this._selection.stored.includes(c))) ? this.deselect(s) : (this.select(s), this._latestElement = s);
|
|
1133
1133
|
}
|
|
1134
1134
|
_delayedTapMove(t) {
|
|
1135
|
-
const { container: n, document: o, behaviour: { startThreshold:
|
|
1135
|
+
const { container: n, document: o, behaviour: { startThreshold: i } } = this._options, { x1: s, y1: r } = this._areaLocation, { x: c, y: l } = te(t);
|
|
1136
1136
|
if (
|
|
1137
1137
|
// Single number for both coordinates
|
|
1138
|
-
typeof
|
|
1139
|
-
typeof
|
|
1138
|
+
typeof i == "number" && F(c + l - (s + r)) >= i || // Different x and y threshold
|
|
1139
|
+
typeof i == "object" && F(c - s) >= i.x || F(l - r) >= i.y
|
|
1140
1140
|
) {
|
|
1141
1141
|
if (H(o, ["mousemove", "touchmove"], this._delayedTapMove, { passive: !1 }), this._emitEvent("beforedrag", t) === !1) {
|
|
1142
1142
|
H(o, ["mouseup", "touchcancel", "touchend"], this._onTapStop);
|
|
1143
1143
|
return;
|
|
1144
1144
|
}
|
|
1145
|
-
V(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"),
|
|
1145
|
+
V(o, ["mousemove", "touchmove"], this._onTapMove, { passive: !1 }), O(this._area, "display", "block"), W(n, o)[0].appendChild(this._clippingElement), this.resolveSelectables(), this._singleClick = !1, this._targetRect = this._targetElement.getBoundingClientRect(), this._scrollAvailable = this._targetElement.scrollHeight !== this._targetElement.clientHeight || this._targetElement.scrollWidth !== this._targetElement.clientWidth, this._scrollAvailable && (V(this._targetElement, "wheel", this._manualScroll, { passive: !1 }), this._selectables = this._selectables.filter((d) => this._targetElement.contains(d))), this._setupSelectionArea(), this._emitEvent("start", t), this._onTapMove(t);
|
|
1146
1146
|
}
|
|
1147
1147
|
this._handleMoveEvent(t);
|
|
1148
1148
|
}
|
|
1149
1149
|
_setupSelectionArea() {
|
|
1150
|
-
const { _clippingElement: t, _targetElement: n, _area: o } = this,
|
|
1150
|
+
const { _clippingElement: t, _targetElement: n, _area: o } = this, i = this._targetRect = n.getBoundingClientRect();
|
|
1151
1151
|
this._scrollAvailable ? (O(t, {
|
|
1152
|
-
top:
|
|
1153
|
-
left:
|
|
1154
|
-
width:
|
|
1155
|
-
height:
|
|
1152
|
+
top: i.top,
|
|
1153
|
+
left: i.left,
|
|
1154
|
+
width: i.width,
|
|
1155
|
+
height: i.height
|
|
1156
1156
|
}), O(o, {
|
|
1157
|
-
marginTop: -
|
|
1158
|
-
marginLeft: -
|
|
1157
|
+
marginTop: -i.top,
|
|
1158
|
+
marginLeft: -i.left
|
|
1159
1159
|
})) : (O(t, {
|
|
1160
1160
|
top: 0,
|
|
1161
1161
|
left: 0,
|
|
@@ -1167,16 +1167,16 @@ class Ie extends jt {
|
|
|
1167
1167
|
}));
|
|
1168
1168
|
}
|
|
1169
1169
|
_onTapMove(t) {
|
|
1170
|
-
const { x: n, y: o } = te(t), { _scrollSpeed:
|
|
1171
|
-
if (
|
|
1170
|
+
const { x: n, y: o } = te(t), { _scrollSpeed: i, _areaLocation: s, _options: r, _frame: c } = this, { speedDivider: l } = r.behaviour.scrolling, d = this._targetElement;
|
|
1171
|
+
if (s.x2 = n, s.y2 = o, this._scrollAvailable && !this._scrollingActive && (i.y || i.x)) {
|
|
1172
1172
|
this._scrollingActive = !0;
|
|
1173
1173
|
const a = () => {
|
|
1174
|
-
if (!
|
|
1174
|
+
if (!i.x && !i.y) {
|
|
1175
1175
|
this._scrollingActive = !1;
|
|
1176
1176
|
return;
|
|
1177
1177
|
}
|
|
1178
1178
|
const { scrollTop: u, scrollLeft: h } = d;
|
|
1179
|
-
|
|
1179
|
+
i.y && (d.scrollTop += $e(i.y / l), s.y1 -= d.scrollTop - u), i.x && (d.scrollLeft += $e(i.x / l), s.x1 -= d.scrollLeft - h), c.next(t), requestAnimationFrame(a);
|
|
1180
1180
|
};
|
|
1181
1181
|
requestAnimationFrame(a);
|
|
1182
1182
|
} else
|
|
@@ -1188,38 +1188,38 @@ class Ie extends jt {
|
|
|
1188
1188
|
(n.touch && Dt() || this._scrollAvailable && Ot()) && t.preventDefault();
|
|
1189
1189
|
}
|
|
1190
1190
|
_onScroll() {
|
|
1191
|
-
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft:
|
|
1192
|
-
this._areaLocation.x1 += t.x -
|
|
1191
|
+
const { _scrollDelta: t, _options: { document: n } } = this, { scrollTop: o, scrollLeft: i } = n.scrollingElement ?? n.body;
|
|
1192
|
+
this._areaLocation.x1 += t.x - i, this._areaLocation.y1 += t.y - o, t.x = i, t.y = o, this._setupSelectionArea(), this._frame.next(null);
|
|
1193
1193
|
}
|
|
1194
1194
|
_manualScroll(t) {
|
|
1195
|
-
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0,
|
|
1196
|
-
this._scrollSpeed.y += o * n, this._scrollSpeed.x +=
|
|
1195
|
+
const { manualSpeed: n } = this._options.behaviour.scrolling, o = t.deltaY ? t.deltaY > 0 ? 1 : -1 : 0, i = t.deltaX ? t.deltaX > 0 ? 1 : -1 : 0;
|
|
1196
|
+
this._scrollSpeed.y += o * n, this._scrollSpeed.x += i * n, this._onTapMove(t), t.preventDefault();
|
|
1197
1197
|
}
|
|
1198
1198
|
_recalculateSelectionAreaRect() {
|
|
1199
|
-
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement:
|
|
1199
|
+
const { _scrollSpeed: t, _areaLocation: n, _areaRect: o, _targetElement: i, _options: s } = this, { scrollTop: r, scrollHeight: c, clientHeight: l, scrollLeft: d, scrollWidth: a, clientWidth: u } = i, h = this._targetRect, { x1: p, y1: g } = n;
|
|
1200
1200
|
let { x2: v, y2: m } = n;
|
|
1201
|
-
const { behaviour: { scrolling: { startScrollMargins: f } } } =
|
|
1201
|
+
const { behaviour: { scrolling: { startScrollMargins: f } } } = s;
|
|
1202
1202
|
v < h.left + f.x ? (t.x = d ? -F(h.left - v + f.x) : 0, v = v < h.left ? h.left : v) : v > h.right - f.x ? (t.x = a - d - u ? F(h.left + h.width - v - f.x) : 0, v = v > h.right ? h.right : v) : t.x = 0, m < h.top + f.y ? (t.y = r ? -F(h.top - m + f.y) : 0, m = m < h.top ? h.top : m) : m > h.bottom - f.y ? (t.y = c - r - l ? F(h.top + h.height - m - f.y) : 0, m = m > h.bottom ? h.bottom : m) : t.y = 0;
|
|
1203
1203
|
const b = Ae(p, v), x = Ae(g, m), E = Te(p, v), y = Te(g, m);
|
|
1204
1204
|
o.x = b, o.y = x, o.width = E - b, o.height = y - x;
|
|
1205
1205
|
}
|
|
1206
1206
|
_redrawSelectionArea() {
|
|
1207
|
-
const { x: t, y: n, width: o, height:
|
|
1208
|
-
|
|
1207
|
+
const { x: t, y: n, width: o, height: i } = this._areaRect, { style: s } = this._area;
|
|
1208
|
+
s.left = `${t}px`, s.top = `${n}px`, s.width = `${o}px`, s.height = `${i}px`;
|
|
1209
1209
|
}
|
|
1210
1210
|
_onTapStop(t, n) {
|
|
1211
1211
|
var o;
|
|
1212
|
-
const { document:
|
|
1213
|
-
H(
|
|
1212
|
+
const { document: i, features: s } = this._options, { _singleClick: r } = this;
|
|
1213
|
+
H(i, ["mousemove", "touchmove"], this._delayedTapMove), H(i, ["touchmove", "mousemove"], this._onTapMove), H(i, ["mouseup", "touchcancel", "touchend"], this._onTapStop), H(i, "scroll", this._onScroll), this._keepSelection(), t && r && s.singleTap.allow ? this._onSingleTap(t) : !r && !n && (this._updateElementSelection(), this._emitEvent("stop", t)), this._scrollSpeed.x = 0, this._scrollSpeed.y = 0, H(this._targetElement, "wheel", this._manualScroll, { passive: !0 }), this._clippingElement.remove(), (o = this._frame) == null || o.cancel(), O(this._area, "display", "none");
|
|
1214
1214
|
}
|
|
1215
1215
|
_updateElementSelection() {
|
|
1216
|
-
const { _selectables: t, _options: n, _selection: o, _areaRect:
|
|
1216
|
+
const { _selectables: t, _options: n, _selection: o, _areaRect: i } = this, { stored: s, selected: r, touched: c } = o, { intersect: l, overlap: d } = n.behaviour, a = d === "invert", u = [], h = [], p = [];
|
|
1217
1217
|
for (let v = 0; v < t.length; v++) {
|
|
1218
1218
|
const m = t[v];
|
|
1219
|
-
if (ke(
|
|
1219
|
+
if (ke(i, m.getBoundingClientRect(), l)) {
|
|
1220
1220
|
if (r.includes(m))
|
|
1221
|
-
|
|
1222
|
-
else if (a &&
|
|
1221
|
+
s.includes(m) && !c.includes(m) && c.push(m);
|
|
1222
|
+
else if (a && s.includes(m)) {
|
|
1223
1223
|
p.push(m);
|
|
1224
1224
|
continue;
|
|
1225
1225
|
} else
|
|
@@ -1227,13 +1227,13 @@ class Ie extends jt {
|
|
|
1227
1227
|
u.push(m);
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
a && h.push(...
|
|
1230
|
+
a && h.push(...s.filter((v) => !r.includes(v)));
|
|
1231
1231
|
const g = d === "keep";
|
|
1232
1232
|
for (let v = 0; v < r.length; v++) {
|
|
1233
1233
|
const m = r[v];
|
|
1234
1234
|
!u.includes(m) && !// Check if user wants to keep previously selected elements, e.g.
|
|
1235
1235
|
// not make them part of the current selection as soon as they're touched.
|
|
1236
|
-
(g &&
|
|
1236
|
+
(g && s.includes(m)) && p.push(m);
|
|
1237
1237
|
}
|
|
1238
1238
|
o.selected = u, o.changed = { added: h, removed: p }, this._latestElement = void 0;
|
|
1239
1239
|
}
|
|
@@ -1245,12 +1245,12 @@ class Ie extends jt {
|
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
1247
|
_keepSelection() {
|
|
1248
|
-
const { _options: t, _selection: n } = this, { selected: o, changed:
|
|
1248
|
+
const { _options: t, _selection: n } = this, { selected: o, changed: i, touched: s, stored: r } = n, c = o.filter((l) => !r.includes(l));
|
|
1249
1249
|
switch (t.behaviour.overlap) {
|
|
1250
1250
|
case "drop": {
|
|
1251
1251
|
n.stored = [
|
|
1252
1252
|
...c,
|
|
1253
|
-
...r.filter((l) => !
|
|
1253
|
+
...r.filter((l) => !s.includes(l))
|
|
1254
1254
|
// Elements not touched
|
|
1255
1255
|
];
|
|
1256
1256
|
break;
|
|
@@ -1258,7 +1258,7 @@ class Ie extends jt {
|
|
|
1258
1258
|
case "invert": {
|
|
1259
1259
|
n.stored = [
|
|
1260
1260
|
...c,
|
|
1261
|
-
...r.filter((l) => !
|
|
1261
|
+
...r.filter((l) => !i.removed.includes(l))
|
|
1262
1262
|
// Elements not removed from selection
|
|
1263
1263
|
];
|
|
1264
1264
|
break;
|
|
@@ -1286,7 +1286,7 @@ class Ie extends jt {
|
|
|
1286
1286
|
* Will update everything which can be selected.
|
|
1287
1287
|
*/
|
|
1288
1288
|
resolveSelectables() {
|
|
1289
|
-
this._selectables =
|
|
1289
|
+
this._selectables = W(this._options.selectables, this._options.document);
|
|
1290
1290
|
}
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Same as deselect, but for all elements currently selected.
|
|
@@ -1294,12 +1294,12 @@ class Ie extends jt {
|
|
|
1294
1294
|
* @param quiet If move / stop events should be fired
|
|
1295
1295
|
*/
|
|
1296
1296
|
clearSelection(t = !0, n = !1) {
|
|
1297
|
-
const { selected: o, stored:
|
|
1298
|
-
|
|
1297
|
+
const { selected: o, stored: i, changed: s } = this._selection;
|
|
1298
|
+
s.added = [], s.removed.push(
|
|
1299
1299
|
...o,
|
|
1300
|
-
...t ?
|
|
1300
|
+
...t ? i : []
|
|
1301
1301
|
), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = {
|
|
1302
|
-
stored: t ? [] :
|
|
1302
|
+
stored: t ? [] : i,
|
|
1303
1303
|
selected: [],
|
|
1304
1304
|
touched: [],
|
|
1305
1305
|
changed: { added: [], removed: [] }
|
|
@@ -1336,10 +1336,10 @@ class Ie extends jt {
|
|
|
1336
1336
|
* @param quiet - If this should not trigger the move event
|
|
1337
1337
|
*/
|
|
1338
1338
|
select(t, n = !1) {
|
|
1339
|
-
const { changed: o, selected:
|
|
1340
|
-
(c) => !
|
|
1339
|
+
const { changed: o, selected: i, stored: s } = this._selection, r = W(t, this._options.document).filter(
|
|
1340
|
+
(c) => !i.includes(c) && !s.includes(c)
|
|
1341
1341
|
);
|
|
1342
|
-
return
|
|
1342
|
+
return s.push(...r), i.push(...r), o.added.push(...r), o.removed = [], this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)), r;
|
|
1343
1343
|
}
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Removes a particular element from the selection.
|
|
@@ -1347,17 +1347,17 @@ class Ie extends jt {
|
|
|
1347
1347
|
* @param quiet - If this should not trigger the move event
|
|
1348
1348
|
*/
|
|
1349
1349
|
deselect(t, n = !1) {
|
|
1350
|
-
const { selected: o, stored:
|
|
1351
|
-
(c) => o.includes(c) ||
|
|
1350
|
+
const { selected: o, stored: i, changed: s } = this._selection, r = W(t, this._options.document).filter(
|
|
1351
|
+
(c) => o.includes(c) || i.includes(c)
|
|
1352
1352
|
);
|
|
1353
|
-
r.length && (this._selection.stored =
|
|
1354
|
-
...r.filter((c) => !
|
|
1353
|
+
r.length && (this._selection.stored = i.filter((c) => !r.includes(c)), this._selection.selected = o.filter((c) => !r.includes(c)), this._selection.changed.added = [], this._selection.changed.removed.push(
|
|
1354
|
+
...r.filter((c) => !s.removed.includes(c))
|
|
1355
1355
|
), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
|
-
N(
|
|
1358
|
+
N(We, "version", "3.5.1");
|
|
1359
1359
|
function Bt(e) {
|
|
1360
|
-
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new
|
|
1360
|
+
const t = e.mouseSelectionButton === 2 ? [2] : [0], n = new We({
|
|
1361
1361
|
selectables: [".map-container me-tpc"],
|
|
1362
1362
|
boundaries: [e.container],
|
|
1363
1363
|
container: e.selectionContainer,
|
|
@@ -1380,22 +1380,22 @@ function Bt(e) {
|
|
|
1380
1380
|
}).on("beforestart", ({ event: o }) => {
|
|
1381
1381
|
if (o.target.tagName === "ME-TPC" || o.target.id === "input-box" || o.target.className === "circle")
|
|
1382
1382
|
return !1;
|
|
1383
|
-
const
|
|
1384
|
-
return
|
|
1383
|
+
const i = n.getSelectionArea();
|
|
1384
|
+
return i.style.background = "#4f90f22d", i.style.border = "1px solid #4f90f2", i.parentElement && (i.parentElement.style.zIndex = "9999"), !0;
|
|
1385
1385
|
}).on("start", ({ event: o }) => {
|
|
1386
1386
|
!o.ctrlKey && !o.metaKey && (e.clearSelection(), n.clearSelection(!0, !0));
|
|
1387
1387
|
}).on(
|
|
1388
1388
|
"move",
|
|
1389
1389
|
({
|
|
1390
1390
|
store: {
|
|
1391
|
-
changed: { added: o, removed:
|
|
1391
|
+
changed: { added: o, removed: i }
|
|
1392
1392
|
}
|
|
1393
1393
|
}) => {
|
|
1394
1394
|
k.moved = !0;
|
|
1395
|
-
for (const
|
|
1396
|
-
|
|
1397
|
-
for (const
|
|
1398
|
-
|
|
1395
|
+
for (const s of o)
|
|
1396
|
+
s.classList.add("selected");
|
|
1397
|
+
for (const s of i)
|
|
1398
|
+
s.classList.remove("selected");
|
|
1399
1399
|
}
|
|
1400
1400
|
).on("stop", ({ store: { stored: o } }) => {
|
|
1401
1401
|
e.selectNodes(o);
|
|
@@ -1406,81 +1406,82 @@ const Rt = function(e, t = !0) {
|
|
|
1406
1406
|
this.theme = e;
|
|
1407
1407
|
const n = this.theme.cssVar, o = Object.keys(n);
|
|
1408
1408
|
this.container.style.cssText = "";
|
|
1409
|
-
for (let
|
|
1410
|
-
const
|
|
1411
|
-
this.container.style.setProperty(
|
|
1409
|
+
for (let i = 0; i < o.length; i++) {
|
|
1410
|
+
const s = o[i];
|
|
1411
|
+
this.container.style.setProperty(s, n[s]);
|
|
1412
1412
|
}
|
|
1413
1413
|
e.cssVar["--gap"] || this.container.style.setProperty("--gap", "30px"), t && this.refresh();
|
|
1414
|
-
},
|
|
1414
|
+
}, K = (e) => {
|
|
1415
1415
|
var o;
|
|
1416
1416
|
const t = (o = e.parent) == null ? void 0 : o.children, n = (t == null ? void 0 : t.indexOf(e)) ?? 0;
|
|
1417
1417
|
return { siblings: t, index: n };
|
|
1418
1418
|
};
|
|
1419
1419
|
function zt(e) {
|
|
1420
|
-
const { siblings: t, index: n } =
|
|
1420
|
+
const { siblings: t, index: n } = K(e);
|
|
1421
1421
|
if (t === void 0)
|
|
1422
1422
|
return;
|
|
1423
1423
|
const o = t[n];
|
|
1424
1424
|
n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
|
|
1425
1425
|
}
|
|
1426
1426
|
function Ft(e) {
|
|
1427
|
-
const { siblings: t, index: n } =
|
|
1427
|
+
const { siblings: t, index: n } = K(e);
|
|
1428
1428
|
if (t === void 0)
|
|
1429
1429
|
return;
|
|
1430
1430
|
const o = t[n];
|
|
1431
1431
|
n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
|
|
1432
1432
|
}
|
|
1433
1433
|
function be(e) {
|
|
1434
|
-
const { siblings: t, index: n } =
|
|
1434
|
+
const { siblings: t, index: n } = K(e);
|
|
1435
1435
|
return t === void 0 ? 0 : (t.splice(n, 1), t.length);
|
|
1436
1436
|
}
|
|
1437
1437
|
function qt(e, t, n) {
|
|
1438
|
-
const { siblings: o, index:
|
|
1439
|
-
o !== void 0 && (t === "before" ? o.splice(
|
|
1438
|
+
const { siblings: o, index: i } = K(n);
|
|
1439
|
+
o !== void 0 && (t === "before" ? o.splice(i, 0, e) : o.splice(i + 1, 0, e));
|
|
1440
1440
|
}
|
|
1441
1441
|
function Vt(e, t) {
|
|
1442
|
-
const { siblings: n, index: o } =
|
|
1442
|
+
const { siblings: n, index: o } = K(e);
|
|
1443
1443
|
n !== void 0 && (n[o] = t, t.children = [e]);
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1446
|
-
|
|
1445
|
+
function Ie(e, t, n) {
|
|
1446
|
+
var o;
|
|
1447
|
+
if (be(t), (o = n.parent) != null && o.parent || (t.direction = n.direction), e === "in")
|
|
1447
1448
|
n.children ? n.children.push(t) : n.children = [t];
|
|
1448
1449
|
else {
|
|
1449
1450
|
t.direction !== void 0 && (t.direction = n.direction);
|
|
1450
|
-
const { siblings:
|
|
1451
|
-
if (
|
|
1451
|
+
const { siblings: i, index: s } = K(n);
|
|
1452
|
+
if (i === void 0)
|
|
1452
1453
|
return;
|
|
1453
|
-
e === "before" ?
|
|
1454
|
+
e === "before" ? i.splice(s, 0, t) : i.splice(s + 1, 0, t);
|
|
1454
1455
|
}
|
|
1455
1456
|
}
|
|
1456
|
-
const
|
|
1457
|
+
const Wt = function(e, t) {
|
|
1457
1458
|
var n, o;
|
|
1458
1459
|
if (e === $)
|
|
1459
1460
|
return $;
|
|
1460
1461
|
if (e === P)
|
|
1461
1462
|
return P;
|
|
1462
1463
|
if (e === ae) {
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1465
|
-
}
|
|
1466
|
-
},
|
|
1467
|
-
var
|
|
1468
|
-
const o = n.children[0].children[0],
|
|
1469
|
-
if (
|
|
1470
|
-
if (Q(o),
|
|
1471
|
-
|
|
1464
|
+
const i = ((n = document.querySelector(".lhs")) == null ? void 0 : n.childElementCount) || 0, s = ((o = document.querySelector(".rhs")) == null ? void 0 : o.childElementCount) || 0;
|
|
1465
|
+
return i <= s ? (t.direction = $, $) : (t.direction = P, P);
|
|
1466
|
+
}
|
|
1467
|
+
}, Ke = function(e, t, n) {
|
|
1468
|
+
var s, r;
|
|
1469
|
+
const o = n.children[0].children[0], i = t.parentElement;
|
|
1470
|
+
if (i.tagName === "ME-PARENT") {
|
|
1471
|
+
if (Q(o), i.children[1])
|
|
1472
|
+
i.nextSibling.appendChild(n);
|
|
1472
1473
|
else {
|
|
1473
1474
|
const c = e.createChildren([n]);
|
|
1474
|
-
|
|
1475
|
+
i.appendChild(ve(!0)), i.insertAdjacentElement("afterend", c);
|
|
1475
1476
|
}
|
|
1476
1477
|
e.linkDiv(n.offsetParent);
|
|
1477
1478
|
} else
|
|
1478
|
-
|
|
1479
|
+
i.tagName === "ME-ROOT" && (Wt(e.direction, o.nodeObj) === $ ? (s = e.container.querySelector(".lhs")) == null || s.appendChild(n) : (r = e.container.querySelector(".rhs")) == null || r.appendChild(n), e.linkDiv());
|
|
1479
1480
|
}, Ue = function(e, t) {
|
|
1480
1481
|
const n = e.parentNode;
|
|
1481
1482
|
if (t === 0) {
|
|
1482
1483
|
const o = n.parentNode.parentNode;
|
|
1483
|
-
o.tagName !== "ME-MAIN" && o.previousSibling.children[1].remove();
|
|
1484
|
+
o.tagName !== "ME-MAIN" && (o.previousSibling.children[1].remove(), o.remove());
|
|
1484
1485
|
}
|
|
1485
1486
|
n.parentNode.remove();
|
|
1486
1487
|
}, Ye = {
|
|
@@ -1489,13 +1490,13 @@ const It = function(e, t) {
|
|
|
1489
1490
|
}, Q = function(e) {
|
|
1490
1491
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1491
1492
|
(n == null ? void 0 : n.tagName) === "svg" && (n == null || n.remove());
|
|
1492
|
-
},
|
|
1493
|
+
}, It = function(e, t) {
|
|
1493
1494
|
const n = e.nodeObj, o = me(n);
|
|
1494
1495
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1495
|
-
const
|
|
1496
|
-
ge(e,
|
|
1496
|
+
const i = Object.assign(n, t);
|
|
1497
|
+
ge(e, i), this.linkDiv(), this.bus.fire("operation", {
|
|
1497
1498
|
name: "reshapeNode",
|
|
1498
|
-
obj:
|
|
1499
|
+
obj: i,
|
|
1499
1500
|
origin: o
|
|
1500
1501
|
});
|
|
1501
1502
|
}, ye = function(e, t, n) {
|
|
@@ -1503,36 +1504,36 @@ const It = function(e, t) {
|
|
|
1503
1504
|
return null;
|
|
1504
1505
|
const o = t.nodeObj;
|
|
1505
1506
|
o.expanded === !1 && (e.expandNode(t, !0), t = S(o.id));
|
|
1506
|
-
const
|
|
1507
|
-
o.children ? o.children.push(
|
|
1508
|
-
const { grp:
|
|
1509
|
-
return
|
|
1510
|
-
},
|
|
1507
|
+
const i = n || e.generateNewObj();
|
|
1508
|
+
o.children ? o.children.push(i) : o.children = [i], B(e.nodeData);
|
|
1509
|
+
const { grp: s, top: r } = e.createWrapper(i);
|
|
1510
|
+
return Ke(e, t, s), { newTop: r, newNodeObj: i };
|
|
1511
|
+
}, Kt = function(e, t, n) {
|
|
1511
1512
|
var d, a, u, h;
|
|
1512
1513
|
const o = t || this.currentNode;
|
|
1513
1514
|
if (!o)
|
|
1514
1515
|
return;
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1517
|
-
if (!((d =
|
|
1518
|
-
this.addChild(S(
|
|
1516
|
+
const i = o.nodeObj;
|
|
1517
|
+
if (i.parent) {
|
|
1518
|
+
if (!((d = i.parent) != null && d.parent) && ((u = (a = i.parent) == null ? void 0 : a.children) == null ? void 0 : u.length) === 1) {
|
|
1519
|
+
this.addChild(S(i.parent.id), n);
|
|
1519
1520
|
return;
|
|
1520
1521
|
}
|
|
1521
1522
|
} else {
|
|
1522
1523
|
this.addChild();
|
|
1523
1524
|
return;
|
|
1524
1525
|
}
|
|
1525
|
-
const
|
|
1526
|
-
if (!((h =
|
|
1526
|
+
const s = n || this.generateNewObj();
|
|
1527
|
+
if (!((h = i.parent) != null && h.parent)) {
|
|
1527
1528
|
const p = o.closest("me-main").className === L.LHS ? $ : P;
|
|
1528
|
-
|
|
1529
|
+
s.direction = p;
|
|
1529
1530
|
}
|
|
1530
|
-
qt(
|
|
1531
|
-
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(
|
|
1531
|
+
qt(s, e, i), B(this.nodeData);
|
|
1532
|
+
const r = o.parentElement, { grp: c, top: l } = this.createWrapper(s);
|
|
1532
1533
|
r.parentElement.insertAdjacentElement(Ye[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(l.firstChild), this.selectNode(l.firstChild, !0), this.bus.fire("operation", {
|
|
1533
1534
|
name: "insertSibling",
|
|
1534
1535
|
type: e,
|
|
1535
|
-
obj:
|
|
1536
|
+
obj: s
|
|
1536
1537
|
});
|
|
1537
1538
|
}, Ut = function(e, t) {
|
|
1538
1539
|
const n = e || this.currentNode;
|
|
@@ -1542,14 +1543,14 @@ const It = function(e, t) {
|
|
|
1542
1543
|
const o = n.nodeObj;
|
|
1543
1544
|
if (!o.parent)
|
|
1544
1545
|
return;
|
|
1545
|
-
const
|
|
1546
|
-
Vt(o,
|
|
1547
|
-
const
|
|
1548
|
-
c.appendChild(ve(!0)),
|
|
1549
|
-
const l = this.createChildren([
|
|
1546
|
+
const i = t || this.generateNewObj();
|
|
1547
|
+
Vt(o, i), B(this.nodeData);
|
|
1548
|
+
const s = n.parentElement.parentElement, { grp: r, top: c } = this.createWrapper(i, !0);
|
|
1549
|
+
c.appendChild(ve(!0)), s.insertAdjacentElement("afterend", r);
|
|
1550
|
+
const l = this.createChildren([s]);
|
|
1550
1551
|
c.insertAdjacentElement("afterend", l), this.linkDiv(), t || this.editTopic(c.firstChild), this.selectNode(c.firstChild, !0), this.bus.fire("operation", {
|
|
1551
1552
|
name: "insertParent",
|
|
1552
|
-
obj:
|
|
1553
|
+
obj: i
|
|
1553
1554
|
});
|
|
1554
1555
|
}, Yt = function(e, t) {
|
|
1555
1556
|
const n = e || this.currentNode;
|
|
@@ -1558,29 +1559,29 @@ const It = function(e, t) {
|
|
|
1558
1559
|
const o = ye(this, n, t);
|
|
1559
1560
|
if (!o)
|
|
1560
1561
|
return;
|
|
1561
|
-
const { newTop:
|
|
1562
|
+
const { newTop: i, newNodeObj: s } = o;
|
|
1562
1563
|
this.bus.fire("operation", {
|
|
1563
1564
|
name: "addChild",
|
|
1564
|
-
obj:
|
|
1565
|
-
}), t || this.editTopic(
|
|
1565
|
+
obj: s
|
|
1566
|
+
}), t || this.editTopic(i.firstChild), this.selectNode(i.firstChild, !0);
|
|
1566
1567
|
}, Xt = function(e, t) {
|
|
1567
1568
|
const n = me(e.nodeObj);
|
|
1568
1569
|
pe(n);
|
|
1569
1570
|
const o = ye(this, t, n);
|
|
1570
1571
|
if (!o)
|
|
1571
1572
|
return;
|
|
1572
|
-
const { newNodeObj:
|
|
1573
|
-
this.selectNode(S(
|
|
1573
|
+
const { newNodeObj: i } = o;
|
|
1574
|
+
this.selectNode(S(i.id)), this.bus.fire("operation", {
|
|
1574
1575
|
name: "copyNode",
|
|
1575
|
-
obj:
|
|
1576
|
+
obj: i
|
|
1576
1577
|
});
|
|
1577
1578
|
}, Gt = function(e, t) {
|
|
1578
1579
|
e = de(e);
|
|
1579
1580
|
const n = [];
|
|
1580
1581
|
for (let o = 0; o < e.length; o++) {
|
|
1581
|
-
const
|
|
1582
|
-
pe(
|
|
1583
|
-
const r = ye(this, t,
|
|
1582
|
+
const i = e[o], s = me(i.nodeObj);
|
|
1583
|
+
pe(s);
|
|
1584
|
+
const r = ye(this, t, s);
|
|
1584
1585
|
if (!r)
|
|
1585
1586
|
return;
|
|
1586
1587
|
const { newNodeObj: c } = r;
|
|
@@ -1620,16 +1621,16 @@ const It = function(e, t) {
|
|
|
1620
1621
|
const n = t.nodeObj;
|
|
1621
1622
|
if (!n.parent)
|
|
1622
1623
|
throw new Error("Can not remove root node");
|
|
1623
|
-
const o = n.parent.children,
|
|
1624
|
-
if (Ue(t,
|
|
1625
|
-
const c = o[
|
|
1624
|
+
const o = n.parent.children, i = o.findIndex((c) => c === n), s = be(n);
|
|
1625
|
+
if (Ue(t, s), o.length !== 0) {
|
|
1626
|
+
const c = o[i] || o[i - 1];
|
|
1626
1627
|
this.selectNode(S(c.id));
|
|
1627
1628
|
} else
|
|
1628
1629
|
this.selectNode(S(n.parent.id));
|
|
1629
1630
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1630
1631
|
name: "removeNode",
|
|
1631
1632
|
obj: n,
|
|
1632
|
-
originIndex:
|
|
1633
|
+
originIndex: i,
|
|
1633
1634
|
originParentId: (r = n == null ? void 0 : n.parent) == null ? void 0 : r.id
|
|
1634
1635
|
});
|
|
1635
1636
|
}, en = function(e) {
|
|
@@ -1650,10 +1651,10 @@ const It = function(e, t) {
|
|
|
1650
1651
|
const n = t.nodeObj;
|
|
1651
1652
|
n.expanded === !1 && (this.expandNode(t, !0), t = S(n.id));
|
|
1652
1653
|
for (const o of e) {
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1654
|
+
const i = o.nodeObj;
|
|
1655
|
+
Ie("in", i, n), B(this.nodeData);
|
|
1656
|
+
const s = o.parentElement;
|
|
1657
|
+
Ke(this, t, s.parentElement);
|
|
1657
1658
|
}
|
|
1658
1659
|
this.linkDiv(), this.bus.fire("operation", {
|
|
1659
1660
|
name: "moveNodeIn",
|
|
@@ -1662,17 +1663,19 @@ const It = function(e, t) {
|
|
|
1662
1663
|
});
|
|
1663
1664
|
}, Xe = (e, t, n, o) => {
|
|
1664
1665
|
e = de(e), t === "after" && (e = e.reverse());
|
|
1665
|
-
const
|
|
1666
|
-
for (const
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
n.parentElement.parentNode.insertAdjacentElement(Ye[t],
|
|
1671
|
-
}
|
|
1666
|
+
const i = n.nodeObj, s = [];
|
|
1667
|
+
for (const r of e) {
|
|
1668
|
+
const c = r.nodeObj;
|
|
1669
|
+
Ie(t, c, i), B(o.nodeData), Q(r);
|
|
1670
|
+
const l = r.parentElement.parentNode;
|
|
1671
|
+
s.includes(l.parentElement) || s.push(l.parentElement), n.parentElement.parentNode.insertAdjacentElement(Ye[t], l);
|
|
1672
|
+
}
|
|
1673
|
+
for (const r of s)
|
|
1674
|
+
r.childElementCount === 0 && r.tagName !== "ME-MAIN" && (r.previousSibling.children[1].remove(), r.remove());
|
|
1672
1675
|
o.linkDiv(), o.bus.fire("operation", {
|
|
1673
1676
|
name: t === "before" ? "moveNodeBefore" : "moveNodeAfter",
|
|
1674
|
-
objs: e.map((
|
|
1675
|
-
toObj:
|
|
1677
|
+
objs: e.map((r) => r.nodeObj),
|
|
1678
|
+
toObj: i
|
|
1676
1679
|
});
|
|
1677
1680
|
}, nn = function(e, t) {
|
|
1678
1681
|
Xe(e, "before", t, this);
|
|
@@ -1690,7 +1693,7 @@ const It = function(e, t) {
|
|
|
1690
1693
|
copyNode: Xt,
|
|
1691
1694
|
copyNodes: Gt,
|
|
1692
1695
|
insertParent: Ut,
|
|
1693
|
-
insertSibling:
|
|
1696
|
+
insertSibling: Kt,
|
|
1694
1697
|
moveDownNode: Zt,
|
|
1695
1698
|
moveNodeAfter: on,
|
|
1696
1699
|
moveNodeBefore: nn,
|
|
@@ -1698,7 +1701,7 @@ const It = function(e, t) {
|
|
|
1698
1701
|
moveUpNode: Jt,
|
|
1699
1702
|
removeNode: Qt,
|
|
1700
1703
|
removeNodes: en,
|
|
1701
|
-
reshapeNode:
|
|
1704
|
+
reshapeNode: It,
|
|
1702
1705
|
rmSubline: Q,
|
|
1703
1706
|
setNodeTopic: rn
|
|
1704
1707
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1749,12 +1752,12 @@ const cn = function(e, t, n) {
|
|
|
1749
1752
|
let t = "# " + e.topic + `
|
|
1750
1753
|
|
|
1751
1754
|
`;
|
|
1752
|
-
function n(o,
|
|
1753
|
-
for (let
|
|
1754
|
-
|
|
1755
|
+
function n(o, i) {
|
|
1756
|
+
for (let s = 0; s < o.length; s++)
|
|
1757
|
+
i <= 6 ? t += "".padStart(i, "#") + " " + o[s].topic + `
|
|
1755
1758
|
|
|
1756
|
-
` : t += "".padStart(
|
|
1757
|
-
`, o[
|
|
1759
|
+
` : t += "".padStart(i - 7, " ") + "- " + o[s].topic + `
|
|
1760
|
+
`, o[s].children && n(o[s].children || [], i + 1);
|
|
1758
1761
|
}
|
|
1759
1762
|
return n(e.children || [], 2), t;
|
|
1760
1763
|
}, mn = function() {
|
|
@@ -1764,26 +1767,29 @@ const cn = function(e, t, n) {
|
|
|
1764
1767
|
}, vn = function(e) {
|
|
1765
1768
|
this.scaleVal = e, this.map.style.transform = "scale(" + e + ")", this.bus.fire("scale", e);
|
|
1766
1769
|
}, bn = function() {
|
|
1770
|
+
const e = this.nodes.offsetHeight / this.container.offsetHeight, t = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(e, t));
|
|
1771
|
+
this.scaleVal = n, this.map.style.transform = "scale(" + n + ")", this.bus.fire("scale", n);
|
|
1772
|
+
}, yn = function() {
|
|
1767
1773
|
this.container.scrollTo(1e4 - this.container.offsetWidth / 2, 1e4 - this.container.offsetHeight / 2);
|
|
1768
|
-
}, yn = function(e) {
|
|
1769
|
-
e(this);
|
|
1770
1774
|
}, xn = function(e) {
|
|
1775
|
+
e(this);
|
|
1776
|
+
}, wn = function(e) {
|
|
1771
1777
|
e.nodeObj.parent && (this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = e.nodeObj, this.initRight(), this.toCenter());
|
|
1772
|
-
}, wn = function() {
|
|
1773
|
-
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1774
1778
|
}, En = function() {
|
|
1775
|
-
this.direction =
|
|
1779
|
+
this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
|
|
1776
1780
|
}, Nn = function() {
|
|
1777
|
-
this.direction =
|
|
1781
|
+
this.direction = 0, this.refresh();
|
|
1778
1782
|
}, Cn = function() {
|
|
1783
|
+
this.direction = 1, this.refresh();
|
|
1784
|
+
}, Sn = function() {
|
|
1779
1785
|
this.direction = 2, this.refresh();
|
|
1780
|
-
},
|
|
1786
|
+
}, _n = function(e) {
|
|
1781
1787
|
this.locale = e, this.refresh();
|
|
1782
|
-
},
|
|
1788
|
+
}, Ln = function(e, t) {
|
|
1783
1789
|
const n = e.nodeObj;
|
|
1784
1790
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1785
|
-
const o = e.parentNode,
|
|
1786
|
-
if (
|
|
1791
|
+
const o = e.parentNode, i = o.children[1];
|
|
1792
|
+
if (i.expanded = n.expanded, i.className = n.expanded ? "minus" : "", Q(e), n.expanded) {
|
|
1787
1793
|
const l = this.createChildren(
|
|
1788
1794
|
n.children.map((d) => this.createWrapper(d).grp)
|
|
1789
1795
|
);
|
|
@@ -1791,34 +1797,35 @@ const cn = function(e, t, n) {
|
|
|
1791
1797
|
} else
|
|
1792
1798
|
o.parentNode.children[1].remove();
|
|
1793
1799
|
this.linkDiv(e.closest("me-main > me-wrapper"));
|
|
1794
|
-
const
|
|
1795
|
-
(
|
|
1796
|
-
},
|
|
1800
|
+
const s = e.getBoundingClientRect(), r = this.container.getBoundingClientRect();
|
|
1801
|
+
(s.bottom > r.bottom || s.top < r.top || s.right > r.right || s.left < r.left) && e.scrollIntoView({ block: "center", inline: "center" }), this.bus.fire("expandNode", n);
|
|
1802
|
+
}, Mn = function(e) {
|
|
1797
1803
|
e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || []), B(this.nodeData), this.layout(), this.linkDiv();
|
|
1798
|
-
},
|
|
1804
|
+
}, kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1799
1805
|
__proto__: null,
|
|
1800
|
-
cancelFocus:
|
|
1806
|
+
cancelFocus: En,
|
|
1801
1807
|
clearSelection: hn,
|
|
1802
1808
|
disableEdit: gn,
|
|
1803
1809
|
enableEdit: mn,
|
|
1804
|
-
expandNode:
|
|
1805
|
-
focusNode:
|
|
1810
|
+
expandNode: Ln,
|
|
1811
|
+
focusNode: wn,
|
|
1806
1812
|
getData: fn,
|
|
1807
1813
|
getDataMd: pn,
|
|
1808
1814
|
getDataString: un,
|
|
1809
|
-
initLeft:
|
|
1810
|
-
initRight:
|
|
1811
|
-
initSide:
|
|
1812
|
-
install:
|
|
1813
|
-
refresh:
|
|
1815
|
+
initLeft: Nn,
|
|
1816
|
+
initRight: Cn,
|
|
1817
|
+
initSide: Sn,
|
|
1818
|
+
install: xn,
|
|
1819
|
+
refresh: Mn,
|
|
1814
1820
|
scale: vn,
|
|
1821
|
+
scaleFit: bn,
|
|
1815
1822
|
selectNode: cn,
|
|
1816
1823
|
selectNodes: an,
|
|
1817
|
-
setLocale:
|
|
1818
|
-
toCenter:
|
|
1824
|
+
setLocale: _n,
|
|
1825
|
+
toCenter: yn,
|
|
1819
1826
|
unselectNode: ln,
|
|
1820
1827
|
unselectNodes: dn
|
|
1821
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1828
|
+
}, Symbol.toStringTag, { value: "Module" })), Tn = function(e) {
|
|
1822
1829
|
return {
|
|
1823
1830
|
dom: e,
|
|
1824
1831
|
moved: !1,
|
|
@@ -1845,12 +1852,12 @@ const cn = function(e, t, n) {
|
|
|
1845
1852
|
}
|
|
1846
1853
|
};
|
|
1847
1854
|
}, je = {
|
|
1848
|
-
create:
|
|
1855
|
+
create: Tn
|
|
1849
1856
|
};
|
|
1850
1857
|
function le(e, t, n) {
|
|
1851
|
-
const { offsetLeft: o, offsetTop:
|
|
1858
|
+
const { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = t.offsetWidth, r = t.offsetHeight, c = o + s / 2, l = i + r / 2, d = c + n.x, a = l + n.y;
|
|
1852
1859
|
return {
|
|
1853
|
-
w:
|
|
1860
|
+
w: s,
|
|
1854
1861
|
h: r,
|
|
1855
1862
|
cx: c,
|
|
1856
1863
|
cy: l,
|
|
@@ -1858,7 +1865,7 @@ function le(e, t, n) {
|
|
|
1858
1865
|
ctrlY: a
|
|
1859
1866
|
};
|
|
1860
1867
|
}
|
|
1861
|
-
function
|
|
1868
|
+
function I(e) {
|
|
1862
1869
|
let t, n;
|
|
1863
1870
|
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
1864
1871
|
return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
|
|
@@ -1866,27 +1873,27 @@ function K(e) {
|
|
|
1866
1873
|
y: n
|
|
1867
1874
|
};
|
|
1868
1875
|
}
|
|
1869
|
-
const
|
|
1870
|
-
const
|
|
1871
|
-
return C(
|
|
1876
|
+
const An = function(e, t, n, o) {
|
|
1877
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1878
|
+
return C(i, {
|
|
1872
1879
|
"text-anchor": "middle",
|
|
1873
1880
|
x: t + "",
|
|
1874
1881
|
y: n + "",
|
|
1875
1882
|
fill: o || "#666"
|
|
1876
|
-
}),
|
|
1877
|
-
}, Ze = function(e, t, n, o,
|
|
1883
|
+
}), i.dataset.type = "custom-link", i.innerHTML = e, i;
|
|
1884
|
+
}, Ze = function(e, t, n, o, i) {
|
|
1878
1885
|
if (!t || !n)
|
|
1879
1886
|
return;
|
|
1880
1887
|
performance.now();
|
|
1881
|
-
const
|
|
1888
|
+
const s = le(e, t, o.delta1), r = le(e, n, o.delta2), { x: c, y: l } = I(s), { ctrlX: d, ctrlY: a } = s, { ctrlX: u, ctrlY: h } = r, { x: p, y: g } = I(r), v = re(u, h, p, g), m = `M ${v.x1} ${v.y1} L ${p} ${g} L ${v.x2} ${v.y2}`;
|
|
1882
1889
|
let f = "";
|
|
1883
1890
|
if (o.bidirectional) {
|
|
1884
1891
|
const w = re(d, a, c, l);
|
|
1885
1892
|
f = `M ${w.x1} ${w.y1} L ${c} ${l} L ${w.x2} ${w.y2}`;
|
|
1886
1893
|
}
|
|
1887
|
-
const b = pt(`M ${c} ${l} C ${d} ${a} ${u} ${h} ${p} ${g}`, m, f), x = c / 8 + d * 3 / 8 + u * 3 / 8 + p / 8, E = l / 8 + a * 3 / 8 + h * 3 / 8 + g / 8, y =
|
|
1888
|
-
b.appendChild(y), b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b),
|
|
1889
|
-
},
|
|
1894
|
+
const b = pt(`M ${c} ${l} C ${d} ${a} ${u} ${h} ${p} ${g}`, m, f), x = c / 8 + d * 3 / 8 + u * 3 / 8 + p / 8, E = l / 8 + a * 3 / 8 + h * 3 / 8 + g / 8, y = An(o.label, x, E, e.theme.cssVar["--color"]);
|
|
1895
|
+
b.appendChild(y), b.arrowObj = o, b.dataset.linkid = o.id, e.linkSvgGroup.appendChild(b), i || (e.arrows.push(o), e.currentArrow = b, Qe(e, o, s, r)), performance.now();
|
|
1896
|
+
}, $n = function(e, t, n = {}) {
|
|
1890
1897
|
const o = {
|
|
1891
1898
|
id: Z(),
|
|
1892
1899
|
label: "Custom Link",
|
|
@@ -1906,7 +1913,7 @@ const Tn = function(e, t, n, o) {
|
|
|
1906
1913
|
name: "createArrow",
|
|
1907
1914
|
obj: o
|
|
1908
1915
|
});
|
|
1909
|
-
},
|
|
1916
|
+
}, jn = function(e) {
|
|
1910
1917
|
let t;
|
|
1911
1918
|
if (e ? t = e : t = this.currentArrow, !t)
|
|
1912
1919
|
return;
|
|
@@ -1918,21 +1925,21 @@ const Tn = function(e, t, n, o) {
|
|
|
1918
1925
|
id: n
|
|
1919
1926
|
}
|
|
1920
1927
|
});
|
|
1921
|
-
},
|
|
1928
|
+
}, Dn = function(e) {
|
|
1922
1929
|
this.currentArrow = e;
|
|
1923
|
-
const t = e.arrowObj, n = S(t.from), o = S(t.to),
|
|
1924
|
-
Qe(this, t,
|
|
1925
|
-
},
|
|
1930
|
+
const t = e.arrowObj, n = S(t.from), o = S(t.to), i = le(this, n, t.delta1), s = le(this, o, t.delta2);
|
|
1931
|
+
Qe(this, t, i, s);
|
|
1932
|
+
}, On = function() {
|
|
1926
1933
|
this.currentArrow = null, xe(this);
|
|
1927
1934
|
}, xe = function(e) {
|
|
1928
1935
|
var t, n;
|
|
1929
1936
|
(t = e.helper1) == null || t.destory(e.map), (n = e.helper2) == null || n.destory(e.map), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none";
|
|
1930
1937
|
}, Qe = function(e, t, n, o) {
|
|
1931
1938
|
e.linkController.style.display = "initial", e.P2.style.display = "initial", e.P3.style.display = "initial", e.nodes.appendChild(e.linkController), e.nodes.appendChild(e.P2), e.nodes.appendChild(e.P3);
|
|
1932
|
-
let { x:
|
|
1939
|
+
let { x: i, y: s } = I(n), { ctrlX: r, ctrlY: c } = n, { ctrlX: l, ctrlY: d } = o, { x: a, y: u } = I(o);
|
|
1933
1940
|
e.P2.style.cssText = `top:${c}px;left:${r}px;`, e.P3.style.cssText = `top:${d}px;left:${l}px;`, C(e.line1, {
|
|
1934
|
-
x1:
|
|
1935
|
-
y1:
|
|
1941
|
+
x1: i + "",
|
|
1942
|
+
y1: s + "",
|
|
1936
1943
|
x2: r + "",
|
|
1937
1944
|
y2: c + ""
|
|
1938
1945
|
}), C(e.line2, {
|
|
@@ -1944,19 +1951,19 @@ const Tn = function(e, t, n, o) {
|
|
|
1944
1951
|
if (!e.currentArrow)
|
|
1945
1952
|
return;
|
|
1946
1953
|
r = r + h / e.scaleVal, c = c + p / e.scaleVal;
|
|
1947
|
-
const g =
|
|
1948
|
-
|
|
1949
|
-
const v =
|
|
1950
|
-
if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.children[0].setAttribute("d", `M ${
|
|
1951
|
-
const f = re(r, c,
|
|
1952
|
-
e.currentArrow.children[2].setAttribute("d", `M ${f.x1} ${f.y1} L ${
|
|
1954
|
+
const g = I({ ...n, ctrlX: r, ctrlY: c });
|
|
1955
|
+
i = g.x, s = g.y;
|
|
1956
|
+
const v = i / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, m = s / 8 + c * 3 / 8 + d * 3 / 8 + u / 8;
|
|
1957
|
+
if (e.P2.style.top = c + "px", e.P2.style.left = r + "px", e.currentArrow.children[0].setAttribute("d", `M ${i} ${s} C ${r} ${c} ${l} ${d} ${a} ${u}`), t.bidirectional) {
|
|
1958
|
+
const f = re(r, c, i, s);
|
|
1959
|
+
e.currentArrow.children[2].setAttribute("d", `M ${f.x1} ${f.y1} L ${i} ${s} L ${f.x2} ${f.y2}`);
|
|
1953
1960
|
}
|
|
1954
1961
|
C(e.currentArrow.children[3], {
|
|
1955
1962
|
x: v + "",
|
|
1956
1963
|
y: m + ""
|
|
1957
1964
|
}), C(e.line1, {
|
|
1958
|
-
x1:
|
|
1959
|
-
y1:
|
|
1965
|
+
x1: i + "",
|
|
1966
|
+
y1: s + "",
|
|
1960
1967
|
x2: r + "",
|
|
1961
1968
|
y2: c + ""
|
|
1962
1969
|
}), t.delta1.x = r - n.cx, t.delta1.y = c - n.cy, e.bus.fire("updateArrowDelta", t);
|
|
@@ -1964,10 +1971,10 @@ const Tn = function(e, t, n, o) {
|
|
|
1964
1971
|
if (!e.currentArrow)
|
|
1965
1972
|
return;
|
|
1966
1973
|
l = l + h / e.scaleVal, d = d + p / e.scaleVal;
|
|
1967
|
-
const g =
|
|
1974
|
+
const g = I({ ...o, ctrlX: l, ctrlY: d });
|
|
1968
1975
|
a = g.x, u = g.y;
|
|
1969
|
-
const v =
|
|
1970
|
-
e.P3.style.top = d + "px", e.P3.style.left = l + "px", e.currentArrow.children[0].setAttribute("d", `M ${
|
|
1976
|
+
const v = i / 8 + r * 3 / 8 + l * 3 / 8 + a / 8, m = s / 8 + c * 3 / 8 + d * 3 / 8 + u / 8, f = re(l, d, a, u);
|
|
1977
|
+
e.P3.style.top = d + "px", e.P3.style.left = l + "px", e.currentArrow.children[0].setAttribute("d", `M ${i} ${s} C ${r} ${c} ${l} ${d} ${a} ${u}`), e.currentArrow.children[1].setAttribute("d", `M ${f.x1} ${f.y1} L ${a} ${u} L ${f.x2} ${f.y2}`), C(e.currentArrow.children[3], {
|
|
1971
1978
|
x: v + "",
|
|
1972
1979
|
y: m + ""
|
|
1973
1980
|
}), C(e.line2, {
|
|
@@ -1978,7 +1985,7 @@ const Tn = function(e, t, n, o) {
|
|
|
1978
1985
|
}), t.delta2.x = l - o.cx, t.delta2.y = d - o.cy, e.bus.fire("updateArrowDelta", t);
|
|
1979
1986
|
});
|
|
1980
1987
|
};
|
|
1981
|
-
function
|
|
1988
|
+
function Hn() {
|
|
1982
1989
|
this.linkSvgGroup.innerHTML = "";
|
|
1983
1990
|
for (let e = 0; e < this.arrows.length; e++) {
|
|
1984
1991
|
const t = this.arrows[e];
|
|
@@ -1989,32 +1996,32 @@ function On() {
|
|
|
1989
1996
|
}
|
|
1990
1997
|
this.nodes.appendChild(this.linkSvgGroup);
|
|
1991
1998
|
}
|
|
1992
|
-
function
|
|
1999
|
+
function Pn(e) {
|
|
1993
2000
|
if (xe(this), !e)
|
|
1994
2001
|
return;
|
|
1995
2002
|
const t = e.children[3];
|
|
1996
2003
|
Fe(this, t, (n) => {
|
|
1997
|
-
var
|
|
1998
|
-
const o = e.arrowObj,
|
|
1999
|
-
|
|
2004
|
+
var s;
|
|
2005
|
+
const o = e.arrowObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
2006
|
+
i === "" ? o.label = origin : o.label = i, n.remove(), i !== origin && (t.innerHTML = o.label, this.linkDiv(), this.bus.fire("operation", {
|
|
2000
2007
|
name: "finishEditArrowLabel",
|
|
2001
2008
|
obj: o
|
|
2002
2009
|
}));
|
|
2003
2010
|
});
|
|
2004
2011
|
}
|
|
2005
|
-
function
|
|
2006
|
-
this.arrows = this.arrows.filter((e) =>
|
|
2012
|
+
function Bn() {
|
|
2013
|
+
this.arrows = this.arrows.filter((e) => se(e.from, this.nodeData) && se(e.to, this.nodeData));
|
|
2007
2014
|
}
|
|
2008
|
-
const
|
|
2015
|
+
const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2009
2016
|
__proto__: null,
|
|
2010
|
-
createArrow:
|
|
2011
|
-
editArrowLabel:
|
|
2012
|
-
removeArrow:
|
|
2013
|
-
renderArrow:
|
|
2014
|
-
selectArrow:
|
|
2015
|
-
tidyArrow:
|
|
2016
|
-
unselectArrow:
|
|
2017
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2017
|
+
createArrow: $n,
|
|
2018
|
+
editArrowLabel: Pn,
|
|
2019
|
+
removeArrow: jn,
|
|
2020
|
+
renderArrow: Hn,
|
|
2021
|
+
selectArrow: Dn,
|
|
2022
|
+
tidyArrow: Bn,
|
|
2023
|
+
unselectArrow: On
|
|
2024
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = function(e) {
|
|
2018
2025
|
var l, d;
|
|
2019
2026
|
if (e.length === 0)
|
|
2020
2027
|
throw new Error("No selected node.");
|
|
@@ -2049,15 +2056,15 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2049
2056
|
}
|
|
2050
2057
|
if (!o)
|
|
2051
2058
|
throw new Error("Can not select root node.");
|
|
2052
|
-
const
|
|
2059
|
+
const i = n.map((a) => a[o - 1].index).sort(), s = i[0] || 0, r = i[i.length - 1] || 0, c = n[0][o - 1].node;
|
|
2053
2060
|
if (!c.parent)
|
|
2054
2061
|
throw new Error("Please select nodes in the same main topic.");
|
|
2055
2062
|
return {
|
|
2056
2063
|
parent: c.id,
|
|
2057
|
-
start:
|
|
2064
|
+
start: s,
|
|
2058
2065
|
end: r
|
|
2059
2066
|
};
|
|
2060
|
-
},
|
|
2067
|
+
}, Fn = function(e) {
|
|
2061
2068
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
2062
2069
|
return t.setAttribute("id", e), t;
|
|
2063
2070
|
}, De = function(e, t) {
|
|
@@ -2069,41 +2076,41 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2069
2076
|
"stroke-linecap": "round",
|
|
2070
2077
|
"stroke-width": "2"
|
|
2071
2078
|
}), n;
|
|
2072
|
-
}, Oe = function(e, t, n, o,
|
|
2073
|
-
const
|
|
2074
|
-
return C(
|
|
2079
|
+
}, Oe = function(e, t, n, o, i) {
|
|
2080
|
+
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2081
|
+
return C(s, {
|
|
2075
2082
|
"text-anchor": o,
|
|
2076
2083
|
x: t + "",
|
|
2077
2084
|
y: n + "",
|
|
2078
|
-
fill:
|
|
2079
|
-
}),
|
|
2080
|
-
},
|
|
2085
|
+
fill: i || "#666"
|
|
2086
|
+
}), s.innerHTML = e, s;
|
|
2087
|
+
}, qn = (e) => S(e).parentElement.parentElement, Vn = function({ parent: e, start: t }) {
|
|
2081
2088
|
const n = S(e), o = n.nodeObj;
|
|
2082
|
-
let
|
|
2083
|
-
return o.parent ?
|
|
2089
|
+
let i;
|
|
2090
|
+
return o.parent ? i = n.closest("me-main").className : i = S(o.children[t].id).closest("me-main").className, i;
|
|
2084
2091
|
}, et = function(e, t) {
|
|
2085
2092
|
var w;
|
|
2086
|
-
const { id: n, text: o, parent:
|
|
2093
|
+
const { id: n, text: o, parent: i, start: s, end: r } = t, c = e.nodes, d = S(i).nodeObj, a = Vn(t);
|
|
2087
2094
|
let u = 1 / 0, h = 0, p = 0, g = 0;
|
|
2088
|
-
for (let _ =
|
|
2095
|
+
for (let _ = s; _ <= r; _++) {
|
|
2089
2096
|
const M = (w = d.children) == null ? void 0 : w[_];
|
|
2090
2097
|
if (!M)
|
|
2091
2098
|
return e.removeSummary(n), null;
|
|
2092
|
-
const j =
|
|
2093
|
-
_ ===
|
|
2099
|
+
const j = qn(M.id), { offsetLeft: z, offsetTop: U } = R(c, j), we = s === r ? 10 : 20;
|
|
2100
|
+
_ === s && (p = U + we), _ === r && (g = U + j.offsetHeight - we), z < u && (u = z), j.offsetWidth + z > h && (h = j.offsetWidth + z);
|
|
2094
2101
|
}
|
|
2095
2102
|
let v, m;
|
|
2096
2103
|
const f = p + 10, b = g + 10, x = (f + b) / 2, E = e.theme.cssVar["--color"];
|
|
2097
2104
|
a === L.LHS ? (v = De(`M ${u + 10} ${f} c -5 0 -10 5 -10 10 L ${u} ${b - 10} c 0 5 5 10 10 10 M ${u} ${x} h -10`, E), m = Oe(o, u - 20, x + 6, "end", E)) : (v = De(`M ${h - 10} ${f} c 5 0 10 5 10 10 L ${h} ${b - 10} c 0 5 -5 10 -10 10 M ${h} ${x} h 10`, E), m = Oe(o, h + 20, x + 6, "start", E));
|
|
2098
|
-
const y =
|
|
2105
|
+
const y = Fn("s-" + n);
|
|
2099
2106
|
return y.appendChild(v), y.appendChild(m), y.summaryObj = t, e.summarySvg.appendChild(y), y;
|
|
2100
|
-
},
|
|
2107
|
+
}, Wn = function() {
|
|
2101
2108
|
let e = [];
|
|
2102
2109
|
this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
|
|
2103
|
-
const { parent: t, start: n, end: o } =
|
|
2104
|
-
this.summaries.push(
|
|
2110
|
+
const { parent: t, start: n, end: o } = zn(e), i = { id: Z(), parent: t, start: n, end: o, text: "summary" }, s = et(this, i);
|
|
2111
|
+
this.summaries.push(i), this.editSummary(s), this.bus.fire("operation", {
|
|
2105
2112
|
name: "createSummary",
|
|
2106
|
-
obj:
|
|
2113
|
+
obj: i
|
|
2107
2114
|
});
|
|
2108
2115
|
}, In = function(e) {
|
|
2109
2116
|
var n;
|
|
@@ -2113,8 +2120,8 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2113
2120
|
obj: { id: e }
|
|
2114
2121
|
});
|
|
2115
2122
|
}, Kn = function(e) {
|
|
2116
|
-
const t = e.children[1].getBBox(), n = 6, o = 3,
|
|
2117
|
-
C(
|
|
2123
|
+
const t = e.children[1].getBBox(), n = 6, o = 3, i = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
2124
|
+
C(i, {
|
|
2118
2125
|
x: t.x - n + "",
|
|
2119
2126
|
y: t.y - n + "",
|
|
2120
2127
|
width: t.width + n * 2 + "",
|
|
@@ -2123,39 +2130,39 @@ const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2123
2130
|
stroke: this.theme.cssVar["--selected"] || "#4dc4ff",
|
|
2124
2131
|
"stroke-width": "2",
|
|
2125
2132
|
fill: "none"
|
|
2126
|
-
}), e.appendChild(
|
|
2127
|
-
},
|
|
2133
|
+
}), e.appendChild(i), this.currentSummary = e;
|
|
2134
|
+
}, Un = function() {
|
|
2128
2135
|
var e, t;
|
|
2129
2136
|
(t = (e = this.currentSummary) == null ? void 0 : e.querySelector("rect")) == null || t.remove(), this.currentSummary = null;
|
|
2130
|
-
},
|
|
2137
|
+
}, Yn = function() {
|
|
2131
2138
|
this.summarySvg.innerHTML = "", this.summaries.forEach((e) => {
|
|
2132
2139
|
try {
|
|
2133
2140
|
et(this, e);
|
|
2134
2141
|
} catch {
|
|
2135
2142
|
}
|
|
2136
2143
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2137
|
-
},
|
|
2144
|
+
}, Xn = function(e) {
|
|
2138
2145
|
if (!e)
|
|
2139
2146
|
return;
|
|
2140
2147
|
const t = e.childNodes[1];
|
|
2141
2148
|
Fe(this, t, (n) => {
|
|
2142
|
-
var
|
|
2143
|
-
const o = e.summaryObj,
|
|
2144
|
-
|
|
2149
|
+
var s;
|
|
2150
|
+
const o = e.summaryObj, i = ((s = n.textContent) == null ? void 0 : s.trim()) || "";
|
|
2151
|
+
i === "" ? o.text = origin : o.text = i, n.remove(), i !== origin && (t.innerHTML = o.text, this.linkDiv(), this.bus.fire("operation", {
|
|
2145
2152
|
name: "finishEditSummary",
|
|
2146
2153
|
obj: o
|
|
2147
2154
|
}));
|
|
2148
2155
|
});
|
|
2149
|
-
},
|
|
2156
|
+
}, Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2150
2157
|
__proto__: null,
|
|
2151
|
-
createSummary:
|
|
2152
|
-
editSummary:
|
|
2158
|
+
createSummary: Wn,
|
|
2159
|
+
editSummary: Xn,
|
|
2153
2160
|
removeSummary: In,
|
|
2154
|
-
renderSummary:
|
|
2161
|
+
renderSummary: Yn,
|
|
2155
2162
|
selectSummary: Kn,
|
|
2156
|
-
unselectSummary:
|
|
2163
|
+
unselectSummary: Un
|
|
2157
2164
|
}, Symbol.toStringTag, { value: "Module" })), A = "http://www.w3.org/2000/svg";
|
|
2158
|
-
function
|
|
2165
|
+
function Jn(e, t) {
|
|
2159
2166
|
const n = document.createElementNS(A, "svg");
|
|
2160
2167
|
return C(n, {
|
|
2161
2168
|
version: "1.1",
|
|
@@ -2164,32 +2171,32 @@ function Gn(e, t) {
|
|
|
2164
2171
|
width: t
|
|
2165
2172
|
}), n;
|
|
2166
2173
|
}
|
|
2167
|
-
function
|
|
2174
|
+
function Zn(e, t) {
|
|
2168
2175
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2169
2176
|
}
|
|
2170
|
-
function
|
|
2171
|
-
const
|
|
2172
|
-
let
|
|
2173
|
-
return e.text ?
|
|
2177
|
+
function Qn(e, t, n, o) {
|
|
2178
|
+
const i = document.createElementNS(A, "g");
|
|
2179
|
+
let s = "";
|
|
2180
|
+
return e.text ? s = e.text.textContent : s = e.childNodes[0].textContent, s.split(`
|
|
2174
2181
|
`).forEach((c, l) => {
|
|
2175
2182
|
const d = document.createElementNS(A, "text");
|
|
2176
2183
|
C(d, {
|
|
2177
2184
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2178
|
-
y: o + parseInt(t.paddingTop) +
|
|
2185
|
+
y: o + parseInt(t.paddingTop) + Zn(t.lineHeight, t.fontSize) * (l + 1) + parseFloat(t.fontSize) * (l + 1) + "",
|
|
2179
2186
|
"text-anchor": "start",
|
|
2180
2187
|
"font-family": t.fontFamily,
|
|
2181
2188
|
"font-size": `${t.fontSize}`,
|
|
2182
2189
|
"font-weight": `${t.fontWeight}`,
|
|
2183
2190
|
fill: `${t.color}`
|
|
2184
|
-
}), d.innerHTML = c,
|
|
2185
|
-
}),
|
|
2191
|
+
}), d.innerHTML = c, i.appendChild(d);
|
|
2192
|
+
}), i;
|
|
2186
2193
|
}
|
|
2187
|
-
function
|
|
2194
|
+
function eo(e, t, n, o) {
|
|
2188
2195
|
var c;
|
|
2189
|
-
let
|
|
2190
|
-
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ?
|
|
2191
|
-
const
|
|
2192
|
-
C(
|
|
2196
|
+
let i = "";
|
|
2197
|
+
(c = e.nodeObj) != null && c.dangerouslySetInnerHTML ? i = e.nodeObj.dangerouslySetInnerHTML : e.text ? i = e.text.textContent : i = e.childNodes[0].textContent;
|
|
2198
|
+
const s = document.createElementNS(A, "foreignObject");
|
|
2199
|
+
C(s, {
|
|
2193
2200
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2194
2201
|
y: o + parseInt(t.paddingTop) + "",
|
|
2195
2202
|
width: t.width,
|
|
@@ -2199,13 +2206,13 @@ function Qn(e, t, n, o) {
|
|
|
2199
2206
|
return C(r, {
|
|
2200
2207
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2201
2208
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2202
|
-
}), r.innerHTML =
|
|
2209
|
+
}), r.innerHTML = i, s.appendChild(r), s;
|
|
2203
2210
|
}
|
|
2204
|
-
function
|
|
2205
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2206
|
-
return C(
|
|
2211
|
+
function to(e, t) {
|
|
2212
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "rect");
|
|
2213
|
+
return C(s, {
|
|
2207
2214
|
x: o + "",
|
|
2208
|
-
y:
|
|
2215
|
+
y: i + "",
|
|
2209
2216
|
rx: n.borderRadius,
|
|
2210
2217
|
ry: n.borderRadius,
|
|
2211
2218
|
width: n.width,
|
|
@@ -2213,13 +2220,13 @@ function eo(e, t) {
|
|
|
2213
2220
|
fill: n.backgroundColor,
|
|
2214
2221
|
stroke: n.borderColor,
|
|
2215
2222
|
"stroke-width": n.borderWidth
|
|
2216
|
-
}),
|
|
2223
|
+
}), s;
|
|
2217
2224
|
}
|
|
2218
2225
|
function ne(e, t, n = !1) {
|
|
2219
|
-
const o = getComputedStyle(t), { offsetLeft:
|
|
2226
|
+
const o = getComputedStyle(t), { offsetLeft: i, offsetTop: s } = R(e.nodes, t), r = document.createElementNS(A, "rect");
|
|
2220
2227
|
C(r, {
|
|
2221
|
-
x:
|
|
2222
|
-
y:
|
|
2228
|
+
x: i + "",
|
|
2229
|
+
y: s + "",
|
|
2223
2230
|
rx: o.borderRadius,
|
|
2224
2231
|
ry: o.borderRadius,
|
|
2225
2232
|
width: o.width,
|
|
@@ -2231,40 +2238,40 @@ function ne(e, t, n = !1) {
|
|
|
2231
2238
|
const c = document.createElementNS(A, "g");
|
|
2232
2239
|
c.appendChild(r);
|
|
2233
2240
|
let l;
|
|
2234
|
-
return n ? l =
|
|
2241
|
+
return n ? l = eo(t, o, i, s) : l = Qn(t, o, i, s), c.appendChild(l), c;
|
|
2235
2242
|
}
|
|
2236
|
-
function
|
|
2237
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2243
|
+
function no(e, t) {
|
|
2244
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "a"), r = document.createElementNS(A, "text");
|
|
2238
2245
|
return C(r, {
|
|
2239
2246
|
x: o + "",
|
|
2240
|
-
y:
|
|
2247
|
+
y: i + parseInt(n.fontSize) + "",
|
|
2241
2248
|
"text-anchor": "start",
|
|
2242
2249
|
"font-family": n.fontFamily,
|
|
2243
2250
|
"font-size": `${n.fontSize}`,
|
|
2244
2251
|
"font-weight": `${n.fontWeight}`,
|
|
2245
2252
|
fill: `${n.color}`
|
|
2246
|
-
}), r.innerHTML = t.textContent,
|
|
2253
|
+
}), r.innerHTML = t.textContent, s.appendChild(r), s.setAttribute("href", t.href), s;
|
|
2247
2254
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const n = getComputedStyle(t), { offsetLeft: o, offsetTop:
|
|
2250
|
-
return C(
|
|
2255
|
+
function oo(e, t) {
|
|
2256
|
+
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: i } = R(e.nodes, t), s = document.createElementNS(A, "image");
|
|
2257
|
+
return C(s, {
|
|
2251
2258
|
x: o + "",
|
|
2252
|
-
y:
|
|
2259
|
+
y: i + "",
|
|
2253
2260
|
width: n.width + "",
|
|
2254
2261
|
height: n.height + "",
|
|
2255
2262
|
href: t.src
|
|
2256
|
-
}),
|
|
2263
|
+
}), s;
|
|
2257
2264
|
}
|
|
2258
|
-
const oe = 100,
|
|
2265
|
+
const oe = 100, io = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', so = (e, t = !1) => {
|
|
2259
2266
|
var u, h, p;
|
|
2260
|
-
const n = e.nodes, o = n.offsetHeight + oe * 2,
|
|
2267
|
+
const n = e.nodes, o = n.offsetHeight + oe * 2, i = n.offsetWidth + oe * 2, s = Jn(o + "px", i + "px"), r = document.createElementNS(A, "svg"), c = document.createElementNS(A, "rect");
|
|
2261
2268
|
C(c, {
|
|
2262
2269
|
x: "0",
|
|
2263
2270
|
y: "0",
|
|
2264
|
-
width: `${
|
|
2271
|
+
width: `${i}`,
|
|
2265
2272
|
height: `${o}`,
|
|
2266
2273
|
fill: e.theme.cssVar["--bgcolor"]
|
|
2267
|
-
}),
|
|
2274
|
+
}), s.appendChild(c), n.querySelectorAll(".subLines").forEach((g) => {
|
|
2268
2275
|
const v = g.cloneNode(!0), { offsetLeft: m, offsetTop: f } = R(n, g.parentElement);
|
|
2269
2276
|
v.setAttribute("x", `${m}`), v.setAttribute("y", `${f}`), r.appendChild(v);
|
|
2270
2277
|
});
|
|
@@ -2274,49 +2281,49 @@ const oe = 100, oo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
|
|
|
2274
2281
|
d && r.appendChild(d);
|
|
2275
2282
|
const a = (p = n.querySelector(".summary")) == null ? void 0 : p.cloneNode(!0);
|
|
2276
2283
|
return a && r.appendChild(a), n.querySelectorAll("me-tpc").forEach((g) => {
|
|
2277
|
-
g.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ne(e, g, !t)) : (r.appendChild(
|
|
2284
|
+
g.nodeObj.dangerouslySetInnerHTML ? r.appendChild(ne(e, g, !t)) : (r.appendChild(to(e, g)), r.appendChild(ne(e, g.text, !t)));
|
|
2278
2285
|
}), n.querySelectorAll(".tags > span").forEach((g) => {
|
|
2279
2286
|
r.appendChild(ne(e, g));
|
|
2280
2287
|
}), n.querySelectorAll(".icons > span").forEach((g) => {
|
|
2281
2288
|
r.appendChild(ne(e, g));
|
|
2282
2289
|
}), n.querySelectorAll(".hyper-link").forEach((g) => {
|
|
2283
|
-
r.appendChild(to(e, g));
|
|
2284
|
-
}), n.querySelectorAll("img").forEach((g) => {
|
|
2285
2290
|
r.appendChild(no(e, g));
|
|
2291
|
+
}), n.querySelectorAll("img").forEach((g) => {
|
|
2292
|
+
r.appendChild(oo(e, g));
|
|
2286
2293
|
}), C(r, {
|
|
2287
2294
|
x: oe + "",
|
|
2288
2295
|
y: oe + "",
|
|
2289
2296
|
overflow: "visible"
|
|
2290
|
-
}),
|
|
2291
|
-
},
|
|
2292
|
-
function
|
|
2297
|
+
}), s.appendChild(r), s;
|
|
2298
|
+
}, ro = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), io + e.outerHTML);
|
|
2299
|
+
function co(e) {
|
|
2293
2300
|
return new Promise((t, n) => {
|
|
2294
2301
|
const o = new FileReader();
|
|
2295
|
-
o.onload = (
|
|
2296
|
-
t(
|
|
2297
|
-
}, o.onerror = (
|
|
2298
|
-
n(
|
|
2302
|
+
o.onload = (i) => {
|
|
2303
|
+
t(i.target.result);
|
|
2304
|
+
}, o.onerror = (i) => {
|
|
2305
|
+
n(i);
|
|
2299
2306
|
}, o.readAsDataURL(e);
|
|
2300
2307
|
});
|
|
2301
2308
|
}
|
|
2302
|
-
const
|
|
2303
|
-
const n = so(this, e), o =
|
|
2309
|
+
const lo = function(e = !1, t) {
|
|
2310
|
+
const n = so(this, e), o = ro(n, t);
|
|
2304
2311
|
return new Blob([o], { type: "image/svg+xml" });
|
|
2305
|
-
},
|
|
2306
|
-
const n = this.exportSvg(e, t), o = await
|
|
2307
|
-
return new Promise((
|
|
2312
|
+
}, ao = async function(e = !1, t) {
|
|
2313
|
+
const n = this.exportSvg(e, t), o = await co(n);
|
|
2314
|
+
return new Promise((i, s) => {
|
|
2308
2315
|
const r = new Image();
|
|
2309
2316
|
r.setAttribute("crossOrigin", "anonymous"), r.onload = () => {
|
|
2310
2317
|
const c = document.createElement("canvas");
|
|
2311
|
-
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(
|
|
2312
|
-
}, r.src = o, r.onerror =
|
|
2318
|
+
c.width = r.width, c.height = r.height, c.getContext("2d").drawImage(r, 0, 0), c.toBlob(i, "image/png", 1);
|
|
2319
|
+
}, r.src = o, r.onerror = s;
|
|
2313
2320
|
});
|
|
2314
|
-
},
|
|
2321
|
+
}, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2315
2322
|
__proto__: null,
|
|
2316
|
-
exportPng:
|
|
2317
|
-
exportSvg:
|
|
2323
|
+
exportPng: ao,
|
|
2324
|
+
exportSvg: lo
|
|
2318
2325
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2319
|
-
function
|
|
2326
|
+
function uo(e, t) {
|
|
2320
2327
|
return async function(...n) {
|
|
2321
2328
|
const o = this.before[t];
|
|
2322
2329
|
o && !await o.apply(this, n) || e.apply(this, n);
|
|
@@ -2325,10 +2332,10 @@ function ho(e, t) {
|
|
|
2325
2332
|
const He = Object.keys(Ge), tt = {};
|
|
2326
2333
|
for (let e = 0; e < He.length; e++) {
|
|
2327
2334
|
const t = He[e];
|
|
2328
|
-
tt[t] =
|
|
2335
|
+
tt[t] = uo(Ge[t], t);
|
|
2329
2336
|
}
|
|
2330
|
-
const
|
|
2331
|
-
getObjById:
|
|
2337
|
+
const fo = {
|
|
2338
|
+
getObjById: se,
|
|
2332
2339
|
generateNewObj: ot,
|
|
2333
2340
|
layout: rt,
|
|
2334
2341
|
linkDiv: mt,
|
|
@@ -2339,11 +2346,11 @@ const uo = {
|
|
|
2339
2346
|
createTopic: ut,
|
|
2340
2347
|
findEle: S,
|
|
2341
2348
|
changeTheme: Rt,
|
|
2342
|
-
...
|
|
2349
|
+
...kn,
|
|
2343
2350
|
...tt,
|
|
2344
|
-
...
|
|
2345
|
-
...
|
|
2346
|
-
...
|
|
2351
|
+
...Rn,
|
|
2352
|
+
...Gn,
|
|
2353
|
+
...ho,
|
|
2347
2354
|
init(e) {
|
|
2348
2355
|
if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData)
|
|
2349
2356
|
return new Error("MindElixir: `data` is required");
|
|
@@ -2354,31 +2361,31 @@ const uo = {
|
|
|
2354
2361
|
this.disposable.forEach((t) => t()), this.mindElixirBox && (this.mindElixirBox.innerHTML = ""), this.mindElixirBox = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNode = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.waitCopy = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.linkSvgGroup = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, (e = this.selection) == null || e.destroy(), this.selection = void 0;
|
|
2355
2362
|
}
|
|
2356
2363
|
};
|
|
2357
|
-
function
|
|
2364
|
+
function po({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, containerHeight: d }) {
|
|
2358
2365
|
let a = t + n / 2;
|
|
2359
2366
|
const u = e + o / 2;
|
|
2360
2367
|
let h;
|
|
2361
|
-
l === L.LHS ? h =
|
|
2362
|
-
const p =
|
|
2368
|
+
l === L.LHS ? h = s + r : h = s;
|
|
2369
|
+
const p = i + c / 2, v = (1 - Math.abs(p - u) / d) * 0.25 * (n / 2);
|
|
2363
2370
|
return l === L.LHS ? a = a - n / 10 - v : a = a + n / 10 + v, `M ${a} ${u} Q ${a} ${p} ${h} ${p}`;
|
|
2364
2371
|
}
|
|
2365
|
-
function
|
|
2372
|
+
function mo({ pT: e, pL: t, pW: n, pH: o, cT: i, cL: s, cW: r, cH: c, direction: l, isFirst: d }) {
|
|
2366
2373
|
const a = parseInt(this.container.style.getPropertyValue("--gap"));
|
|
2367
2374
|
let u = 0, h = 0;
|
|
2368
2375
|
d ? u = e + o / 2 : u = e + o;
|
|
2369
|
-
const p =
|
|
2376
|
+
const p = i + c;
|
|
2370
2377
|
let g = 0, v = 0, m = 0;
|
|
2371
2378
|
const f = Math.abs(u - p) / 300 * a;
|
|
2372
|
-
return l === L.LHS ? (m = t, g = m + a, v = m - a, h =
|
|
2379
|
+
return l === L.LHS ? (m = t, g = m + a, v = m - a, h = s + a, `M ${g} ${u} C ${m} ${u} ${m + f} ${p} ${v} ${p} H ${h}`) : (m = t + n, g = m - a, v = m + a, h = s + r - a, `M ${g} ${u} C ${m} ${u} ${m - f} ${p} ${v} ${p} H ${h}`);
|
|
2373
2380
|
}
|
|
2374
|
-
const
|
|
2381
|
+
const go = "4.5.0", Y = document;
|
|
2375
2382
|
function D({
|
|
2376
2383
|
el: e,
|
|
2377
2384
|
direction: t,
|
|
2378
2385
|
locale: n,
|
|
2379
2386
|
draggable: o,
|
|
2380
|
-
editable:
|
|
2381
|
-
contextMenu:
|
|
2387
|
+
editable: i,
|
|
2388
|
+
contextMenu: s,
|
|
2382
2389
|
contextMenuOption: r,
|
|
2383
2390
|
toolBar: c,
|
|
2384
2391
|
keypress: l,
|
|
@@ -2397,19 +2404,19 @@ function D({
|
|
|
2397
2404
|
const E = Object.prototype.toString.call(e);
|
|
2398
2405
|
if (E === "[object HTMLDivElement]" ? x = e : E === "[object String]" && (x = document.querySelector(e)), !x)
|
|
2399
2406
|
throw new Error("MindElixir: el is not a valid element");
|
|
2400
|
-
x.style.position = "relative", x.innerHTML = "", this.mindElixirBox = x, this.disposable = [], this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu =
|
|
2407
|
+
x.style.position = "relative", x.innerHTML = "", this.mindElixirBox = x, this.disposable = [], this.before = u || {}, this.locale = n || "en", this.contextMenuOption = r, this.contextMenu = s === void 0 ? !0 : s, this.toolBar = c === void 0 ? !0 : c, this.keypress = l === void 0 ? !0 : l, this.mouseSelectionButton = d || 0, this.direction = typeof t == "number" ? t : 1, this.draggable = o === void 0 ? !0 : o, this.newTopicName = h || "new node", this.editable = i === void 0 ? !0 : i, this.allowUndo = p === void 0 ? !1 : p, this.currentNode = null, this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.generateMainBranch = g || po, this.generateSubBranch = v || mo, this.overflowHidden = m || !1, this.bus = st.create(), this.container = Y.createElement("div"), this.selectionContainer = a || this.container, this.container.className = "map-container";
|
|
2401
2408
|
const y = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2402
2409
|
this.theme = f || (y.matches ? Be : Pe);
|
|
2403
2410
|
const w = Y.createElement("div");
|
|
2404
|
-
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ee(), this.line2 = Ee(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.alignment = b ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" :
|
|
2411
|
+
w.className = "map-canvas", this.map = w, this.map.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.mindElixirBox.appendChild(this.container), this.nodes = Y.createElement("me-nodes"), this.nodes.className = "main-node-container", this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = Y.createElement("div"), this.P3 = Y.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = Ee(), this.line2 = Ee(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.alignment = b ?? "root", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : it(this);
|
|
2405
2412
|
}
|
|
2406
|
-
D.prototype =
|
|
2413
|
+
D.prototype = fo;
|
|
2407
2414
|
D.LEFT = $;
|
|
2408
2415
|
D.RIGHT = P;
|
|
2409
2416
|
D.SIDE = ae;
|
|
2410
2417
|
D.THEME = Pe;
|
|
2411
2418
|
D.DARK_THEME = Be;
|
|
2412
|
-
D.version =
|
|
2419
|
+
D.version = go;
|
|
2413
2420
|
D.E = S;
|
|
2414
2421
|
D.new = (e) => ({
|
|
2415
2422
|
nodeData: {
|