mind-elixir 5.10.0-beta.1 → 5.10.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/LICENSE +21 -21
- package/dist/MindElixir.css +1 -1
- package/dist/MindElixir.iife.js +1 -1
- package/dist/MindElixir.js +1 -1
- package/dist/MindElixirLite.css +1 -1
- package/dist/MindElixirLite.iife.js +1 -1
- package/dist/MindElixirLite.js +1 -1
- package/dist/PlaintextConverter.js +125 -119
- package/package.json +104 -104
- package/readme.md +466 -466
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 DjZhou
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 DjZhou
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/MindElixir.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.map-container{-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;user-select:none;-webkit-user-select:none;height:100%;width:100%;overflow:hidden;font-size:16px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container p{margin:0}.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.space-pressed,.map-container.space-pressed *{cursor:grab!important}.map-container.space-pressed:active,.map-container.space-pressed:active *{cursor:grabbing!important}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.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-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);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;border-radius:3px}.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+DQo8c3ZnIHQ9IjE2NTY2NTQ3MTcyNDIiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA0ODBoLTEzOC42NjY2NjdWMzQxLjMzMzMzM2MwLTE3LjA2NjY2Ny0xNC45MzMzMzMtMzItMzItMzJzLTMyIDE0LjkzMzMzMy0zMiAzMnYxMzguNjY2NjY3SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyIDE0LjkzMzMzMy0zMiAzMnMxNC45MzMzMzMgMzIgMzIgMzJoMTM4LjY2NjY2N1Y2ODIuNjY2NjY3YzAgMTcuMDY2NjY3IDE0LjkzMzMzMyAzMiAzMiAzMnMzMi0xNC45MzMzMzMgMzItMzJ2LTEzOC42NjY2NjdINjgyLjY2NjY2N2MxNy4wNjY2NjcgMCAzMi0xNC45MzMzMzMgMzItMzJzLTE0LjkzMzMzMy0zMi0zMi0zMnoiPjwvcGF0aD4NCjwvc3ZnPg==);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+DQo8c3ZnIHQ9IjE2NTY2NTU1NjQ5ODUiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA1NDRIMzQxLjMzMzMzM2MtMTcuMDY2NjY3IDAtMzItMTQuOTMzMzMzLTMyLTMyczE0LjkzMzMzMy0zMiAzMi0zMmgzNDEuMzMzMzM0YzE3LjA2NjY2NyAwIDMyIDE0LjkzMzMzMyAzMiAzMnMtMTQuOTMzMzMzIDMyLTMyIDMyeiI+PC9wYXRoPg0KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{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;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .label-container{z-index:21}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);outline:1px solid #ccc;border-radius:2px;z-index:100}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .circle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;background:transparent}.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:absolute;top:0;left:0;box-sizing:content-box;opacity:.7;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;display:none;pointer-events:none;z-index:1000}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .svg-label{position:absolute;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;line-height:1.2;pointer-events:auto;cursor:pointer;z-index:10;width:max-content;max-width:200px;border-radius:3px;padding:var(--topic-padding)}.map-container .svg-label[data-type=arrow]{background-color:var(--main-bgcolor-transparent)}.map-container h1{font-size:1.5rem;font-weight:700;color:var(--selected)}.map-container h2{font-size:1.25rem;font-weight:600;color:var(--selected)}.map-container h3{font-size:1.125rem;font-weight:600;color:var(--selected)}.map-container h4{font-size:1rem;font-weight:600;color:var(--selected)}.map-container h5{font-size:.875rem;font-weight:600;color:var(--selected)}.map-container h6{font-size:.875rem;font-weight:500;margin:.1rem 0;color:var(--selected);font-style:italic}.map-container strong.asterisk-emphasis,.map-container em{color:var(--selected)}.map-container strong.underscore-emphasis{background:#ffeb3b40;padding:.05em .15em;border-radius:.15em}.map-container a{color:var(--selected)}.map-container a:hover{color:var(--selected);text-decoration:underline}.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:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{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}
|
|
1
|
+
.map-container{-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;user-select:none;-webkit-user-select:none;height:100%;width:100%;overflow:hidden;font-size:16px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container p{margin:0}.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.space-pressed,.map-container.space-pressed *{cursor:grab!important}.map-container.space-pressed:active,.map-container.space-pressed:active *{cursor:grabbing!important}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.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-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);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;border-radius:3px}.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}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{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;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .label-container{z-index:21}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);outline:1px solid #ccc;border-radius:2px;z-index:100}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .circle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;background:transparent}.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:absolute;top:0;left:0;box-sizing:content-box;opacity:.7;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;display:none;pointer-events:none;z-index:1000}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .svg-label{position:absolute;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;line-height:1.2;pointer-events:auto;cursor:pointer;z-index:10;width:max-content;max-width:200px;border-radius:3px;padding:var(--topic-padding)}.map-container .svg-label[data-type=arrow]{background-color:var(--main-bgcolor-transparent)}.map-container h1{font-size:1.5rem;font-weight:700;color:var(--selected)}.map-container h2{font-size:1.25rem;font-weight:600;color:var(--selected)}.map-container h3{font-size:1.125rem;font-weight:600;color:var(--selected)}.map-container h4{font-size:1rem;font-weight:600;color:var(--selected)}.map-container h5{font-size:.875rem;font-weight:600;color:var(--selected)}.map-container h6{font-size:.875rem;font-weight:500;margin:.1rem 0;color:var(--selected);font-style:italic}.map-container strong.asterisk-emphasis,.map-container em{color:var(--selected)}.map-container strong.underscore-emphasis{background:#ffeb3b40;padding:.05em .15em;border-radius:.15em}.map-container a{color:var(--selected)}.map-container a:hover{color:var(--selected);text-decoration:underline}.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:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{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}
|
package/dist/MindElixir.iife.js
CHANGED
|
@@ -13,4 +13,4 @@ var MindElixir=(function(Y){"use strict";const ne={name:"Latte",type:"light",pal
|
|
|
13
13
|
top:${t.style.top};
|
|
14
14
|
max-width: 200px;
|
|
15
15
|
`,je(s),e.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const l=i.key;if(l==="Enter"||l==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),e.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.innerText?.trim()||"";i===""?n.label=o:n.label=i,s.remove(),i!==o&&(e.markdown?t.innerHTML=e.markdown(n.label,n):t.textContent=n.label,ae(t),"parent"in n?e.bus.fire("operation",{name:"finishEditSummary",obj:n}):e.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},mn=function(e){const t=this.map.querySelector("me-root"),n=t.offsetTop,o=t.offsetLeft,s=t.offsetWidth,i=t.offsetHeight,l=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<l.length;c++){const r=l[c],a=r.querySelector("me-tpc"),{offsetLeft:d,offsetTop:h}=$(this.nodes,a),u=a.offsetWidth,y=a.offsetHeight,b=r.parentNode.className,p=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:h,cL:d,cW:u,cH:y,direction:b,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,m=a.nodeObj.branchColor||g[c%g.length];if(a.style.borderColor=m,this.lines.appendChild(qe(p,m,"3")),e&&e!==r)continue;const v=ee("subLines"),E=r.lastChild;E.tagName==="svg"&&E.remove(),r.appendChild(v),Ze(this,v,m,r,b,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Ze=function(e,t,n,o,s,i){const l=o.firstChild,c=o.children[1].children;if(c.length===0)return;const r=l.offsetTop,a=l.offsetLeft,d=l.offsetWidth,h=l.offsetHeight;for(let u=0;u<c.length;u++){const y=c[u],b=y.firstChild,p=b.offsetTop,g=b.offsetLeft,m=b.offsetWidth,v=b.offsetHeight,E=b.firstChild.nodeObj.branchColor||n,k=e.generateSubBranch({pT:r,pL:a,pW:d,pH:h,cT:p,cL:g,cW:m,cH:v,direction:s,isFirst:i});t.appendChild(qe(k,E,"2"));const _=b.children[1];if(_){if(!_.expanded)continue}else continue;Ze(e,t,E,y,s)}},yn={addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"};function bn(e,t){const n={focus:!0,link:!0,locale:yn};t=t===!0?n:Object.assign(n,t);const o=C=>{const x=document.createElement("div");return x.innerText=C,x.className="tips",x},s=(C,x,N)=>{const S=document.createElement("li");return S.id=C,S.innerHTML=`<span>${ye(x)}</span><span ${N?'class="key"':""}>${ye(N)}</span>`,S},i=t.locale,l=s("cm-add_child",i.addChild,"Tab"),c=s("cm-add_parent",i.addParent,"Ctrl + Enter"),r=s("cm-add_sibling",i.addSibling,"Enter"),a=s("cm-remove_child",i.removeNode,"Delete"),d=s("cm-fucus",i.focus,""),h=s("cm-unfucus",i.cancelFocus,""),u=s("cm-up",i.moveUp,"PgUp"),y=s("cm-down",i.moveDown,"Pgdn"),b=s("cm-link",i.link,""),p=s("cm-link-bidirectional",i.linkBidirectional,""),g=s("cm-summary",i.summary,""),m=document.createElement("ul");if(m.className="menu-list",m.appendChild(l),m.appendChild(c),m.appendChild(r),m.appendChild(a),t.focus&&(m.appendChild(d),m.appendChild(h)),m.appendChild(u),m.appendChild(y),m.appendChild(g),t.link&&(m.appendChild(b),m.appendChild(p)),t&&t.extend)for(let C=0;C<t.extend.length;C++){const x=t.extend[C],N=s(x.name,x.name,x.key||"");m.appendChild(N),N.onclick=S=>{x.onclick(S)}}const v=document.createElement("div");v.className="context-menu",v.appendChild(m),v.hidden=!0,e.container.append(v);let E=!0;const k=C=>{const x=C.target;if(re(x)){x.parentElement.tagName==="ME-ROOT"?E=!0:E=!1,E?(d.className="disabled",u.className="disabled",y.className="disabled",c.className="disabled",r.className="disabled",a.className="disabled"):(d.className="",u.className="",y.className="",c.className="",r.className="",a.className=""),v.hidden=!1,m.style.top="",m.style.bottom="",m.style.left="",m.style.right="";const N=m.offsetHeight,S=m.offsetWidth,A=m.getBoundingClientRect(),L=C.clientY-A.top,B=C.clientX-A.left;N+L>window.innerHeight?(m.style.top="",m.style.bottom="0px"):(m.style.bottom="",m.style.top=L+15+"px"),S+B>window.innerWidth?(m.style.left="",m.style.right="0px"):(m.style.right="",m.style.left=B+10+"px")}};e.bus.addListener("showContextMenu",k),v.onclick=C=>{C.target===v&&(v.hidden=!0)},l.onclick=()=>{e.addChild(),v.hidden=!0},c.onclick=()=>{e.insertParent(),v.hidden=!0},r.onclick=()=>{E||(e.insertSibling("after"),v.hidden=!0)},a.onclick=()=>{E||(e.removeNodes(e.currentNodes||[]),v.hidden=!0)},d.onclick=()=>{E||(e.focusNode(e.currentNode),v.hidden=!0)},h.onclick=()=>{e.cancelFocus(),v.hidden=!0},u.onclick=()=>{E||(e.moveUpNode(),v.hidden=!0)},y.onclick=()=>{E||(e.moveDownNode(),v.hidden=!0)};const _=C=>{v.hidden=!0;const x=e.currentNode,N=o(i.clickTips);e.container.appendChild(N),e.map.addEventListener("click",S=>{S.preventDefault(),N.remove();const A=S.target;(A.parentElement.tagName==="ME-PARENT"||A.parentElement.tagName==="ME-ROOT")&&e.createArrow(x,A,C)},{once:!0})};return b.onclick=()=>_(),p.onclick=()=>_({bidirectional:!0}),g.onclick=()=>{v.hidden=!0,e.createSummary(),e.unselectNodes(e.currentNodes)},()=>{l.onclick=null,c.onclick=null,r.onclick=null,a.onclick=null,d.onclick=null,h.onclick=null,u.onclick=null,y.onclick=null,b.onclick=null,g.onclick=null,v.onclick=null,e.container.oncontextmenu=null}}const vn=function(e){return["createSummary","removeSummary","finishEditSummary"].includes(e.name)?{type:"summary",value:e.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(e.name)?{type:"arrow",value:e.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(e.name)?{type:"nodes",value:e.objs.map(t=>t.id)}:{type:"nodes",value:[e.obj.id]}};function wn(e){let t=[],n=-1,o=e.getData(),s=[];e.undo=function(){if(n>-1){const r=t[n];o=r.prev,e.refresh(r.prev);try{r.currentTarget.type==="nodes"&&(r.operation==="removeNodes"?e.selectNodes(r.currentTarget.value.map(a=>this.findEle(a))):e.selectNodes(r.currentSelected.map(a=>this.findEle(a))))}catch{}finally{n--}}},e.redo=function(){if(n<t.length-1){n++;const r=t[n];o=r.next,e.refresh(r.next);try{r.currentTarget.type==="nodes"&&(r.operation==="removeNodes"?e.selectNodes(r.currentSelected.map(a=>this.findEle(a))):e.selectNodes(r.currentTarget.value.map(a=>this.findEle(a))))}catch{}}},e.clearHistory=function(){t=[],n=-1,o=e.getData(),e.clearSelection()};const i=function(r){if(r.name==="beginEdit")return;t=t.slice(0,n+1);const a=e.getData(),d={prev:o,operation:r.name,currentSelected:s.map(h=>h.id),currentTarget:vn(r),next:a};t.push(d),o=a,n=t.length-1},l=function(r){(r.metaKey||r.ctrlKey)&&(r.shiftKey&&r.key==="Z"||r.key==="y")?e.redo():(r.metaKey||r.ctrlKey)&&r.key==="z"&&e.undo()},c=function(){s=e.currentNodes.map(r=>r.nodeObj)};return e.bus.addListener("operation",i),e.bus.addListener("selectNodes",c),e.container.addEventListener("keydown",l),()=>{e.bus.removeListener("operation",i),e.bus.removeListener("selectNodes",c),e.container.removeEventListener("keydown",l)}}const xn={side:'<?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"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2022"></path></svg>',left:'<?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"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="1776"></path></svg>',right:'<?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"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="3038"></path></svg>',full:'<?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"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2171"></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" p-id="2172"></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" p-id="2173"></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" p-id="2174"></path></svg>',living:'<?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"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="2884"></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="currentColor" p-id="2885"></path></svg>',zoomin:'<?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"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2481"></path></svg>',zoomout:'<?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"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2731"></path></svg>'},z=(e,t)=>{const n=document.createElement("span");return n.id=e,n.innerHTML=xn[t],n};function En(e){const t=document.createElement("div"),n=z("fullscreen","full"),o=z("toCenter","living"),s=z("zoomout","zoomout"),i=z("zoomin","zoomin");t.appendChild(n),t.appendChild(o),t.appendChild(s),t.appendChild(i),t.className="mind-elixir-toolbar rb";let l=null;const c=()=>{const a=e.container.getBoundingClientRect(),d=xe(e.map.style.transform),h=a.width/2,u=a.height/2,y=(h-d.x)/e.scaleVal,b=(u-d.y)/e.scaleVal;l={containerRect:a,currentTransform:d,mapCenterX:y,mapCenterY:b}},r=()=>{if(l){const a=e.container.getBoundingClientRect(),d=a.width/2,h=a.height/2,u=d-l.mapCenterX*e.scaleVal,y=h-l.mapCenterY*e.scaleVal,b=u-l.currentTransform.x,p=y-l.currentTransform.y;e.move(b,p)}};return e.el.addEventListener("fullscreenchange",r),n.onclick=()=>{c(),document.fullscreenElement!==e.el?e.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{e.toCenter()},s.onclick=()=>{e.scale(e.scaleVal-e.scaleSensitivity)},i.onclick=()=>{e.scale(e.scaleVal+e.scaleSensitivity)},t}function Cn(e){const t=document.createElement("div"),n=z("tbltl","left"),o=z("tbltr","right"),s=z("tblts","side");return t.appendChild(n),t.appendChild(o),t.appendChild(s),t.className="mind-elixir-toolbar lt",n.onclick=()=>{e.initLeft()},o.onclick=()=>{e.initRight()},s.onclick=()=>{e.initSide()},t}function Sn(e){e.container.append(En(e)),e.container.append(Cn(e))}class Nn{_listeners=new Map;addEventListener(t,n){const o=this._listeners.get(t)??new Set;return this._listeners.set(t,o),o.add(n),this}removeEventListener(t,n){return this._listeners.get(t)?.delete(n),this}dispatchEvent(t,...n){let o=!0;for(const s of this._listeners.get(t)??[])o=s(...n)!==!1&&o;return o}unbindAllListeners(){this._listeners.clear()}on=this.addEventListener;off=this.removeEventListener;emit=this.dispatchEvent}const Qe=(e,t="px")=>typeof e=="number"?e+t:e,W=({style:e},t,n)=>{if(typeof t=="object")for(const[o,s]of Object.entries(t))s!==void 0&&(e[o]=Qe(s));else n!==void 0&&(e[t]=Qe(n))},et=(e=0,t=0,n=0,o=0)=>{const s={x:e,y:t,width:n,height:o,top:t,left:e,right:e+n,bottom:t+o};return{...s,toJSON:()=>JSON.stringify(s)}},Tn=e=>{let t,n=-1,o=!1;return{next:(...s)=>{t=s,o||(o=!0,n=requestAnimationFrame(()=>{e(...t),o=!1}))},cancel:()=>{cancelAnimationFrame(n),o=!1}}},tt=(e,t,n="touch")=>{switch(n){case"center":{const o=t.left+t.width/2,s=t.top+t.height/2;return o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom}case"cover":return t.left>=e.left&&t.top>=e.top&&t.right<=e.right&&t.bottom<=e.bottom;case"touch":return e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}},_n=()=>matchMedia("(hover: none), (pointer: coarse)").matches,kn=()=>"safari"in window,De=e=>Array.isArray(e)?e:[e],nt=e=>(t,n,o,s={})=>{(t instanceof HTMLCollection||t instanceof NodeList)&&(t=Array.from(t)),n=De(n),t=De(t);for(const i of t)if(i)for(const l of n)i[e](l,o,{capture:!1,...s})},F=nt("addEventListener"),H=nt("removeEventListener"),de=e=>{const{clientX:t,clientY:n,target:o}=e.touches?.[0]??e;return{x:t,y:n,target:o}},J=(e,t=document)=>De(e).map(n=>typeof n=="string"?Array.from(t.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),Ln=(e,t)=>t.some(n=>typeof n=="number"?e.button===n:typeof n=="object"?n.button!==e.button?!1:n.modifiers.every(o=>{switch(o){case"alt":return e.altKey;case"ctrl":return e.ctrlKey||e.metaKey;case"shift":return e.shiftKey}}):!1),{abs:V,max:ot,min:st,ceil:it}=Math,rt=(e=[])=>({stored:e,selected:[],touched:[],changed:{added:[],removed:[]}});class Dn extends Nn{static version="mind-elixir-fork";_options;_selection=rt();_area;_clippingElement;_targetElement;_targetBoundary;_targetBoundaryScrolled=!0;_targetRect;_selectables=[];_latestElement;_areaLocation={y1:0,x2:0,y2:0,x1:0};_areaRect=et();_singleClick=!0;_frame;_scrollAvailable=!0;_scrollingActive=!1;_scrollSpeed={x:0,y:0};_scrollDelta={x:0,y:0};_lastMousePosition={x:0,y:0};constructor(t){super(),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",mindElixirInstance:void 0,...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:t.behaviour?.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...t.behaviour?.scrolling,startScrollMargins:{x:0,y:0,...t.behaviour?.scrolling?.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...t.features?.singleTap}}};for(const i of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[i]=="function"&&(this[i]=this[i].bind(this));const{document:n,selectionAreaClass:o,selectionContainerClass:s}=this._options;this._area=n.createElement("div"),this._clippingElement=n.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(o),s&&this._clippingElement.classList.add(s),W(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),W(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=Tn(i=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",i),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:n,features:o}=this._options,s=t?F:H;s(n,"mousedown",this._onTapStart),o.touch&&s(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,n=!1){const{x:o,y:s,target:i}=de(t),{document:l,startAreas:c,boundaries:r,features:a,behaviour:d}=this._options,h=i.getBoundingClientRect();if(t instanceof MouseEvent&&!Ln(t,d.triggers))return;const u=J(c,l),y=J(r,l);this._targetElement=y.find(m=>tt(m.getBoundingClientRect(),h));const b=t.composedPath(),p=u.find(m=>b.includes(m));if(this._targetBoundary=y.find(m=>b.includes(m)),!this._targetElement||!p||!this._targetBoundary||!n&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:o,y1:s,x2:0,y2:0};const g=l.scrollingElement??l.body;this._scrollDelta={x:g.scrollLeft,y:g.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),F(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),F(l,["mouseup","touchcancel","touchend"],this._onTapStop),F(l,"scroll",this._onScroll),a.deselectOnBlur&&(this._targetBoundaryScrolled=!1,F(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:n},range:o}=this._options.features,s=de(t);let i;if(n==="native")i=s.target;else if(n==="touch"){this.resolveSelectables();const{x:c,y:r}=s;i=this._selectables.find(a=>{const{right:d,left:h,top:u,bottom:y}=a.getBoundingClientRect();return c<d&&c>h&&r<y&&r>u})}if(!i)return;for(this.resolveSelectables();!this._selectables.includes(i);)if(i.parentElement)i=i.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:l}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&o&&this._latestElement){const c=this._latestElement,[r,a]=c.compareDocumentPosition(i)&4?[i,c]:[c,i],d=[...this._selectables.filter(h=>h.compareDocumentPosition(r)&4&&h.compareDocumentPosition(a)&2),r,a];this.select(d),this._latestElement=c}else l.includes(i)&&(l.length===1||t.ctrlKey||l.every(c=>this._selection.stored.includes(c)))?this.deselect(i):(this.select(i),this._latestElement=i)}_delayedTapMove(t){const{container:n,document:o,behaviour:{startThreshold:s}}=this._options,{x1:i,y1:l}=this._areaLocation,{x:c,y:r}=de(t);if(typeof s=="number"&&V(c+r-(i+l))>=s||typeof s=="object"&&V(c-i)>=s.x||V(r-l)>=s.y){if(H(o,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){H(o,["mouseup","touchcancel","touchend"],this._onTapStop);return}F(o,["mousemove","touchmove"],this._onTapMove,{passive:!1}),W(this._area,"display","block"),J(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&&(F(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),F(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(a=>this._targetElement.contains(a))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:n,_area:o}=this,s=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(W(t,{top:s.top,left:s.left,width:s.width,height:s.height}),W(o,{marginTop:-s.top,marginLeft:-s.left})):(W(t,{top:0,left:0,width:"100%",height:"100%"}),W(o,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:n,_areaLocation:o,_options:s,_frame:i}=this,{speedDivider:l}=s.behaviour.scrolling;this._targetElement;const{x:c,y:r}=de(t);if(o.x2=c,o.y2=r,this._lastMousePosition.x=c,this._lastMousePosition.y=r,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const a=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const d=this._options.mindElixirInstance;if(d&&d.move){const h=n.x?it(n.x/l):0,u=n.y?it(n.y/l):0;(h||u)&&(d.move(-h,-u),o.x1-=h,o.y1-=u)}i.next(t),requestAnimationFrame(a)};requestAnimationFrame(a)}else i.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:n}=this._options;(n.touch&&_n()||this._scrollAvailable&&kn())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:n}}=this,{scrollTop:o,scrollLeft:s}=n.scrollingElement??n.body;this._areaLocation.x1+=t.x-s,this._areaLocation.y1+=t.y-o,t.x=s,t.y=o,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,H(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.deltaY?t.deltaY>0?1:-1:0,s=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=o*n,this._scrollSpeed.x+=s*n,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:n}=this._options.behaviour.scrolling,o=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,s=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(o)*n,this._scrollSpeed.y+=Math.sign(s)*n,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:n,_targetElement:o,_options:s}=this,i=this._targetRect,{x1:l,y1:c}=n;let{x2:r,y2:a}=n;const{behaviour:{scrolling:{startScrollMargins:d}}}=s;r<i.left+d.x?(t.x=-V(i.left-r+d.x),r=r<i.left?i.left:r):r>i.right-d.x?(t.x=V(i.left+i.width-r-d.x),r=r>i.right?i.right:r):t.x=0,a<i.top+d.y?(t.y=-V(i.top-a+d.y),a=a<i.top?i.top:a):a>i.bottom-d.y?(t.y=V(i.top+i.height-a-d.y),a=a>i.bottom?i.bottom:a):t.y=0;const h=st(l,r),u=st(c,a),y=ot(l,r),b=ot(c,a);this._areaRect=et(h,u,y-h,b-u)}_redrawSelectionArea(){const{x:t,y:n,width:o,height:s}=this._areaRect,{style:i}=this._area;i.left=`${t}px`,i.top=`${n}px`,i.width=`${o}px`,i.height=`${s}px`}_onTapStop(t,n){const{document:o,features:s}=this._options,{_singleClick:i}=this;H(this._targetElement,"scroll",this._onStartAreaScroll),H(o,["mousemove","touchmove"],this._delayedTapMove),H(o,["touchmove","mousemove"],this._onTapMove),H(o,["mouseup","touchcancel","touchend"],this._onTapStop),H(o,"scroll",this._onScroll),this._keepSelection(),t&&i&&s.singleTap.allow?this._onSingleTap(t):!i&&!n&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,H(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),H(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),this._frame?.cancel(),W(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:n,_selection:o,_areaRect:s}=this,{stored:i,selected:l,touched:c}=o,{intersect:r,overlap:a}=n.behaviour,d=a==="invert",h=[],u=[],y=[];for(let p=0;p<t.length;p++){const g=t[p];if(tt(s,g.getBoundingClientRect(),r)){if(l.includes(g))i.includes(g)&&!c.includes(g)&&c.push(g);else if(d&&i.includes(g)){y.push(g);continue}else u.push(g);h.push(g)}}d&&u.push(...i.filter(p=>!l.includes(p)));const b=a==="keep";for(let p=0;p<l.length;p++){const g=l[p];!h.includes(g)&&!(b&&i.includes(g))&&y.push(g)}o.selected=h,o.changed={added:u,removed:y},this._latestElement=void 0}_emitEvent(t,n){return this.emit(t,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:n}=this,{selected:o,changed:s,touched:i,stored:l}=n,c=o.filter(r=>!l.includes(r));switch(t.behaviour.overlap){case"drop":{n.stored=[...c,...l.filter(r=>!i.includes(r))];break}case"invert":{n.stored=[...c,...l.filter(r=>!s.removed.includes(r))];break}case"keep":{n.stored=[...l,...o.filter(r=>!l.includes(r))];break}}}trigger(t,n=!0){this._onTapStart(t,n)}resolveSelectables(){this._selectables=J(this._options.selectables,this._options.document)}clearSelection(t=!0,n=!1){const{selected:o,stored:s,changed:i}=this._selection;i.added=[],i.removed.push(...o,...t?s:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=rt(t?[]:s)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}enable=this._toggleStartEvents;disable=this._toggleStartEvents.bind(this,!1);select(t,n=!1){const{changed:o,selected:s,stored:i}=this._selection,l=J(t,this._options.document).filter(c=>!s.includes(c)&&!i.includes(c));return i.push(...l),s.push(...l),o.added.push(...l),o.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),l}deselect(t,n=!1){const{selected:o,stored:s,changed:i}=this._selection,l=J(t,this._options.document).filter(c=>o.includes(c)||s.includes(c));this._selection.stored=s.filter(c=>!l.includes(c)),this._selection.selected=o.filter(c=>!l.includes(c)),this._selection.changed.added=[],this._selection.changed.removed.push(...l.filter(c=>!i.removed.includes(c))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}}function An(e){const t=e.mouseSelectionButton===2?[2]:[0],n=new Dn({selectables:[".map-container me-tpc"],boundaries:[e.container],container:e.selectionContainer,mindElixirInstance:e,features:{touch:!1},behaviour:{triggers:t,scrolling:{speedDivider:10,startScrollMargins:{x:50,y:50}}}}).on("beforestart",({event:o})=>{if(!e.editable||e.spacePressed)return!1;const s=o.target;if(s.id==="input-box"||s.className==="circle"||e.container.querySelector(".context-menu")?.contains(s))return!1;if(!o.ctrlKey&&!o.metaKey){if(s.tagName==="ME-TPC"&&s.classList.contains("selected"))return!1;e.clearSelection()}const i=n.getSelectionArea();return i.style.background="#4f90f22d",i.style.border="1px solid #4f90f2",i.parentElement&&(i.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:o,removed:s}}})=>{if(o.length>0||s.length>0,o.length>0){for(const i of o)i.className="selected";e.currentNodes=[...e.currentNodes,...o],e.bus.fire("selectNodes",o.map(i=>i.nodeObj))}if(s.length>0){for(const i of s)i.classList.remove("selected");e.currentNodes=e.currentNodes.filter(i=>!s?.includes(i)),e.bus.fire("unselectNodes",s.map(i=>i.nodeObj))}});e.selection=n}const Mn=function(e,t=!0){this.theme=e;const o={...(e.type==="dark"?oe:ne).cssVar,...e.cssVar},s=Object.keys(o);for(let i=0;i<s.length;i++){const l=s[i];this.container.style.setProperty(l,o[l])}t&&this.refresh()},lt={create:function(e){return{dom:e,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(t){if(this.pointerdown){this.moved=!0;const n=t.clientX-this.lastX,o=t.clientY-this.lastY;this.lastX=t.clientX,this.lastY=t.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(t){t.button===0&&(this.pointerdown=!0,this.lastX=t.clientX,this.lastY=t.clientY,this.dom.setPointerCapture(t.pointerId))},handleClear(t){this.pointerdown=!1,t.pointerId!==void 0&&this.dom.releasePointerCapture(t.pointerId)},cb:null,init(t,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Oe([{dom:t,evt:"pointermove",func:this.handlePointerMove},{dom:t,evt:"pointerleave",func:this.handleClear},{dom:t,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Pn="#4dc4ff";function ct(e,t,n,o,s,i,l,c){return{x:e/8+n*3/8+s*3/8+l/8,y:t/8+o*3/8+i*3/8+c/8}}function On(e,t,n){e&&(e.dataset.x=t.toString(),e.dataset.y=n.toString(),ae(e))}function he(e,t,n,o,s){D(e,{x1:t+"",y1:n+"",x2:o+"",y2:s+""})}function at(e,t,n,o,s,i,l,c,r,a){const d=`M ${t} ${n} C ${o} ${s} ${i} ${l} ${c} ${r}`;if(e.line.setAttribute("d",d),a.style){const p=a.style;p.stroke&&e.line.setAttribute("stroke",p.stroke),p.strokeWidth&&e.line.setAttribute("stroke-width",String(p.strokeWidth)),p.strokeDasharray&&e.line.setAttribute("stroke-dasharray",p.strokeDasharray),p.strokeLinecap&&e.line.setAttribute("stroke-linecap",p.strokeLinecap),p.opacity!==void 0&&e.line.setAttribute("opacity",String(p.opacity))}const h=e.querySelectorAll('path[stroke="transparent"]');h.length>0&&h[0].setAttribute("d",d);const u=ie(i,l,c,r);if(u){const p=`M ${u.x1} ${u.y1} L ${c} ${r} L ${u.x2} ${u.y2}`;if(e.arrow1.setAttribute("d",p),h.length>1&&h[1].setAttribute("d",p),a.style){const g=a.style;g.stroke&&e.arrow1.setAttribute("stroke",g.stroke),g.strokeWidth&&e.arrow1.setAttribute("stroke-width",String(g.strokeWidth)),g.strokeLinecap&&e.arrow1.setAttribute("stroke-linecap",g.strokeLinecap),g.opacity!==void 0&&e.arrow1.setAttribute("opacity",String(g.opacity))}}if(a.bidirectional){const p=ie(o,s,t,n);if(p){const g=`M ${p.x1} ${p.y1} L ${t} ${n} L ${p.x2} ${p.y2}`;if(e.arrow2.setAttribute("d",g),h.length>2&&h[2].setAttribute("d",g),a.style){const m=a.style;m.stroke&&e.arrow2.setAttribute("stroke",m.stroke),m.strokeWidth&&e.arrow2.setAttribute("stroke-width",String(m.strokeWidth)),m.strokeLinecap&&e.arrow2.setAttribute("stroke-linecap",m.strokeLinecap),m.opacity!==void 0&&e.arrow2.setAttribute("opacity",String(m.opacity))}}}const{x:y,y:b}=ct(t,n,o,s,i,l,c,r);if(e.labelEl&&On(e.labelEl,y,b),a.style?.labelColor){const p=e.labelEl;p&&(p.style.color=a.style.labelColor)}Fn(e)}function fe(e,t,n){const{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=t.offsetWidth,l=t.offsetHeight,c=o+i/2,r=s+l/2,a=c+n.x,d=r+n.y;return{w:i,h:l,cx:c,cy:r,ctrlX:a,ctrlY:d}}function Z(e){let t,n;const o=(e.cy-e.ctrlY)/(e.ctrlX-e.cx);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),{x:t,y:n}}const $n=function(e,t,n){const o=$(e.nodes,t),s=$(e.nodes,n),i=o.offsetLeft+t.offsetWidth/2,l=o.offsetTop+t.offsetHeight/2,c=s.offsetLeft+n.offsetWidth/2,r=s.offsetTop+n.offsetHeight/2,a=c-i,d=r-l,h=Math.sqrt(a*a+d*d),u=Math.max(50,Math.min(200,h*.3)),y=Math.abs(a),b=Math.abs(d);let p,g;if(h<150){const v=t.closest("me-main").className==="lhs"?-1:1;p={x:200*v,y:0},g={x:200*v,y:0}}else if(y>b*1.5){const v=a>0?t.offsetWidth/2:-t.offsetWidth/2,E=a>0?-n.offsetWidth/2:n.offsetWidth/2;p={x:v+(a>0?u:-u),y:0},g={x:E+(a>0?-u:u),y:0}}else if(b>y*1.5){const v=d>0?t.offsetHeight/2:-t.offsetHeight/2,E=d>0?-n.offsetHeight/2:n.offsetHeight/2;p={x:0,y:v+(d>0?u:-u)},g={x:0,y:E+(d>0?-u:u)}}else{const v=Math.atan2(d,a),E=t.offsetWidth/2*Math.cos(v),k=t.offsetHeight/2*Math.sin(v),_=-(n.offsetWidth/2)*Math.cos(v),C=-(n.offsetHeight/2)*Math.sin(v),x=u*.7*(a>0?1:-1),N=u*.7*(d>0?1:-1);p={x:E+x,y:k+N},g={x:_-x,y:C-N}}return{delta1:p,delta2:g}},Ae=function(e,t,n,o,s){if(!t||!n)return;if(!o.delta1||!o.delta2){const S=$n(e,t,n);o.delta1=S.delta1,o.delta2=S.delta2}const i=fe(e,t,o.delta1),l=fe(e,n,o.delta2),{x:c,y:r}=Z(i),{ctrlX:a,ctrlY:d}=i,{ctrlX:h,ctrlY:u}=l,{x:y,y:b}=Z(l),p=ie(h,u,y,b);if(!p)return;const g=`M ${p.x1} ${p.y1} L ${y} ${b} L ${p.x2} ${p.y2}`;let m="";if(o.bidirectional){const S=ie(a,d,c,r);if(!S)return;m=`M ${S.x1} ${S.y1} L ${c} ${r} L ${S.x2} ${S.y2}`}const v=gn(`M ${c} ${r} C ${a} ${d} ${h} ${u} ${y} ${b}`,g,m,o.style),{x:E,y:k}=ct(c,r,a,d,h,u,y,b),_=o.style?.labelColor||"rgb(235, 95, 82)",C="arrow-"+o.id;v.id=C;const x=e.markdown?e.markdown(o.label,o):o.label,N=Le(x,E,k,{anchor:"middle",color:_,dataType:"arrow",svgId:C});v.labelEl=N,v.arrowObj=o,v.dataset.linkid=o.id,e.labelContainer.appendChild(N),e.linkSvgGroup.appendChild(v),ae(N),s||(e.arrows.push(o),e.currentArrow=v,dt(e,o,i,l))},Hn=function(e,t,n={}){const o={id:G(),label:"Custom Link",from:e.nodeObj.id,to:t.nodeObj.id,...n};Ae(this,e,t,o),this.bus.fire("operation",{name:"createArrow",obj:o})},jn=function(e){ue(this);const t={...e,id:G()};Ae(this,this.findEle(t.from),this.findEle(t.to),t),this.bus.fire("operation",{name:"createArrow",obj:t})},In=function(e){let t;if(e?t=e:t=this.currentArrow,!t)return;ue(this);const n=t.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),t.labelEl?.remove(),t.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},Rn=function(e){this.currentArrow=e;const t=e.arrowObj,n=this.findEle(t.from),o=this.findEle(t.to),s=fe(this,n,t.delta1),i=fe(this,o,t.delta2);dt(this,t,s,i)},Bn=function(){ue(this),this.currentArrow=null},Me=function(e,t){const n=document.createElementNS(I,"path");return D(n,{d:e,stroke:t,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Yn=function(e,t){const n=document.createElementNS(I,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=Me(e.line.getAttribute("d"),t);n.appendChild(o);const s=Me(e.arrow1.getAttribute("d"),t);if(n.appendChild(s),e.arrow2.getAttribute("d")){const i=Me(e.arrow2.getAttribute("d"),t);n.appendChild(i)}e.insertBefore(n,e.firstChild)},Wn=function(e){const t=e.querySelector(".arrow-highlight");t&&t.remove()},Fn=function(e){const t=e.querySelector(".arrow-highlight");if(!t)return;const n=t.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",e.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",e.arrow1.getAttribute("d")),n.length>=3&&e.arrow2.getAttribute("d")&&n[2].setAttribute("d",e.arrow2.getAttribute("d"))},ue=function(e){e.helper1?.destroy(),e.helper2?.destroy(),e.linkController.style.display="none",e.P2.style.display="none",e.P3.style.display="none",e.currentArrow&&Wn(e.currentArrow)},dt=function(e,t,n,o){const{linkController:s,P2:i,P3:l,line1:c,line2:r,nodes:a,map:d,currentArrow:h,bus:u}=e;if(!h)return;s.style.display="initial",i.style.display="initial",l.style.display="initial",a.appendChild(s),a.appendChild(i),a.appendChild(l),Yn(h,Pn);let{x:y,y:b}=Z(n),{ctrlX:p,ctrlY:g}=n,{ctrlX:m,ctrlY:v}=o,{x:E,y:k}=Z(o);i.style.cssText=`top:${g}px;left:${p}px;`,l.style.cssText=`top:${v}px;left:${m}px;`,he(c,y,b,p,g),he(r,m,v,E,k),e.helper1=lt.create(i),e.helper2=lt.create(l),e.helper1.init(d,(_,C)=>{p=p+_/e.scaleVal,g=g+C/e.scaleVal;const x=Z({...n,ctrlX:p,ctrlY:g});y=x.x,b=x.y,i.style.top=g+"px",i.style.left=p+"px",at(h,y,b,p,g,m,v,E,k,t),he(c,y,b,p,g),t.delta1.x=p-n.cx,t.delta1.y=g-n.cy,u.fire("updateArrowDelta",t)}),e.helper2.init(d,(_,C)=>{m=m+_/e.scaleVal,v=v+C/e.scaleVal;const x=Z({...o,ctrlX:m,ctrlY:v});E=x.x,k=x.y,l.style.top=v+"px",l.style.left=m+"px",at(h,y,b,p,g,m,v,E,k,t),he(r,m,v,E,k),t.delta2.x=m-o.cx,t.delta2.y=v-o.cy,u.fire("updateArrowDelta",t)})};function Xn(){this.linkSvgGroup.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(t=>t.remove());for(let t=0;t<this.arrows.length;t++){const n=this.arrows[t];try{Ae(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Gn(e){ue(this),e&&e.labelEl&&Je(this,e.labelEl,e.arrowObj)}function zn(){this.arrows=this.arrows.filter(e=>se(e.from,this.nodeData)&&se(e.to,this.nodeData))}const Vn=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Hn,createArrowFrom:jn,editArrowLabel:Gn,removeArrow:In,renderArrow:Xn,selectArrow:Rn,tidyArrow:zn,unselectArrow:Bn},Symbol.toStringTag,{value:"Module"})),Kn=function(e){if(e.length===0)throw new Error("No selected node.");if(e.length===1){const r=e[0].nodeObj,a=e[0].nodeObj.parent;if(!a)throw new Error("Can not select root node.");const d=a.children.findIndex(h=>r===h);return{parent:a.id,start:d,end:d}}let t=0;const n=e.map(r=>{let a=r.nodeObj;const d=[];for(;a.parent;){const h=a.parent,y=h.children?.indexOf(a);a=h,d.unshift({node:a,index:y})}return d.length>t&&(t=d.length),d});let o=0;e:for(;o<t;o++){const r=n[0][o]?.node;for(let a=1;a<n.length;a++)if(n[a][o]?.node!==r)break e}if(!o)throw new Error("Can not select root node.");const s=n.map(r=>r[o-1].index).sort(),i=s[0]||0,l=s[s.length-1]||0,c=n[0][o-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:i,end:l}},qn=function(e){const t=document.createElementNS(I,"g");return t.setAttribute("id",e),t},ht=function(e,t){const n=document.createElementNS(I,"path");return D(n,{d:e,stroke:t||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Un=e=>e.parentElement.parentElement,Jn=function(e,{parent:t,start:n}){const o=e.findEle(t),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=e.findEle(s.children[n].id).closest("me-main").className,i},Pe=function(e,t){const{id:n,label:o,parent:s,start:i,end:l,style:c}=t,{nodes:r,theme:a,summarySvg:d}=e,u=e.findEle(s).nodeObj,y=Jn(e,t);let b=1/0,p=0,g=0,m=0;for(let f=i;f<=l;f++){const w=u.children?.[f];if(!w)return e.removeSummary(n),null;const T=Un(e.findEle(w.id)),{offsetLeft:O,offsetTop:K}=$(r,T),M=i===l?10:20;f===i&&(g=K+M),f===l&&(m=K+T.offsetHeight-M),O<b&&(b=O),T.offsetWidth+O>p&&(p=T.offsetWidth+O)}let v,E;const k=u.parent?10:0,_=g+k,C=m+k,x=(_+C)/2,N=c?.stroke||a.cssVar["--color"],S=c?.labelColor||a.cssVar["--color"],A="s-"+n,L=e.markdown?e.markdown(o,t):o;y===R.LHS?(v=ht(`M ${b+10} ${_} c -5 0 -10 5 -10 10 L ${b} ${C-10} c 0 5 5 10 10 10 M ${b} ${x} h -10`,N),E=Le(L,b-20,x,{anchor:"end",color:S,dataType:"summary",svgId:A})):(v=ht(`M ${p-10} ${_} c 5 0 10 5 10 10 L ${p} ${C-10} c 0 5 -5 10 -10 10 M ${p} ${x} h 10`,N),E=Le(L,p+20,x,{anchor:"start",color:S,dataType:"summary",svgId:A}));const B=qn(A);return B.appendChild(v),e.labelContainer.appendChild(E),ae(E),B.summaryObj=t,B.labelEl=E,d.appendChild(B),B},Zn=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(e={}){if(!this.currentNodes)return;const{currentNodes:t,summaries:n,bus:o}=this,{parent:s,start:i,end:l}=Kn(t),c={id:G(),parent:s,start:i,end:l,label:"summary",style:e.style},r=Pe(this,c);n.push(c),this.editSummary(r),o.fire("operation",{name:"createSummary",obj:c})},createSummaryFrom:function(e){const t=G(),n={...e,id:t};Pe(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(e){e&&e.labelEl&&Je(this,e.labelEl,e.summaryObj)},removeSummary:function(e){const t=this.summaries.findIndex(n=>n.id===e);t>-1&&(this.summaries.splice(t,1),this.nodes.querySelector("#s-"+e)?.remove(),this.nodes.querySelector("#label-s-"+e)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:e}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(e=>{try{Pe(this,e)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(e){const t=e.labelEl;t&&t.classList.add("selected"),this.currentSummary=e},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),P="http://www.w3.org/2000/svg";function Qn(e,t){const n=document.createElementNS(P,"svg");return D(n,{version:"1.1",xmlns:P,height:e,width:t}),n}function eo(e,t){return(parseInt(e)-parseInt(t))/2}function to(e,t,n,o){const s=document.createElementNS(P,"g");let i="";return e.text?i=e.text.textContent:i=e.childNodes[0].textContent,i.split(`
|
|
16
|
-
`).forEach((c,r)=>{const a=document.createElementNS(P,"text");D(a,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+eo(t.lineHeight,t.fontSize)*(r+1)+parseFloat(t.fontSize)*(r+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function no(e,t,n,o){let s="";e.nodeObj?.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");D(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const l=document.createElement("div");return D(l,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),l.innerHTML=s,i.appendChild(l),i}function oo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function pe(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=$(e.nodes,t),l=document.createElementNS(P,"rect");D(l,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(l);let r;return n?r=no(t,o,s,i):r=to(t,o,s,i),c.appendChild(r),c}function so(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"a"),l=document.createElementNS(P,"text");return D(l,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),l.innerHTML=t.textContent,i.appendChild(l),i.setAttribute("href",t.href),i}function io(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const ge=100,ro='<?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">',lo=(e,t=!1)=>{const n=e.nodes,o=n.offsetHeight+ge*2,s=n.offsetWidth+ge*2,i=Qn(o+"px",s+"px"),l=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(h=>{const u=h.cloneNode(!0),{offsetLeft:y,offsetTop:b}=$(n,h.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${b}`),l.appendChild(u)});const r=n.querySelector(".lines")?.cloneNode(!0);r&&l.appendChild(r);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&l.appendChild(a);const d=n.querySelector(".summary")?.cloneNode(!0);return d&&l.appendChild(d),n.querySelectorAll("me-tpc").forEach(h=>{h.nodeObj.dangerouslySetInnerHTML?l.appendChild(pe(e,h,!t)):(l.appendChild(oo(e,h)),l.appendChild(pe(e,h.text,!t)))}),n.querySelectorAll(".tags > span").forEach(h=>{l.appendChild(pe(e,h))}),n.querySelectorAll(".icons > span").forEach(h=>{l.appendChild(pe(e,h))}),n.querySelectorAll(".hyper-link").forEach(h=>{l.appendChild(so(e,h))}),n.querySelectorAll("img").forEach(h=>{l.appendChild(io(e,h))}),D(l,{x:ge+"",y:ge+"",overflow:"visible"}),i.appendChild(l),i},co=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ro+e.outerHTML);function ao(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const ho=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await ao(n);return new Promise((s,i)=>{const l=new Image;l.setAttribute("crossOrigin","anonymous"),l.onload=()=>{const c=document.createElement("canvas");c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0),c.toBlob(s,"image/png",1)},l.src=o,l.onerror=i})},exportSvg:function(e=!1,t){const n=lo(this,e),o=co(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function fo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const ft=Object.keys(Ye),ut={};for(let e=0;e<ft.length;e++){const t=ft[e];ut[t]=fo(Ye[t],t)}const uo={getObjById:se,generateNewObj:pt,layout:gt,linkDiv:mn,editTopic:Et,createWrapper:bt,createParent:vt,createChildren:wt,createTopic:xt,findEle:He,changeTheme:Mn,...Zt,...ut,...Vn,...Zn,...ho,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,X(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Sn(this),this.keypress&&on(this,this.keypress),An(this),this.disposable.push(fn()),this.contextMenu&&this.disposable.push(bn(this,this.contextMenu)),this.allowUndo&&this.disposable.push(wn(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=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,this.selection?.destroy(),this.selection=void 0}};function po({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,containerHeight:a}){let d=t+n/2;const h=e+o/2;let u;r===R.LHS?u=i+l:u=i;const y=s+c/2,p=(1-Math.abs(y-h)/a)*.25*(n/2);return r===R.LHS?d=d-n/10-p:d=d+n/10+p,`M ${d} ${h} Q ${d} ${y} ${u} ${y}`}function go({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,isFirst:a}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,u=0;a?h=e+o/2:h=e+o;const y=s+c;let b=0,p=0,g=0;const m=Math.abs(h-y)/300*d;return r===R.LHS?(g=t,b=g+d,p=g-d,u=i+d,`M ${b} ${h} C ${g} ${h} ${g+m} ${y} ${p} ${y} H ${u}`):(g=t+n,b=g-d,p=g+d,u=i+l-d,`M ${b} ${h} C ${g} ${h} ${g-m} ${y} ${p} ${y} H ${u}`)}const mo="5.10.0
|
|
16
|
+
`).forEach((c,r)=>{const a=document.createElementNS(P,"text");D(a,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+eo(t.lineHeight,t.fontSize)*(r+1)+parseFloat(t.fontSize)*(r+1)+"","text-anchor":"start","font-family":t.fontFamily,"font-size":`${t.fontSize}`,"font-weight":`${t.fontWeight}`,fill:`${t.color}`}),a.innerHTML=c,s.appendChild(a)}),s}function no(e,t,n,o){let s="";e.nodeObj?.dangerouslySetInnerHTML?s=e.nodeObj.dangerouslySetInnerHTML:e.text?s=e.text.textContent:s=e.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");D(i,{x:n+parseInt(t.paddingLeft)+"",y:o+parseInt(t.paddingTop)+"",width:t.width,height:t.height});const l=document.createElement("div");return D(l,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`}),l.innerHTML=s,i.appendChild(l),i}function oo(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function pe(e,t,n=!1){const o=getComputedStyle(t),{offsetLeft:s,offsetTop:i}=$(e.nodes,t),l=document.createElementNS(P,"rect");D(l,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(l);let r;return n?r=no(t,o,s,i):r=to(t,o,s,i),c.appendChild(r),c}function so(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"a"),l=document.createElementNS(P,"text");return D(l,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),l.innerHTML=t.textContent,i.appendChild(l),i.setAttribute("href",t.href),i}function io(e,t){const n=getComputedStyle(t),{offsetLeft:o,offsetTop:s}=$(e.nodes,t),i=document.createElementNS(P,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:t.src}),i}const ge=100,ro='<?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">',lo=(e,t=!1)=>{const n=e.nodes,o=n.offsetHeight+ge*2,s=n.offsetWidth+ge*2,i=Qn(o+"px",s+"px"),l=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:e.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(h=>{const u=h.cloneNode(!0),{offsetLeft:y,offsetTop:b}=$(n,h.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${b}`),l.appendChild(u)});const r=n.querySelector(".lines")?.cloneNode(!0);r&&l.appendChild(r);const a=n.querySelector(".topiclinks")?.cloneNode(!0);a&&l.appendChild(a);const d=n.querySelector(".summary")?.cloneNode(!0);return d&&l.appendChild(d),n.querySelectorAll("me-tpc").forEach(h=>{h.nodeObj.dangerouslySetInnerHTML?l.appendChild(pe(e,h,!t)):(l.appendChild(oo(e,h)),l.appendChild(pe(e,h.text,!t)))}),n.querySelectorAll(".tags > span").forEach(h=>{l.appendChild(pe(e,h))}),n.querySelectorAll(".icons > span").forEach(h=>{l.appendChild(pe(e,h))}),n.querySelectorAll(".hyper-link").forEach(h=>{l.appendChild(so(e,h))}),n.querySelectorAll("img").forEach(h=>{l.appendChild(io(e,h))}),D(l,{x:ge+"",y:ge+"",overflow:"visible"}),i.appendChild(l),i},co=(e,t)=>(t&&e.insertAdjacentHTML("afterbegin","<style>"+t+"</style>"),ro+e.outerHTML);function ao(e){return new Promise((t,n)=>{const o=new FileReader;o.onload=s=>{t(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(e)})}const ho=Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(e=!1,t){const n=this.exportSvg(e,t),o=await ao(n);return new Promise((s,i)=>{const l=new Image;l.setAttribute("crossOrigin","anonymous"),l.onload=()=>{const c=document.createElement("canvas");c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0),c.toBlob(s,"image/png",1)},l.src=o,l.onerror=i})},exportSvg:function(e=!1,t){const n=lo(this,e),o=co(n,t);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"}));function fo(e,t){return async function(...n){const o=this.before[t];o&&!await o.apply(this,n)||e.apply(this,n)}}const ft=Object.keys(Ye),ut={};for(let e=0;e<ft.length;e++){const t=ft[e];ut[t]=fo(Ye[t],t)}const uo={getObjById:se,generateNewObj:pt,layout:gt,linkDiv:mn,editTopic:Et,createWrapper:bt,createParent:vt,createChildren:wt,createTopic:xt,findEle:He,changeTheme:Mn,...Zt,...ut,...Vn,...Zn,...ho,init(e){if(e=JSON.parse(JSON.stringify(e)),!e||!e.nodeData)return new Error("MindElixir: `data` is required");e.direction!==void 0&&(this.direction=e.direction),this.changeTheme(e.theme||this.theme,!1),this.nodeData=e.nodeData,X(this.nodeData),this.arrows=e.arrows||[],this.summaries=e.summaries||[],this.tidyArrow(),this.toolBar&&Sn(this),this.keypress&&on(this,this.keypress),An(this),this.disposable.push(fn()),this.contextMenu&&this.disposable.push(bn(this,this.contextMenu)),this.allowUndo&&this.disposable.push(wn(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=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,this.selection?.destroy(),this.selection=void 0}};function po({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,containerHeight:a}){let d=t+n/2;const h=e+o/2;let u;r===R.LHS?u=i+l:u=i;const y=s+c/2,p=(1-Math.abs(y-h)/a)*.25*(n/2);return r===R.LHS?d=d-n/10-p:d=d+n/10+p,`M ${d} ${h} Q ${d} ${y} ${u} ${y}`}function go({pT:e,pL:t,pW:n,pH:o,cT:s,cL:i,cW:l,cH:c,direction:r,isFirst:a}){const d=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let h=0,u=0;a?h=e+o/2:h=e+o;const y=s+c;let b=0,p=0,g=0;const m=Math.abs(h-y)/300*d;return r===R.LHS?(g=t,b=g+d,p=g-d,u=i+d,`M ${b} ${h} C ${g} ${h} ${g+m} ${y} ${p} ${y} H ${u}`):(g=t+n,b=g-d,p=g+d,u=i+l-d,`M ${b} ${h} C ${g} ${h} ${g-m} ${y} ${p} ${y} H ${u}`)}const mo="5.10.0";function yo(e){return{x:0,y:0,moved:!1,mousedown:!1,onMove(t,n){this.mousedown&&(this.moved=!0,e.move(t,n))},clear(){this.mousedown=!1}}}function j({el:e,direction:t,editable:n,contextMenu:o,toolBar:s,keypress:i,mouseSelectionButton:l,selectionContainer:c,before:r,newTopicName:a,allowUndo:d,generateMainBranch:h,generateSubBranch:u,overflowHidden:y,theme:b,alignment:p,scaleSensitivity:g,scaleMax:m,scaleMin:v,handleWheel:E,markdown:k,imageProxy:_,pasteHandler:C}){let x=null;const N=Object.prototype.toString.call(e);if(N==="[object HTMLDivElement]"?x=e:N==="[object String]"&&(x=document.querySelector(e)),!x)throw new Error("MindElixir: el is not a valid element");x.style.position="relative",x.innerHTML="",this.el=x,this.disposable=[],this.before=r||{},this.newTopicName=a||"New Node",this.contextMenu=o??!0,this.toolBar=s??!0,this.keypress=i??!0,this.mouseSelectionButton=l??0,this.direction=t??1,this.editable=n??!0,this.allowUndo=d??!0,this.scaleSensitivity=g??.1,this.scaleMax=m??1.4,this.scaleMin=v??.2,this.generateMainBranch=h||po,this.generateSubBranch=u||go,this.overflowHidden=y??!1,this.alignment=p??"root",this.handleWheel=E??!0,this.markdown=k||void 0,this.imageProxy=_||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=yo(this),this.bus=pn(),this.container=document.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const S=window.matchMedia("(prefers-color-scheme: dark)");this.theme=b||(S.matches?oe:ne);const A=document.createElement("div");A.className="map-canvas",this.map=A,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=document.createElement("me-nodes"),this.lines=ee("lines"),this.summarySvg=ee("summary"),this.linkController=ee("linkcontroller"),this.P2=document.createElement("div"),this.P3=document.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Ue(),this.line2=Ue(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=ee("topiclinks"),this.labelContainer=document.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(un(this)),C&&(this.pasteHandler=C)}return j.prototype=uo,Object.defineProperty(j.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),j.LEFT=0,j.RIGHT=1,j.SIDE=2,j.THEME=ne,j.DARK_THEME=oe,j.version=mo,j.E=He,j.new=e=>({nodeData:{id:G(),topic:e||"new topic",children:[]}}),Y.DARK_THEME=oe,Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=ne,Y.default=j,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Y})({});
|
package/dist/MindElixir.js
CHANGED
|
@@ -2570,7 +2570,7 @@ function Vo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction:
|
|
|
2570
2570
|
const m = Math.abs(h - y) / 300 * d;
|
|
2571
2571
|
return r === B.LHS ? (g = t, b = g + d, p = g - d, u = i + d, `M ${b} ${h} C ${g} ${h} ${g + m} ${y} ${p} ${y} H ${u}`) : (g = t + n, b = g - d, p = g + d, u = i + l - d, `M ${b} ${h} C ${g} ${h} ${g - m} ${y} ${p} ${y} H ${u}`);
|
|
2572
2572
|
}
|
|
2573
|
-
const zo = "5.10.0
|
|
2573
|
+
const zo = "5.10.0";
|
|
2574
2574
|
function Ko(e) {
|
|
2575
2575
|
return {
|
|
2576
2576
|
x: 0,
|
package/dist/MindElixirLite.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.map-container{-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;user-select:none;-webkit-user-select:none;height:100%;width:100%;overflow:hidden;font-size:16px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container p{margin:0}.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.space-pressed,.map-container.space-pressed *{cursor:grab!important}.map-container.space-pressed:active,.map-container.space-pressed:active *{cursor:grabbing!important}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.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-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);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;border-radius:3px}.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+DQo8c3ZnIHQ9IjE2NTY2NTQ3MTcyNDIiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA0ODBoLTEzOC42NjY2NjdWMzQxLjMzMzMzM2MwLTE3LjA2NjY2Ny0xNC45MzMzMzMtMzItMzItMzJzLTMyIDE0LjkzMzMzMy0zMiAzMnYxMzguNjY2NjY3SDM0MS4zMzMzMzNjLTE3LjA2NjY2NyAwLTMyIDE0LjkzMzMzMy0zMiAzMnMxNC45MzMzMzMgMzIgMzIgMzJoMTM4LjY2NjY2N1Y2ODIuNjY2NjY3YzAgMTcuMDY2NjY3IDE0LjkzMzMzMyAzMiAzMiAzMnMzMi0xNC45MzMzMzMgMzItMzJ2LTEzOC42NjY2NjdINjgyLjY2NjY2N2MxNy4wNjY2NjcgMCAzMi0xNC45MzMzMzMgMzItMzJzLTE0LjkzMzMzMy0zMi0zMi0zMnoiPjwvcGF0aD4NCjwvc3ZnPg==);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+DQo8c3ZnIHQ9IjE2NTY2NTU1NjQ5ODUiIGNsYXNzPSJpY29uIiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiDQogICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+DQogICAgPHBhdGggZD0iTTUxMiA3NC42NjY2NjdDMjcwLjkzMzMzMyA3NC42NjY2NjcgNzQuNjY2NjY3IDI3MC45MzMzMzMgNzQuNjY2NjY3IDUxMlMyNzAuOTMzMzMzIDk0OS4zMzMzMzMgNTEyIDk0OS4zMzMzMzMgOTQ5LjMzMzMzMyA3NTMuMDY2NjY3IDk0OS4zMzMzMzMgNTEyIDc1My4wNjY2NjcgNzQuNjY2NjY3IDUxMiA3NC42NjY2Njd6IiBzdHJva2Utd2lkdGg9IjU0IiBzdHJva2U9J2JsYWNrJyBmaWxsPSd3aGl0ZScgPjwvcGF0aD4NCiAgICA8cGF0aCBkPSJNNjgyLjY2NjY2NyA1NDRIMzQxLjMzMzMzM2MtMTcuMDY2NjY3IDAtMzItMTQuOTMzMzMzLTMyLTMyczE0LjkzMzMzMy0zMiAzMi0zMmgzNDEuMzMzMzM0YzE3LjA2NjY2NyAwIDMyIDE0LjkzMzMzMyAzMiAzMnMtMTQuOTMzMzMzIDMyLTMyIDMyeiI+PC9wYXRoPg0KPC9zdmc+)!important;transition:opacity .3s;opacity:0}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{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;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .label-container{z-index:21}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);outline:1px solid #ccc;border-radius:2px;z-index:100}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .circle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;background:transparent}.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:absolute;top:0;left:0;box-sizing:content-box;opacity:.7;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;display:none;pointer-events:none;z-index:1000}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .svg-label{position:absolute;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;line-height:1.2;pointer-events:auto;cursor:pointer;z-index:10;width:max-content;max-width:200px;border-radius:3px;padding:var(--topic-padding)}.map-container .svg-label[data-type=arrow]{background-color:var(--main-bgcolor-transparent)}.map-container h1{font-size:1.5rem;font-weight:700;color:var(--selected)}.map-container h2{font-size:1.25rem;font-weight:600;color:var(--selected)}.map-container h3{font-size:1.125rem;font-weight:600;color:var(--selected)}.map-container h4{font-size:1rem;font-weight:600;color:var(--selected)}.map-container h5{font-size:.875rem;font-weight:600;color:var(--selected)}.map-container h6{font-size:.875rem;font-weight:500;margin:.1rem 0;color:var(--selected);font-style:italic}.map-container strong.asterisk-emphasis,.map-container em{color:var(--selected)}.map-container strong.underscore-emphasis{background:#ffeb3b40;padding:.05em .15em;border-radius:.15em}.map-container a{color:var(--selected)}.map-container a:hover{color:var(--selected);text-decoration:underline}.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:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{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}
|
|
1
|
+
.map-container{-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;user-select:none;-webkit-user-select:none;height:100%;width:100%;overflow:hidden;font-size:16px;outline:none;touch-action:none;background-color:var(--bgcolor)}.map-container p{margin:0}.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.space-pressed,.map-container.space-pressed *{cursor:grab!important}.map-container.space-pressed:active,.map-container.space-pressed:active *{cursor:grabbing!important}.map-container .hyper-link{text-decoration:none;margin-left:.3em}.map-container me-main>me-wrapper>me-parent>me-epd{top:50%;transform:translateY(-50%)}.map-container me-epd{top:100%;transform:translateY(-50%)}.map-container .lhs{direction:rtl}.map-container .lhs>me-wrapper>me-parent>me-epd{left:-10px}.map-container .lhs me-epd{left:5px}.map-container .lhs me-tpc{direction:ltr}.map-container .rhs>me-wrapper>me-parent>me-epd{right:-10px}.map-container .rhs me-epd{right:5px}.map-container .map-canvas{position:relative;-webkit-user-select:none;user-select:none;width:fit-content;transform:scale(1)}.map-container .map-canvas me-nodes{position:relative;display:flex;justify-content:center;align-items:center;height:max-content;width:max-content;padding:var(--map-padding)}.map-container me-main>me-wrapper{position:relative;margin:var(--main-gap-y) var(--main-gap-x)}.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-root{position:relative;margin:45px 0;z-index:10}.map-container me-root me-tpc{font-size:25px;color:var(--root-color);padding:10px 30px;border-radius:var(--root-radius);border:var(--root-border-color) 2px solid;background-color:var(--root-bgcolor)}.map-container me-parent{position:relative;cursor:pointer;padding:6px var(--node-gap-x);margin-top:var(--node-gap-y);z-index:10}.map-container me-parent me-tpc{position:relative;border-radius:3px;color:var(--color);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;border-radius:3px}.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}@media (hover: hover){.map-container me-parent me-epd.minus:hover{opacity:.8}}@media (hover: none){.map-container me-parent me-epd.minus{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;z-index:20}.map-container .summary>g,.map-container .topiclinks>g{cursor:pointer;pointer-events:stroke;z-index:20}.map-container .label-container{z-index:21}.map-container .lines,.map-container .subLines{pointer-events:none}.map-container #input-box{position:absolute;top:0;left:0;width:max-content;max-width:35em;direction:ltr;-webkit-user-select:auto;user-select:auto;pointer-events:auto;color:var(--color);background-color:var(--bgcolor);outline:1px solid #ccc;border-radius:2px;z-index:100}.map-container me-tpc{display:block;max-width:35em;white-space:pre-wrap;pointer-events:all}.map-container me-tpc>*{pointer-events:none}.map-container me-tpc>a,.map-container me-tpc>iframe{pointer-events:auto}.map-container me-tpc>.text{display:inline-block}.map-container me-tpc>.text a{pointer-events:auto}.map-container me-tpc>img{display:block;margin-bottom:8px;object-fit:cover}.map-container .circle{position:absolute;height:10px;width:10px;margin-top:-5px;margin-left:-5px;border-radius:100%;background:#757575;border:2px solid #ffffff;z-index:50;cursor:pointer}.map-container .circle:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:30px;height:30px;background:transparent}.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:absolute;top:0;left:0;box-sizing:content-box;opacity:.7;background-color:var(--main-bgcolor);border:2px solid var(--main-color);color:var(--main-color);max-width:200px;width:fit-content;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:8px 16px;border-radius:6px;display:none;pointer-events:none;z-index:1000}.map-container .selection-area{background:#4f90f22d;border:1px solid #4f90f2}.map-container .svg-label{position:absolute;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;line-height:1.2;pointer-events:auto;cursor:pointer;z-index:10;width:max-content;max-width:200px;border-radius:3px;padding:var(--topic-padding)}.map-container .svg-label[data-type=arrow]{background-color:var(--main-bgcolor-transparent)}.map-container h1{font-size:1.5rem;font-weight:700;color:var(--selected)}.map-container h2{font-size:1.25rem;font-weight:600;color:var(--selected)}.map-container h3{font-size:1.125rem;font-weight:600;color:var(--selected)}.map-container h4{font-size:1rem;font-weight:600;color:var(--selected)}.map-container h5{font-size:.875rem;font-weight:600;color:var(--selected)}.map-container h6{font-size:.875rem;font-weight:500;margin:.1rem 0;color:var(--selected);font-style:italic}.map-container strong.asterisk-emphasis,.map-container em{color:var(--selected)}.map-container strong.underscore-emphasis{background:#ffeb3b40;padding:.05em .15em;border-radius:.15em}.map-container a{color:var(--selected)}.map-container a:hover{color:var(--selected);text-decoration:underline}.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:28px;left:50%;transform:translate(-50%);color:var(--panel-color);background:var(--panel-bgcolor);opacity:.8;padding:5px 10px;border-radius:5px;font-weight:700}.mind-elixir-toolbar{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}
|
|
@@ -13,4 +13,4 @@ var MindElixirLite=(function(Y){"use strict";const j={name:"Latte",type:"light",
|
|
|
13
13
|
top:${e.style.top};
|
|
14
14
|
max-width: 200px;
|
|
15
15
|
`,wt(s),t.scrollIntoView(s),s.addEventListener("keydown",i=>{i.stopPropagation();const r=i.key;if(r==="Enter"||r==="Tab"){if(i.shiftKey)return;i.preventDefault(),s.blur(),t.container.focus()}}),s.addEventListener("blur",()=>{if(!s)return;const i=s.innerText?.trim()||"";i===""?n.label=o:n.label=i,s.remove(),i!==o&&(t.markdown?e.innerHTML=t.markdown(n.label,n):e.textContent=n.label,Q(e),"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},ye=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,o=e.offsetLeft,s=e.offsetWidth,i=e.offsetHeight,r=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<r.length;c++){const a=r[c],l=a.querySelector("me-tpc"),{offsetLeft:h,offsetTop:f}=H(this.nodes,l),u=l.offsetWidth,y=l.offsetHeight,m=a.parentNode.className,p=this.generateMainBranch({pT:n,pL:o,pW:s,pH:i,cT:f,cL:h,cW:u,cH:y,direction:m,containerHeight:this.nodes.offsetHeight}),g=this.theme.palette,b=l.nodeObj.branchColor||g[c%g.length];if(l.style.borderColor=b,this.lines.appendChild(Lt(p,b,"3")),t&&t!==a)continue;const w=F("subLines"),x=a.lastChild;x.tagName==="svg"&&x.remove(),a.appendChild(w),kt(this,w,b,a,m,!0)}this.labelContainer.innerHTML="",this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},kt=function(t,e,n,o,s,i){const r=o.firstChild,c=o.children[1].children;if(c.length===0)return;const a=r.offsetTop,l=r.offsetLeft,h=r.offsetWidth,f=r.offsetHeight;for(let u=0;u<c.length;u++){const y=c[u],m=y.firstChild,p=m.offsetTop,g=m.offsetLeft,b=m.offsetWidth,w=m.offsetHeight,x=m.firstChild.nodeObj.branchColor||n,S=t.generateSubBranch({pT:a,pL:l,pW:h,pH:f,cT:p,cL:g,cW:b,cH:w,direction:s,isFirst:i});e.appendChild(Lt(S,x,"2"));const T=m.children[1];if(T){if(!T.expanded)continue}else continue;kt(t,e,x,y,s)}},ve={side:'<?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"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2022"></path></svg>',left:'<?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"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="1776"></path></svg>',right:'<?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"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="3038"></path></svg>',full:'<?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"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2171"></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" p-id="2172"></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" p-id="2173"></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" p-id="2174"></path></svg>',living:'<?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"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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="currentColor" p-id="2884"></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="currentColor" p-id="2885"></path></svg>',zoomin:'<?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"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2481"></path></svg>',zoomout:'<?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"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><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" p-id="2731"></path></svg>'},B=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=ve[e],n};function we(t){const e=document.createElement("div"),n=B("fullscreen","full"),o=B("toCenter","living"),s=B("zoomout","zoomout"),i=B("zoomin","zoomin");e.appendChild(n),e.appendChild(o),e.appendChild(s),e.appendChild(i),e.className="mind-elixir-toolbar rb";let r=null;const c=()=>{const l=t.container.getBoundingClientRect(),h=ct(t.map.style.transform),f=l.width/2,u=l.height/2,y=(f-h.x)/t.scaleVal,m=(u-h.y)/t.scaleVal;r={containerRect:l,currentTransform:h,mapCenterX:y,mapCenterY:m}},a=()=>{if(r){const l=t.container.getBoundingClientRect(),h=l.width/2,f=l.height/2,u=h-r.mapCenterX*t.scaleVal,y=f-r.mapCenterY*t.scaleVal,m=u-r.currentTransform.x,p=y-r.currentTransform.y;t.move(m,p)}};return t.el.addEventListener("fullscreenchange",a),n.onclick=()=>{c(),document.fullscreenElement!==t.el?t.el.requestFullscreen():document.exitFullscreen()},o.onclick=()=>{t.toCenter()},s.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},i.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},e}function be(t){const e=document.createElement("div"),n=B("tbltl","left"),o=B("tbltr","right"),s=B("tblts","side");return e.appendChild(n),e.appendChild(o),e.appendChild(s),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},o.onclick=()=>{t.initRight()},s.onclick=()=>{t.initSide()},e}function xe(t){t.container.append(we(t)),t.container.append(be(t))}const Ce=function(t,e=!0){this.theme=t;const o={...(t.type==="dark"?_:j).cssVar,...t.cssVar},s=Object.keys(o);for(let i=0;i<s.length;i++){const r=s[i];this.container.style.setProperty(r,o[r])}e&&this.refresh()},Nt={create:function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,o=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,o)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=gt([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}}},Ee="#4dc4ff";function At(t,e,n,o,s,i,r,c){return{x:t/8+n*3/8+s*3/8+r/8,y:e/8+o*3/8+i*3/8+c/8}}function Se(t,e,n){t&&(t.dataset.x=e.toString(),t.dataset.y=n.toString(),Q(t))}function Z(t,e,n,o,s){D(t,{x1:e+"",y1:n+"",x2:o+"",y2:s+""})}function Pt(t,e,n,o,s,i,r,c,a,l){const h=`M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${a}`;if(t.line.setAttribute("d",h),l.style){const p=l.style;p.stroke&&t.line.setAttribute("stroke",p.stroke),p.strokeWidth&&t.line.setAttribute("stroke-width",String(p.strokeWidth)),p.strokeDasharray&&t.line.setAttribute("stroke-dasharray",p.strokeDasharray),p.strokeLinecap&&t.line.setAttribute("stroke-linecap",p.strokeLinecap),p.opacity!==void 0&&t.line.setAttribute("opacity",String(p.opacity))}const f=t.querySelectorAll('path[stroke="transparent"]');f.length>0&&f[0].setAttribute("d",h);const u=K(i,r,c,a);if(u){const p=`M ${u.x1} ${u.y1} L ${c} ${a} L ${u.x2} ${u.y2}`;if(t.arrow1.setAttribute("d",p),f.length>1&&f[1].setAttribute("d",p),l.style){const g=l.style;g.stroke&&t.arrow1.setAttribute("stroke",g.stroke),g.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(g.strokeWidth)),g.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",g.strokeLinecap),g.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(g.opacity))}}if(l.bidirectional){const p=K(o,s,e,n);if(p){const g=`M ${p.x1} ${p.y1} L ${e} ${n} L ${p.x2} ${p.y2}`;if(t.arrow2.setAttribute("d",g),f.length>2&&f[2].setAttribute("d",g),l.style){const b=l.style;b.stroke&&t.arrow2.setAttribute("stroke",b.stroke),b.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(b.strokeWidth)),b.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",b.strokeLinecap),b.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(b.opacity))}}}const{x:y,y:m}=At(e,n,o,s,i,r,c,a);if(t.labelEl&&Se(t.labelEl,y,m),l.style?.labelColor){const p=t.labelEl;p&&(p.style.color=l.style.labelColor)}$e(t)}function tt(t,e,n){const{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=e.offsetWidth,r=e.offsetHeight,c=o+i/2,a=s+r/2,l=c+n.x,h=a+n.y;return{w:i,h:r,cx:c,cy:a,ctrlX:l,ctrlY:h}}function G(t){let e,n;const o=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return o>t.h/t.w||o<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/o,n=t.cy+t.h/2):(e=t.cx+t.h/2/o,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*o/2):(e=t.cx-t.w/2,n=t.cy+t.w*o/2),{x:e,y:n}}const Te=function(t,e,n){const o=H(t.nodes,e),s=H(t.nodes,n),i=o.offsetLeft+e.offsetWidth/2,r=o.offsetTop+e.offsetHeight/2,c=s.offsetLeft+n.offsetWidth/2,a=s.offsetTop+n.offsetHeight/2,l=c-i,h=a-r,f=Math.sqrt(l*l+h*h),u=Math.max(50,Math.min(200,f*.3)),y=Math.abs(l),m=Math.abs(h);let p,g;if(f<150){const w=e.closest("me-main").className==="lhs"?-1:1;p={x:200*w,y:0},g={x:200*w,y:0}}else if(y>m*1.5){const w=l>0?e.offsetWidth/2:-e.offsetWidth/2,x=l>0?-n.offsetWidth/2:n.offsetWidth/2;p={x:w+(l>0?u:-u),y:0},g={x:x+(l>0?-u:u),y:0}}else if(m>y*1.5){const w=h>0?e.offsetHeight/2:-e.offsetHeight/2,x=h>0?-n.offsetHeight/2:n.offsetHeight/2;p={x:0,y:w+(h>0?u:-u)},g={x:0,y:x+(h>0?-u:u)}}else{const w=Math.atan2(h,l),x=e.offsetWidth/2*Math.cos(w),S=e.offsetHeight/2*Math.sin(w),T=-(n.offsetWidth/2)*Math.cos(w),L=-(n.offsetHeight/2)*Math.sin(w),C=u*.7*(l>0?1:-1),N=u*.7*(h>0?1:-1);p={x:x+C,y:S+N},g={x:T-C,y:L-N}}return{delta1:p,delta2:g}},ht=function(t,e,n,o,s){if(!e||!n)return;if(!o.delta1||!o.delta2){const M=Te(t,e,n);o.delta1=M.delta1,o.delta2=M.delta2}const i=tt(t,e,o.delta1),r=tt(t,n,o.delta2),{x:c,y:a}=G(i),{ctrlX:l,ctrlY:h}=i,{ctrlX:f,ctrlY:u}=r,{x:y,y:m}=G(r),p=K(f,u,y,m);if(!p)return;const g=`M ${p.x1} ${p.y1} L ${y} ${m} L ${p.x2} ${p.y2}`;let b="";if(o.bidirectional){const M=K(l,h,c,a);if(!M)return;b=`M ${M.x1} ${M.y1} L ${c} ${a} L ${M.x2} ${M.y2}`}const w=me(`M ${c} ${a} C ${l} ${h} ${f} ${u} ${y} ${m}`,g,b,o.style),{x,y:S}=At(c,a,l,h,f,u,y,m),T=o.style?.labelColor||"rgb(235, 95, 82)",L="arrow-"+o.id;w.id=L;const C=t.markdown?t.markdown(o.label,o):o.label,N=dt(C,x,S,{anchor:"middle",color:T,dataType:"arrow",svgId:L});w.labelEl=N,w.arrowObj=o,w.dataset.linkid=o.id,t.labelContainer.appendChild(N),t.linkSvgGroup.appendChild(w),Q(N),s||(t.arrows.push(o),t.currentArrow=w,$t(t,o,i,r))},Le=function(t,e,n={}){const o={id:z(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,...n};ht(this,t,e,o),this.bus.fire("operation",{name:"createArrow",obj:o})},De=function(t){et(this);const e={...t,id:z()};ht(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},Me=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;et(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(o=>o.id!==n),e.labelEl?.remove(),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},ke=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),o=this.findEle(e.to),s=tt(this,n,e.delta1),i=tt(this,o,e.delta2);$t(this,e,s,i)},Ne=function(){et(this),this.currentArrow=null},ft=function(t,e){const n=document.createElementNS(I,"path");return D(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Ae=function(t,e){const n=document.createElementNS(I,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const o=ft(t.line.getAttribute("d"),e);n.appendChild(o);const s=ft(t.arrow1.getAttribute("d"),e);if(n.appendChild(s),t.arrow2.getAttribute("d")){const i=ft(t.arrow2.getAttribute("d"),e);n.appendChild(i)}t.insertBefore(n,t.firstChild)},Pe=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},$e=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},et=function(t){t.helper1?.destroy(),t.helper2?.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&Pe(t.currentArrow)},$t=function(t,e,n,o){const{linkController:s,P2:i,P3:r,line1:c,line2:a,nodes:l,map:h,currentArrow:f,bus:u}=t;if(!f)return;s.style.display="initial",i.style.display="initial",r.style.display="initial",l.appendChild(s),l.appendChild(i),l.appendChild(r),Ae(f,Ee);let{x:y,y:m}=G(n),{ctrlX:p,ctrlY:g}=n,{ctrlX:b,ctrlY:w}=o,{x,y:S}=G(o);i.style.cssText=`top:${g}px;left:${p}px;`,r.style.cssText=`top:${w}px;left:${b}px;`,Z(c,y,m,p,g),Z(a,b,w,x,S),t.helper1=Nt.create(i),t.helper2=Nt.create(r),t.helper1.init(h,(T,L)=>{p=p+T/t.scaleVal,g=g+L/t.scaleVal;const C=G({...n,ctrlX:p,ctrlY:g});y=C.x,m=C.y,i.style.top=g+"px",i.style.left=p+"px",Pt(f,y,m,p,g,b,w,x,S,e),Z(c,y,m,p,g),e.delta1.x=p-n.cx,e.delta1.y=g-n.cy,u.fire("updateArrowDelta",e)}),t.helper2.init(h,(T,L)=>{b=b+T/t.scaleVal,w=w+L/t.scaleVal;const C=G({...o,ctrlX:b,ctrlY:w});x=C.x,S=C.y,r.style.top=w+"px",r.style.left=b+"px",Pt(f,y,m,p,g,b,w,x,S,e),Z(a,b,w,x,S),e.delta2.x=b-o.cx,e.delta2.y=w-o.cy,u.fire("updateArrowDelta",e)})};function He(){this.linkSvgGroup.innerHTML="",this.labelContainer.querySelectorAll('.svg-label[data-type="arrow"]').forEach(e=>e.remove());for(let e=0;e<this.arrows.length;e++){const n=this.arrows[e];try{ht(this,this.findEle(n.from),this.findEle(n.to),n,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function Ie(t){et(this),t&&t.labelEl&&Mt(this,t.labelEl,t.arrowObj)}function Oe(){this.arrows=this.arrows.filter(t=>U(t.from,this.nodeData)&&U(t.to,this.nodeData))}const Ye=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Le,createArrowFrom:De,editArrowLabel:Ie,removeArrow:Me,renderArrow:He,selectArrow:ke,tidyArrow:Oe,unselectArrow:Ne},Symbol.toStringTag,{value:"Module"})),Re=function(t){if(t.length===0)throw new Error("No selected node.");if(t.length===1){const a=t[0].nodeObj,l=t[0].nodeObj.parent;if(!l)throw new Error("Can not select root node.");const h=l.children.findIndex(f=>a===f);return{parent:l.id,start:h,end:h}}let e=0;const n=t.map(a=>{let l=a.nodeObj;const h=[];for(;l.parent;){const f=l.parent,y=f.children?.indexOf(l);l=f,h.unshift({node:l,index:y})}return h.length>e&&(e=h.length),h});let o=0;t:for(;o<e;o++){const a=n[0][o]?.node;for(let l=1;l<n.length;l++)if(n[l][o]?.node!==a)break t}if(!o)throw new Error("Can not select root node.");const s=n.map(a=>a[o-1].index).sort(),i=s[0]||0,r=s[s.length-1]||0,c=n[0][o-1].node;if(!c.parent)throw new Error("Please select nodes in the same main topic.");return{parent:c.id,start:i,end:r}},Be=function(t){const e=document.createElementNS(I,"g");return e.setAttribute("id",t),e},Ht=function(t,e){const n=document.createElementNS(I,"path");return D(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},We=t=>t.parentElement.parentElement,Xe=function(t,{parent:e,start:n}){const o=t.findEle(e),s=o.nodeObj;let i;return s.parent?i=o.closest("me-main").className:i=t.findEle(s.children[n].id).closest("me-main").className,i},ut=function(t,e){const{id:n,label:o,parent:s,start:i,end:r,style:c}=e,{nodes:a,theme:l,summarySvg:h}=t,u=t.findEle(s).nodeObj,y=Xe(t,e);let m=1/0,p=0,g=0,b=0;for(let d=i;d<=r;d++){const v=u.children?.[d];if(!v)return t.removeSummary(n),null;const E=We(t.findEle(v.id)),{offsetLeft:$,offsetTop:W}=H(a,E),A=i===r?10:20;d===i&&(g=W+A),d===r&&(b=W+E.offsetHeight-A),$<m&&(m=$),E.offsetWidth+$>p&&(p=E.offsetWidth+$)}let w,x;const S=u.parent?10:0,T=g+S,L=b+S,C=(T+L)/2,N=c?.stroke||l.cssVar["--color"],M=c?.labelColor||l.cssVar["--color"],R="s-"+n,k=t.markdown?t.markdown(o,e):o;y===X.LHS?(w=Ht(`M ${m+10} ${T} c -5 0 -10 5 -10 10 L ${m} ${L-10} c 0 5 5 10 10 10 M ${m} ${C} h -10`,N),x=dt(k,m-20,C,{anchor:"end",color:M,dataType:"summary",svgId:R})):(w=Ht(`M ${p-10} ${T} c 5 0 10 5 10 10 L ${p} ${L-10} c 0 5 -5 10 -10 10 M ${p} ${C} h 10`,N),x=dt(k,p+20,C,{anchor:"start",color:M,dataType:"summary",svgId:R}));const V=Be(R);return V.appendChild(w),t.labelContainer.appendChild(x),Q(x),V.summaryObj=e,V.labelEl=x,h.appendChild(V),V},Ge=Object.freeze(Object.defineProperty({__proto__:null,createSummary:function(t={}){if(!this.currentNodes)return;const{currentNodes:e,summaries:n,bus:o}=this,{parent:s,start:i,end:r}=Re(e),c={id:z(),parent:s,start:i,end:r,label:"summary",style:t.style},a=ut(this,c);n.push(c),this.editSummary(a),o.fire("operation",{name:"createSummary",obj:c})},createSummaryFrom:function(t){const e=z(),n={...t,id:e};ut(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},editSummary:function(t){t&&t.labelEl&&Mt(this,t.labelEl,t.summaryObj)},removeSummary:function(t){const e=this.summaries.findIndex(n=>n.id===t);e>-1&&(this.summaries.splice(e,1),this.nodes.querySelector("#s-"+t)?.remove(),this.nodes.querySelector("#label-s-"+t)?.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},renderSummary:function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{ut(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},selectSummary:function(t){const e=t.labelEl;e&&e.classList.add("selected"),this.currentSummary=t},unselectSummary:function(){this.currentSummary?.labelEl?.classList.remove("selected"),this.currentSummary=null}},Symbol.toStringTag,{value:"Module"})),P="http://www.w3.org/2000/svg";function Ve(t,e){const n=document.createElementNS(P,"svg");return D(n,{version:"1.1",xmlns:P,height:t,width:e}),n}function ze(t,e){return(parseInt(t)-parseInt(e))/2}function Fe(t,e,n,o){const s=document.createElementNS(P,"g");let i="";return t.text?i=t.text.textContent:i=t.childNodes[0].textContent,i.split(`
|
|
16
|
-
`).forEach((c,a)=>{const l=document.createElementNS(P,"text");D(l,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+ze(e.lineHeight,e.fontSize)*(a+1)+parseFloat(e.fontSize)*(a+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),l.innerHTML=c,s.appendChild(l)}),s}function qe(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");D(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return D(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function je(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function nt(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=H(t.nodes,e),r=document.createElementNS(P,"rect");D(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(r);let a;return n?a=qe(e,o,s,i):a=Fe(e,o,s,i),c.appendChild(a),c}function _e(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"a"),r=document.createElementNS(P,"text");return D(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function Ue(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const ot=100,Ke='<?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">',Je=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+ot*2,s=n.offsetWidth+ot*2,i=Ve(o+"px",s+"px"),r=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(f=>{const u=f.cloneNode(!0),{offsetLeft:y,offsetTop:m}=H(n,f.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${m}`),r.appendChild(u)});const a=n.querySelector(".lines")?.cloneNode(!0);a&&r.appendChild(a);const l=n.querySelector(".topiclinks")?.cloneNode(!0);l&&r.appendChild(l);const h=n.querySelector(".summary")?.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(f=>{f.nodeObj.dangerouslySetInnerHTML?r.appendChild(nt(t,f,!e)):(r.appendChild(je(t,f)),r.appendChild(nt(t,f.text,!e)))}),n.querySelectorAll(".tags > span").forEach(f=>{r.appendChild(nt(t,f))}),n.querySelectorAll(".icons > span").forEach(f=>{r.appendChild(nt(t,f))}),n.querySelectorAll(".hyper-link").forEach(f=>{r.appendChild(_e(t,f))}),n.querySelectorAll("img").forEach(f=>{r.appendChild(Ue(t,f))}),D(r,{x:ot+"",y:ot+"",overflow:"visible"}),i.appendChild(r),i},Qe=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Ke+t.outerHTML);function Ze(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const tn={getObjById:U,generateNewObj:Ot,layout:Yt,linkDiv:ye,editTopic:zt,createWrapper:Wt,createParent:Xt,createChildren:Gt,createTopic:Vt,findEle:yt,changeTheme:Ce,...re,...{},...Ye,...Ge,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await Ze(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=Je(this,t),o=Qe(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,it(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&xe(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=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,this.selection?.destroy(),this.selection=void 0}};function en({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,containerHeight:l}){let h=e+n/2;const f=t+o/2;let u;a===X.LHS?u=i+r:u=i;const y=s+c/2,p=(1-Math.abs(y-f)/l)*.25*(n/2);return a===X.LHS?h=h-n/10-p:h=h+n/10+p,`M ${h} ${f} Q ${h} ${y} ${u} ${y}`}function nn({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,isFirst:l}){const h=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,u=0;l?f=t+o/2:f=t+o;const y=s+c;let m=0,p=0,g=0;const b=Math.abs(f-y)/300*h;return a===X.LHS?(g=e,m=g+h,p=g-h,u=i+h,`M ${m} ${f} C ${g} ${f} ${g+b} ${y} ${p} ${y} H ${u}`):(g=e+n,m=g-h,p=g+h,u=i+r-h,`M ${m} ${f} C ${g} ${f} ${g-b} ${y} ${p} ${y} H ${u}`)}const on="5.10.0
|
|
16
|
+
`).forEach((c,a)=>{const l=document.createElementNS(P,"text");D(l,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+ze(e.lineHeight,e.fontSize)*(a+1)+parseFloat(e.fontSize)*(a+1)+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),l.innerHTML=c,s.appendChild(l)}),s}function qe(t,e,n,o){let s="";t.nodeObj?.dangerouslySetInnerHTML?s=t.nodeObj.dangerouslySetInnerHTML:t.text?s=t.text.textContent:s=t.childNodes[0].textContent;const i=document.createElementNS(P,"foreignObject");D(i,{x:n+parseInt(e.paddingLeft)+"",y:o+parseInt(e.paddingTop)+"",width:e.width,height:e.height});const r=document.createElement("div");return D(r,{xmlns:"http://www.w3.org/1999/xhtml",style:`font-family: ${e.fontFamily}; font-size: ${e.fontSize}; font-weight: ${e.fontWeight}; color: ${e.color}; white-space: pre-wrap;`}),r.innerHTML=s,i.appendChild(r),i}function je(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"rect");return D(i,{x:o+"",y:s+"",rx:n.borderRadius,ry:n.borderRadius,width:n.width,height:n.height,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth}),i}function nt(t,e,n=!1){const o=getComputedStyle(e),{offsetLeft:s,offsetTop:i}=H(t.nodes,e),r=document.createElementNS(P,"rect");D(r,{x:s+"",y:i+"",rx:o.borderRadius,ry:o.borderRadius,width:o.width,height:o.height,fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.borderWidth});const c=document.createElementNS(P,"g");c.appendChild(r);let a;return n?a=qe(e,o,s,i):a=Fe(e,o,s,i),c.appendChild(a),c}function _e(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"a"),r=document.createElementNS(P,"text");return D(r,{x:o+"",y:s+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),r.innerHTML=e.textContent,i.appendChild(r),i.setAttribute("href",e.href),i}function Ue(t,e){const n=getComputedStyle(e),{offsetLeft:o,offsetTop:s}=H(t.nodes,e),i=document.createElementNS(P,"image");return D(i,{x:o+"",y:s+"",width:n.width+"",height:n.height+"",href:e.src}),i}const ot=100,Ke='<?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">',Je=(t,e=!1)=>{const n=t.nodes,o=n.offsetHeight+ot*2,s=n.offsetWidth+ot*2,i=Ve(o+"px",s+"px"),r=document.createElementNS(P,"svg"),c=document.createElementNS(P,"rect");D(c,{x:"0",y:"0",width:`${s}`,height:`${o}`,fill:t.theme.cssVar["--bgcolor"]}),i.appendChild(c),n.querySelectorAll(".subLines").forEach(f=>{const u=f.cloneNode(!0),{offsetLeft:y,offsetTop:m}=H(n,f.parentElement);u.setAttribute("x",`${y}`),u.setAttribute("y",`${m}`),r.appendChild(u)});const a=n.querySelector(".lines")?.cloneNode(!0);a&&r.appendChild(a);const l=n.querySelector(".topiclinks")?.cloneNode(!0);l&&r.appendChild(l);const h=n.querySelector(".summary")?.cloneNode(!0);return h&&r.appendChild(h),n.querySelectorAll("me-tpc").forEach(f=>{f.nodeObj.dangerouslySetInnerHTML?r.appendChild(nt(t,f,!e)):(r.appendChild(je(t,f)),r.appendChild(nt(t,f.text,!e)))}),n.querySelectorAll(".tags > span").forEach(f=>{r.appendChild(nt(t,f))}),n.querySelectorAll(".icons > span").forEach(f=>{r.appendChild(nt(t,f))}),n.querySelectorAll(".hyper-link").forEach(f=>{r.appendChild(_e(t,f))}),n.querySelectorAll("img").forEach(f=>{r.appendChild(Ue(t,f))}),D(r,{x:ot+"",y:ot+"",overflow:"visible"}),i.appendChild(r),i},Qe=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),Ke+t.outerHTML);function Ze(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=s=>{e(s.target.result)},o.onerror=s=>{n(s)},o.readAsDataURL(t)})}const tn={getObjById:U,generateNewObj:Ot,layout:Yt,linkDiv:ye,editTopic:zt,createWrapper:Wt,createParent:Xt,createChildren:Gt,createTopic:Vt,findEle:yt,changeTheme:Ce,...re,...{},...Ye,...Ge,...Object.freeze(Object.defineProperty({__proto__:null,exportPng:async function(t=!1,e){const n=this.exportSvg(t,e),o=await Ze(n);return new Promise((s,i)=>{const r=new Image;r.setAttribute("crossOrigin","anonymous"),r.onload=()=>{const c=document.createElement("canvas");c.width=r.width,c.height=r.height,c.getContext("2d").drawImage(r,0,0),c.toBlob(s,"image/png",1)},r.src=o,r.onerror=i})},exportSvg:function(t=!1,e){const n=Je(this,t),o=Qe(n,e);return new Blob([o],{type:"image/svg+xml"})}},Symbol.toStringTag,{value:"Module"})),init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,it(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&xe(this),this.layout(),this.linkDiv(),this.toCenter()},destroy(){this.disposable.forEach(t=>t()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=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,this.selection?.destroy(),this.selection=void 0}};function en({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,containerHeight:l}){let h=e+n/2;const f=t+o/2;let u;a===X.LHS?u=i+r:u=i;const y=s+c/2,p=(1-Math.abs(y-f)/l)*.25*(n/2);return a===X.LHS?h=h-n/10-p:h=h+n/10+p,`M ${h} ${f} Q ${h} ${y} ${u} ${y}`}function nn({pT:t,pL:e,pW:n,pH:o,cT:s,cL:i,cW:r,cH:c,direction:a,isFirst:l}){const h=parseInt(this.container.style.getPropertyValue("--node-gap-x"));let f=0,u=0;l?f=t+o/2:f=t+o;const y=s+c;let m=0,p=0,g=0;const b=Math.abs(f-y)/300*h;return a===X.LHS?(g=e,m=g+h,p=g-h,u=i+h,`M ${m} ${f} C ${g} ${f} ${g+b} ${y} ${p} ${y} H ${u}`):(g=e+n,m=g-h,p=g+h,u=i+r-h,`M ${m} ${f} C ${g} ${f} ${g-b} ${y} ${p} ${y} H ${u}`)}const on="5.10.0";function sn(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,n){this.mousedown&&(this.moved=!0,t.move(e,n))},clear(){this.mousedown=!1}}}function O({el:t,direction:e,editable:n,contextMenu:o,toolBar:s,keypress:i,mouseSelectionButton:r,selectionContainer:c,before:a,newTopicName:l,allowUndo:h,generateMainBranch:f,generateSubBranch:u,overflowHidden:y,theme:m,alignment:p,scaleSensitivity:g,scaleMax:b,scaleMin:w,handleWheel:x,markdown:S,imageProxy:T,pasteHandler:L}){let C=null;const N=Object.prototype.toString.call(t);if(N==="[object HTMLDivElement]"?C=t:N==="[object String]"&&(C=document.querySelector(t)),!C)throw new Error("MindElixir: el is not a valid element");C.style.position="relative",C.innerHTML="",this.el=C,this.disposable=[],this.before=a||{},this.newTopicName=l||"New Node",this.contextMenu=o??!0,this.toolBar=s??!0,this.keypress=i??!0,this.mouseSelectionButton=r??0,this.direction=e??1,this.editable=n??!0,this.allowUndo=h??!0,this.scaleSensitivity=g??.1,this.scaleMax=b??1.4,this.scaleMin=w??.2,this.generateMainBranch=f||en,this.generateSubBranch=u||nn,this.overflowHidden=y??!1,this.alignment=p??"root",this.handleWheel=x??!0,this.markdown=S||void 0,this.imageProxy=T||void 0,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=sn(this),this.bus=ge(),this.container=document.createElement("div"),this.selectionContainer=c||this.container,this.container.className="map-container";const M=window.matchMedia("(prefers-color-scheme: dark)");this.theme=m||(M.matches?_:j);const R=document.createElement("div");R.className="map-canvas",this.map=R,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=document.createElement("me-nodes"),this.lines=F("lines"),this.summarySvg=F("summary"),this.linkController=F("linkcontroller"),this.P2=document.createElement("div"),this.P3=document.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Dt(),this.line2=Dt(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=F("topiclinks"),this.labelContainer=document.createElement("div"),this.labelContainer.className="label-container",this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(pe(this)),L&&(this.pasteHandler=L)}return O.prototype=tn,Object.defineProperty(O.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0}),O.LEFT=0,O.RIGHT=1,O.SIDE=2,O.THEME=j,O.DARK_THEME=_,O.version=on,O.E=yt,Y.DARK_THEME=_,Y.LEFT=0,Y.RIGHT=1,Y.SIDE=2,Y.THEME=j,Y.default=O,Object.defineProperties(Y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Y})({});
|
package/dist/MindElixirLite.js
CHANGED
|
@@ -1447,7 +1447,7 @@ function $n({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction:
|
|
|
1447
1447
|
const b = Math.abs(f - y) / 300 * h;
|
|
1448
1448
|
return a === V.LHS ? (g = e, m = g + h, p = g - h, u = i + h, `M ${m} ${f} C ${g} ${f} ${g + b} ${y} ${p} ${y} H ${u}`) : (g = e + n, m = g - h, p = g + h, u = i + r - h, `M ${m} ${f} C ${g} ${f} ${g - b} ${y} ${p} ${y} H ${u}`);
|
|
1449
1449
|
}
|
|
1450
|
-
const An = "5.10.0
|
|
1450
|
+
const An = "5.10.0";
|
|
1451
1451
|
function Pn(t) {
|
|
1452
1452
|
return {
|
|
1453
1453
|
x: 0,
|