mind-elixir 5.11.1-beta.3 → 5.11.2

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.
@@ -53,7 +53,7 @@ const Bn = 0, Wn = 1, Yn = 2, tt = {
53
53
  "--map-padding": "50px 80px"
54
54
  }
55
55
  };
56
- function Nt(t) {
56
+ function $t(t) {
57
57
  return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
58
58
  }
59
59
  const G = function(t, e) {
@@ -77,18 +77,18 @@ const G = function(t, e) {
77
77
  });
78
78
  };
79
79
  function _(t, e, n, o) {
80
- const s = n - t, i = o - e, c = Math.atan2(i, s) * 180 / Math.PI, l = 12, a = 30, d = (c + 180 - a) * Math.PI / 180, f = (c + 180 + a) * Math.PI / 180;
80
+ const s = n - t, i = o - e, c = Math.atan2(i, s) * 180 / Math.PI, l = 12, a = 30, f = (c + 180 - a) * Math.PI / 180, d = (c + 180 + a) * Math.PI / 180;
81
81
  return {
82
- x1: n + Math.cos(d) * l,
83
- y1: o + Math.sin(d) * l,
84
- x2: n + Math.cos(f) * l,
85
- y2: o + Math.sin(f) * l
82
+ x1: n + Math.cos(f) * l,
83
+ y1: o + Math.sin(f) * l,
84
+ x2: n + Math.cos(d) * l,
85
+ y2: o + Math.sin(d) * l
86
86
  };
87
87
  }
88
88
  function Y() {
89
89
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2)).substring(2, 18);
90
90
  }
91
- const At = function() {
91
+ const Ht = function() {
92
92
  const t = Y();
93
93
  return {
94
94
  topic: this.newTopicName,
@@ -119,7 +119,7 @@ const At = function() {
119
119
  }, ht = (t, e) => {
120
120
  const n = t.x - e.x, o = t.y - e.y;
121
121
  return Math.sqrt(n * n + o * o);
122
- }, $t = function(t, e) {
122
+ }, It = function(t, e) {
123
123
  if (!e)
124
124
  return j(t), t;
125
125
  let n = t.querySelector(".insert-preview");
@@ -136,11 +136,11 @@ const At = function() {
136
136
  if (!(t && t.tagName === "ME-TPC" && t !== n && !o && t.nodeObj.parent)) return !1;
137
137
  }
138
138
  return !0;
139
- }, Ht = function(t) {
139
+ }, Ot = function(t) {
140
140
  const e = document.createElement("div");
141
141
  return e.className = "mind-elixir-ghost", t.container.appendChild(e), e;
142
142
  };
143
- class It {
143
+ class Bt {
144
144
  mind;
145
145
  isMoving = !1;
146
146
  interval = null;
@@ -157,19 +157,19 @@ class It {
157
157
  this.isMoving = !1, this.interval && (clearInterval(this.interval), this.interval = null);
158
158
  }
159
159
  }
160
- function Ot(t) {
160
+ function Wt(t) {
161
161
  return {
162
162
  isDragging: !1,
163
163
  insertType: null,
164
164
  meet: null,
165
- ghost: Ht(t),
166
- edgeMoveController: new It(t),
165
+ ghost: Ot(t),
166
+ edgeMoveController: new Bt(t),
167
167
  startX: 0,
168
168
  startY: 0,
169
169
  pointerId: null
170
170
  };
171
171
  }
172
- const Bt = 5;
172
+ const Yt = 5;
173
173
  function ft(t, e, n, o = !1) {
174
174
  if (t.spacePressed) return !1;
175
175
  const s = n.target;
@@ -193,30 +193,30 @@ function xt(t, e) {
193
193
  s.parentElement.parentElement.style.opacity = "0.5";
194
194
  t.panHelper.clear();
195
195
  }
196
- function Wt(t, e, n) {
196
+ function Rt(t, e, n) {
197
197
  const { dragged: o } = t;
198
198
  if (!o || e.pointerId !== n.pointerId) return;
199
199
  const s = n.clientX - e.startX, i = n.clientY - e.startY, r = Math.sqrt(s * s + i * i);
200
- if (!e.isDragging && r > Bt && xt(t, e), !e.isDragging) return;
200
+ if (!e.isDragging && r > Yt && xt(t, e), !e.isDragging) return;
201
201
  const c = t.container.getBoundingClientRect();
202
202
  bt(e.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? e.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? e.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? e.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? e.edgeMoveController.move(0, -1) : e.edgeMoveController.stop(), j(e.meet);
203
203
  const l = 12 * t.scaleVal, a = document.elementFromPoint(n.clientX, n.clientY - l);
204
204
  if (dt(a, o)) {
205
205
  e.meet = a;
206
- const d = a.getBoundingClientRect(), f = d.y;
207
- n.clientY > f + d.height ? e.insertType = "after" : e.insertType = "in";
206
+ const f = a.getBoundingClientRect(), d = f.y;
207
+ n.clientY > d + f.height ? e.insertType = "after" : e.insertType = "in";
208
208
  } else {
209
- const d = document.elementFromPoint(n.clientX, n.clientY + l);
210
- if (dt(d, o)) {
211
- e.meet = d;
212
- const p = d.getBoundingClientRect().y;
209
+ const f = document.elementFromPoint(n.clientX, n.clientY + l);
210
+ if (dt(f, o)) {
211
+ e.meet = f;
212
+ const p = f.getBoundingClientRect().y;
213
213
  n.clientY < p ? e.insertType = "before" : e.insertType = "in";
214
214
  } else
215
215
  e.insertType = null, e.meet = null;
216
216
  }
217
- e.meet && $t(e.meet, e.insertType);
217
+ e.meet && It(e.meet, e.insertType);
218
218
  }
219
- function Yt(t, e, n) {
219
+ function Xt(t, e, n) {
220
220
  const { dragged: o } = t;
221
221
  if (!(!o || e.pointerId !== n.pointerId)) {
222
222
  e.edgeMoveController.stop();
@@ -237,7 +237,7 @@ function ut(t, e) {
237
237
  const I = {
238
238
  LHS: "lhs",
239
239
  RHS: "rhs"
240
- }, Rt = function() {
240
+ }, Vt = function() {
241
241
  this.nodes.innerHTML = "";
242
242
  const t = this.createTopic(this.nodeData);
243
243
  St.call(this, t, this.nodeData), t.draggable = !1;
@@ -250,8 +250,8 @@ const I = {
250
250
  i.direction === 0 ? o += 1 : i.direction === 1 ? s += 1 : o <= s ? (i.direction = 0, o += 1) : (i.direction = 1, s += 1);
251
251
  });
252
252
  }
253
- Xt(this, n, e);
254
- }, Xt = function(t, e, n) {
253
+ zt(this, n, e);
254
+ }, zt = function(t, e, n) {
255
255
  const o = document.createElement("me-main");
256
256
  o.className = I.LHS;
257
257
  const s = document.createElement("me-main");
@@ -261,7 +261,7 @@ const I = {
261
261
  t.direction === 2 ? r.direction === 0 ? o.appendChild(c) : s.appendChild(c) : t.direction === 0 ? o.appendChild(c) : s.appendChild(c);
262
262
  }
263
263
  t.nodes.appendChild(o), t.nodes.appendChild(n), t.nodes.appendChild(s), t.nodes.appendChild(t.lines), t.nodes.appendChild(t.labelContainer);
264
- }, Vt = function(t, e) {
264
+ }, Ft = function(t, e) {
265
265
  const n = document.createElement("me-children");
266
266
  for (let o = 0; o < e.length; o++) {
267
267
  const s = e[o], { grp: i } = t.createWrapper(s);
@@ -299,7 +299,7 @@ const I = {
299
299
  } else t.link && (t.link = void 0);
300
300
  if (e.icons && e.icons.length) {
301
301
  const n = document.createElement("span");
302
- n.className = "icons", n.innerHTML = e.icons.map((o) => `<span>${Nt(o)}</span>`).join(""), t.appendChild(n), t.icons = n;
302
+ n.className = "icons", n.innerHTML = e.icons.map((o) => `<span>${$t(o)}</span>`).join(""), t.appendChild(n), t.icons = n;
303
303
  } else t.icons && (t.icons = void 0);
304
304
  if (e.tags && e.tags.length) {
305
305
  const n = document.createElement("div");
@@ -308,23 +308,23 @@ const I = {
308
308
  typeof o == "string" ? s.textContent = o : (s.textContent = o.text, o.className && (s.className = o.className), o.style && Object.assign(s.style, o.style)), n.appendChild(s);
309
309
  }), t.appendChild(n), t.tags = n;
310
310
  } else t.tags && (t.tags = void 0);
311
- }, zt = function(t, e) {
311
+ }, Gt = function(t, e) {
312
312
  const n = document.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(t);
313
313
  if (n.appendChild(o), !e && t.children && t.children.length > 0) {
314
- const i = jt(t.expanded);
314
+ const i = Kt(t.expanded);
315
315
  if (o.appendChild(i), t.expanded !== !1) {
316
- const r = Vt(this, t.children);
316
+ const r = Ft(this, t.children);
317
317
  n.appendChild(r);
318
318
  }
319
319
  }
320
320
  return { grp: n, top: o, tpc: s };
321
- }, Ft = function(t) {
321
+ }, _t = function(t) {
322
322
  const e = document.createElement("me-parent"), n = this.createTopic(t);
323
323
  return St.call(this, n, t), e.appendChild(n), { p: e, tpc: n };
324
- }, Gt = function(t) {
324
+ }, qt = function(t) {
325
325
  const e = document.createElement("me-children");
326
326
  return e.append(...t), e;
327
- }, _t = function(t) {
327
+ }, jt = function(t) {
328
328
  const e = document.createElement("me-tpc");
329
329
  return e.nodeObj = t, e.dataset.nodeid = "me" + t.id, e;
330
330
  };
@@ -334,7 +334,7 @@ function Et(t) {
334
334
  const n = window.getSelection();
335
335
  n && (n.removeAllRanges(), n.addRange(e));
336
336
  }
337
- const qt = function(t) {
337
+ const Ut = function(t) {
338
338
  if (!t) return;
339
339
  const e = document.createElement("div"), n = t.nodeObj, o = n.topic, { offsetLeft: s, offsetTop: i } = M(this.nodes, t);
340
340
  this.nodes.appendChild(e), e.id = "input-box", e.textContent = o, e.contentEditable = "plaintext-only", e.spellcheck = !1;
@@ -369,14 +369,14 @@ const qt = function(t) {
369
369
  origin: o
370
370
  }));
371
371
  });
372
- }, jt = function(t) {
372
+ }, Kt = function(t) {
373
373
  const e = document.createElement("me-epd");
374
374
  return e.expanded = t !== !1, e.className = t !== !1 ? "minus" : "", e;
375
- }, Ut = function(t) {
375
+ }, Jt = function(t) {
376
376
  const n = t.parentElement.parentElement.lastElementChild;
377
377
  n?.tagName === "svg" && n?.remove();
378
378
  };
379
- function Kt(t) {
379
+ function Zt(t) {
380
380
  return {
381
381
  nodeData: t.isFocusMode ? t.nodeDataBackup : t.nodeData,
382
382
  arrows: t.arrows,
@@ -385,107 +385,107 @@ function Kt(t) {
385
385
  theme: t.theme
386
386
  };
387
387
  }
388
- const Jt = function(t) {
389
- const e = this.container, n = t.getBoundingClientRect(), o = e.getBoundingClientRect();
390
- if (n.top > o.bottom - 50 || n.bottom < o.top + 50 || n.left > o.right - 50 || n.right < o.left + 50) {
391
- const i = n.left + n.width / 2, r = n.top + n.height / 2, c = o.left + o.width / 2, l = o.top + o.height / 2, a = i - c, d = r - l;
392
- this.move(-a, -d, !0);
388
+ const Qt = function(t, e = !1) {
389
+ const n = this.container, o = t.getBoundingClientRect(), s = n.getBoundingClientRect();
390
+ if (e || o.top > s.bottom - 50 || o.bottom < s.top + 50 || o.left > s.right - 50 || o.right < s.left + 50) {
391
+ const r = o.left + o.width / 2, c = o.top + o.height / 2, l = s.left + s.width / 2, a = s.top + s.height / 2, f = r - l, d = c - a;
392
+ this.move(-f, -d, !0);
393
393
  }
394
- }, Zt = function(t, e, n) {
394
+ }, te = function(t, e, n) {
395
395
  this.clearSelection(), this.scrollIntoView(t), this.selection?.select(t), e && this.bus.fire("selectNewNode", t.nodeObj);
396
- }, Qt = function(t) {
396
+ }, ee = function(t) {
397
397
  this.selection?.select(t);
398
- }, te = function(t) {
398
+ }, ne = function(t) {
399
399
  this.selection?.deselect(t);
400
- }, ee = function() {
400
+ }, oe = function() {
401
401
  this.unselectNodes(this.currentNodes), this.unselectSummary(), this.unselectArrow();
402
402
  }, Tt = function(t) {
403
403
  return JSON.stringify(t, (e, n) => {
404
404
  if (!(e === "parent" && typeof n != "string"))
405
405
  return n;
406
406
  });
407
- }, ne = function() {
408
- const t = Kt(this);
407
+ }, se = function() {
408
+ const t = Zt(this);
409
409
  return Tt(t);
410
- }, oe = function() {
410
+ }, ie = function() {
411
411
  return JSON.parse(this.getDataString());
412
- }, se = function() {
412
+ }, re = function() {
413
413
  this.editable = !0;
414
- }, ie = function() {
414
+ }, ce = function() {
415
415
  this.editable = !1;
416
- }, re = function(t, e = { x: 0, y: 0 }) {
416
+ }, le = function(t, e = { x: 0, y: 0 }) {
417
417
  if (t < this.scaleMin && t < this.scaleVal || t > this.scaleMax && t > this.scaleVal) return;
418
- const n = this.container.getBoundingClientRect(), o = e.x ? e.x - n.left - n.width / 2 : 0, s = e.y ? e.y - n.top - n.height / 2 : 0, { dx: i, dy: r } = st(this), c = this.map.style.transform, { x: l, y: a } = ot(c), d = l - i, f = a - r, p = this.scaleVal, w = (-o + d) * (1 - t / p), y = (-s + f) * (1 - t / p);
418
+ const n = this.container.getBoundingClientRect(), o = e.x ? e.x - n.left - n.width / 2 : 0, s = e.y ? e.y - n.top - n.height / 2 : 0, { dx: i, dy: r } = st(this), c = this.map.style.transform, { x: l, y: a } = ot(c), f = l - i, d = a - r, p = this.scaleVal, w = (-o + f) * (1 - t / p), y = (-s + d) * (1 - t / p);
419
419
  this.map.style.transform = `translate3d(${l - w}px, ${a - y}px, 0) scale(${t})`, this.scaleVal = t, this.bus.fire("scale", t);
420
- }, ce = function() {
420
+ }, ae = function() {
421
421
  const t = this.nodes.offsetHeight / this.container.offsetHeight, e = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(t, e));
422
422
  this.scaleVal = n;
423
423
  const { dx: o, dy: s } = st(this, !0);
424
424
  this.map.style.transform = `translate3d(${o}px, ${s}px, 0) scale(${n})`, this.bus.fire("scale", n);
425
- }, le = function(t, e, n = !1) {
425
+ }, he = function(t, e, n = !1) {
426
426
  const { map: o, scaleVal: s, bus: i, container: r, nodes: c } = this;
427
427
  if (n && o.style.transition === "transform 0.3s")
428
428
  return;
429
429
  const l = o.style.transform;
430
- let { x: a, y: d } = ot(l);
431
- const f = r.getBoundingClientRect(), p = c.getBoundingClientRect(), w = p.left < f.right && p.right > f.left, y = p.top < f.bottom && p.bottom > f.top;
430
+ let { x: a, y: f } = ot(l);
431
+ const d = r.getBoundingClientRect(), p = c.getBoundingClientRect(), w = p.left < d.right && p.right > d.left, y = p.top < d.bottom && p.bottom > d.top;
432
432
  if (w) {
433
433
  const u = p.left + t, g = p.right + t;
434
- (u >= f.right || g <= f.left) && (t = 0);
434
+ (u >= d.right || g <= d.left) && (t = 0);
435
435
  }
436
436
  if (y) {
437
437
  const u = p.top + e, g = p.bottom + e;
438
- (u >= f.bottom || g <= f.top) && (e = 0);
438
+ (u >= d.bottom || g <= d.top) && (e = 0);
439
439
  }
440
- a += t, d += e, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
440
+ a += t, f += e, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
441
441
  o.style.transition = "none";
442
- }, 300)), o.style.transform = `translate3d(${a}px, ${d}px, 0) scale(${s})`, i.fire("move", { dx: t, dy: e });
442
+ }, 300)), o.style.transform = `translate3d(${a}px, ${f}px, 0) scale(${s})`, i.fire("move", { dx: t, dy: e });
443
443
  }, st = (t, e = !1) => {
444
444
  const { container: n, map: o, nodes: s } = t;
445
445
  let i, r;
446
446
  if (t.alignment === "nodes" || e)
447
447
  i = (n.offsetWidth - s.offsetWidth) / 2, r = (n.offsetHeight - s.offsetHeight) / 2, o.style.transformOrigin = "50% 50%";
448
448
  else {
449
- const c = o.querySelector("me-root"), l = c.offsetTop, a = c.offsetLeft, d = c.offsetWidth, f = c.offsetHeight;
450
- i = n.offsetWidth / 2 - a - d / 2, r = n.offsetHeight / 2 - l - f / 2, o.style.transformOrigin = `${a + d / 2}px 50%`;
449
+ const c = o.querySelector("me-root"), l = c.offsetTop, a = c.offsetLeft, f = c.offsetWidth, d = c.offsetHeight;
450
+ i = n.offsetWidth / 2 - a - f / 2, r = n.offsetHeight / 2 - l - d / 2, o.style.transformOrigin = `${a + f / 2}px 50%`;
451
451
  }
452
452
  return { dx: i, dy: r };
453
- }, ae = function() {
453
+ }, de = function() {
454
454
  const { map: t, container: e } = this, { dx: n, dy: o } = st(this);
455
455
  e.scrollTop = 0, e.scrollLeft = 0, t.style.transform = `translate3d(${n}px, ${o}px, 0) scale(${this.scaleVal})`;
456
- }, he = function(t) {
456
+ }, fe = function(t) {
457
457
  t(this);
458
- }, de = function(t) {
458
+ }, ue = function(t) {
459
459
  t.nodeObj.parent && (this.clearSelection(), this.tempDirection === null && (this.tempDirection = this.direction), this.isFocusMode || (this.nodeDataBackup = this.nodeData, this.isFocusMode = !0), this.nodeData = t.nodeObj, this.initRight(), this.toCenter());
460
- }, fe = function() {
460
+ }, pe = function() {
461
461
  this.isFocusMode = !1, this.tempDirection !== null && (this.nodeData = this.nodeDataBackup, this.direction = this.tempDirection, this.tempDirection = null, this.refresh(), this.toCenter());
462
- }, ue = function() {
462
+ }, ge = function() {
463
463
  this.direction = 0, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
464
- }, pe = function() {
464
+ }, me = function() {
465
465
  this.direction = 1, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
466
- }, ge = function() {
466
+ }, ye = function() {
467
467
  this.direction = 2, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
468
- }, me = function(t, e) {
468
+ }, we = function(t, e) {
469
469
  const n = t.nodeObj;
470
470
  typeof e == "boolean" ? n.expanded = e : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
471
471
  const o = t.getBoundingClientRect(), s = {
472
472
  x: o.left,
473
473
  y: o.top
474
474
  }, i = t.parentNode, r = i.children[1];
475
- if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", Ut(t), n.expanded) {
476
- const f = this.createChildren(
475
+ if (r.expanded = n.expanded, r.className = n.expanded ? "minus" : "", Jt(t), n.expanded) {
476
+ const d = this.createChildren(
477
477
  n.children.map((p) => this.createWrapper(p).grp)
478
478
  );
479
- i.parentNode.appendChild(f);
479
+ i.parentNode.appendChild(d);
480
480
  } else
481
481
  i.parentNode.children[1].remove();
482
482
  this.linkDiv(t.closest("me-main > me-wrapper"));
483
483
  const c = t.getBoundingClientRect(), l = {
484
484
  x: c.left,
485
485
  y: c.top
486
- }, a = s.x - l.x, d = s.y - l.y;
487
- this.move(a, d), this.bus.fire("expandNode", n);
488
- }, ye = function(t, e) {
486
+ }, a = s.x - l.x, f = s.y - l.y;
487
+ this.move(a, f), this.bus.fire("expandNode", n);
488
+ }, ve = function(t, e) {
489
489
  const n = t.nodeObj, o = t.getBoundingClientRect(), s = {
490
490
  x: o.left,
491
491
  y: o.top
@@ -496,48 +496,48 @@ const Jt = function(t) {
496
496
  y: i.top
497
497
  }, c = s.x - r.x, l = s.y - r.y;
498
498
  this.move(c, l);
499
- }, we = function(t) {
499
+ }, be = function(t) {
500
500
  this.clearSelection(), t && (t = JSON.parse(JSON.stringify(t)), this.nodeData = t.nodeData, this.arrows = t.arrows || [], this.summaries = t.summaries || [], t.theme && this.changeTheme(t.theme)), nt(this.nodeData), this.layout(), this.linkDiv();
501
- }, ve = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
501
+ }, xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
502
502
  __proto__: null,
503
- cancelFocus: fe,
504
- clearSelection: ee,
505
- disableEdit: ie,
506
- enableEdit: se,
507
- expandNode: me,
508
- expandNodeAll: ye,
509
- focusNode: de,
510
- getData: oe,
511
- getDataString: ne,
512
- initLeft: ue,
513
- initRight: pe,
514
- initSide: ge,
515
- install: he,
516
- move: le,
517
- refresh: we,
518
- scale: re,
519
- scaleFit: ce,
520
- scrollIntoView: Jt,
521
- selectNode: Zt,
522
- selectNodes: Qt,
503
+ cancelFocus: pe,
504
+ clearSelection: oe,
505
+ disableEdit: ce,
506
+ enableEdit: re,
507
+ expandNode: we,
508
+ expandNodeAll: ve,
509
+ focusNode: ue,
510
+ getData: ie,
511
+ getDataString: se,
512
+ initLeft: ge,
513
+ initRight: me,
514
+ initSide: ye,
515
+ install: fe,
516
+ move: he,
517
+ refresh: be,
518
+ scale: le,
519
+ scaleFit: ae,
520
+ scrollIntoView: Qt,
521
+ selectNode: te,
522
+ selectNodes: ee,
523
523
  stringifyData: Tt,
524
- toCenter: ae,
525
- unselectNodes: te
526
- }, Symbol.toStringTag, { value: "Module" })), be = 40, xe = 10, Ce = ({ deltaMode: t, deltaY: e, viewportHeight: n }) => t === WheelEvent.DOM_DELTA_LINE ? e * be : t === WheelEvent.DOM_DELTA_PAGE ? e * n : e, Se = ({ deltaMode: t, deltaY: e, scaleSensitivity: n, viewportHeight: o }) => {
527
- const i = -Ce({ deltaMode: t, deltaY: e, viewportHeight: o }) / xe * n;
524
+ toCenter: de,
525
+ unselectNodes: ne
526
+ }, Symbol.toStringTag, { value: "Module" })), Ce = 40, Se = 10, Ee = ({ deltaMode: t, deltaY: e, viewportHeight: n }) => t === WheelEvent.DOM_DELTA_LINE ? e * Ce : t === WheelEvent.DOM_DELTA_PAGE ? e * n : e, Te = ({ deltaMode: t, deltaY: e, scaleSensitivity: n, viewportHeight: o }) => {
527
+ const i = -Ee({ deltaMode: t, deltaY: e, viewportHeight: o }) / Se * n;
528
528
  return Math.max(-n, Math.min(n, i));
529
- }, Ee = (t, e, n) => {
529
+ }, De = (t, e, n) => {
530
530
  e !== 0 && t.scale(t.scaleVal + e, n);
531
- }, Te = (t, e) => {
532
- const n = Se({
531
+ }, Le = (t, e) => {
532
+ const n = Te({
533
533
  deltaMode: e.deltaMode,
534
534
  deltaY: e.deltaY,
535
535
  scaleSensitivity: t.scaleSensitivity,
536
536
  viewportHeight: t.container.clientHeight || window.innerHeight
537
537
  });
538
- Ee(t, n, { x: e.clientX, y: e.clientY });
538
+ De(t, n, { x: e.clientX, y: e.clientY });
539
539
  };
540
- function De(t) {
540
+ function Me(t) {
541
541
  const { panHelper: e, container: n } = t;
542
542
  let o = null;
543
543
  t.spacePressed = !1;
@@ -593,7 +593,7 @@ function De(t) {
593
593
  clear() {
594
594
  this.activePointers.clear(), this.lastDistance = null;
595
595
  }
596
- }, c = Ot(t), l = {
596
+ }, c = Wt(t), l = {
597
597
  timer: null,
598
598
  startPos: null,
599
599
  pointerId: null,
@@ -619,7 +619,7 @@ function De(t) {
619
619
  if (!E?.type || !E?.element) return !1;
620
620
  const { type: P, element: k } = E;
621
621
  return t.clearSelection(), P === "arrow" ? m ? t.editArrowLabel(k) : t.selectArrow(k) : m ? t.editSummary(k) : t.selectSummary(k), !0;
622
- }, d = (h) => {
622
+ }, f = (h) => {
623
623
  if (h.pointerType === "mouse" && h.button !== 0) return;
624
624
  if (t.helper1?.moved) {
625
625
  t.helper1.clear();
@@ -637,7 +637,7 @@ function De(t) {
637
637
  return;
638
638
  const m = h.target;
639
639
  m.tagName === "ME-EPD" && (h.ctrlKey || h.metaKey ? t.expandNodeAll(m.previousSibling) : t.expandNode(m.previousSibling));
640
- }, f = (h) => {
640
+ }, d = (h) => {
641
641
  if (!t.editable) return;
642
642
  const m = h.target;
643
643
  if (J(m)) {
@@ -652,7 +652,7 @@ function De(t) {
652
652
  }
653
653
  if (t.ptState === i.Pinch) return;
654
654
  const m = h.target;
655
- if (m.className === "map-container" && h.button === 0 && h.pointerType === "mouse") {
655
+ if (t.editable && m.className === "map-container" && h.button === 0 && h.pointerType === "mouse") {
656
656
  t.ptState = i.BoxSelect;
657
657
  return;
658
658
  }
@@ -660,7 +660,8 @@ function De(t) {
660
660
  if (J(m)) {
661
661
  t.selection?.cancel();
662
662
  const S = t.currentNodes || [];
663
- h.ctrlKey || h.metaKey || t.mobileMultiSelect ? S.includes(m) ? o = m : ((t.currentArrow || t.currentSummary) && t.clearSelection(), t.selection?.select(m)) : S.includes(m) || t.selectNode(m), h.pointerType === "touch" ? (t.ptState = i.DragWait, l.start(h, (P) => {
663
+ if (h.ctrlKey || h.metaKey || t.mobileMultiSelect ? S.includes(m) ? o = m : ((t.currentArrow || t.currentSummary) && t.clearSelection(), t.selection?.select(m)) : S.includes(m) || t.selectNode(m), !t.editable) return;
664
+ h.pointerType === "touch" ? (t.ptState = i.DragWait, l.start(h, (P) => {
664
665
  ft(t, c, P, !0) && (t.ptState = i.Drag, m.setPointerCapture(P.pointerId));
665
666
  })) : ft(t, c, h, !1) && (t.ptState = i.Drag, m.setPointerCapture(h.pointerId));
666
667
  } else
@@ -674,7 +675,7 @@ function De(t) {
674
675
  l.handleMove(h), l.timer === null && (t.ptState = i.Idle);
675
676
  break;
676
677
  case i.Drag:
677
- Wt(t, c, h);
678
+ Rt(t, c, h);
678
679
  break;
679
680
  case i.Pan:
680
681
  e.handlePointerMove(h);
@@ -688,13 +689,13 @@ function De(t) {
688
689
  l.clear();
689
690
  break;
690
691
  case i.Drag:
691
- Yt(t, c, h);
692
+ Xt(t, c, h);
692
693
  break;
693
694
  case i.Pan:
694
695
  e.handlePointerUp(h);
695
696
  break;
696
697
  }
697
- s.detect(h, f), (t.ptState !== i.Pinch || r.activePointers.size < 2) && (t.ptState = i.Idle), o && (!m && !x && t.selection?.deselect(o), o = null);
698
+ s.detect(h, d), (t.ptState !== i.Pinch || r.activePointers.size < 2) && (t.ptState = i.Idle), o && (!m && !x && t.selection?.deselect(o), o = null);
698
699
  }, u = () => {
699
700
  r.clear(), l.clear(), e.clear(), s.clear(), (c.isDragging || c.pointerId !== null) && ut(t, c), t.ptState = i.Idle, o = null;
700
701
  }, g = (h) => {
@@ -704,7 +705,7 @@ function De(t) {
704
705
  J(m) && !m.classList.contains("selected") && t.selectNode(m), t.bus.fire("showContextMenu", h);
705
706
  }, 200);
706
707
  }, b = (h) => {
707
- if (h.stopPropagation(), h.preventDefault(), h.ctrlKey || h.metaKey) return Te(t, h);
708
+ if (h.stopPropagation(), h.preventDefault(), h.ctrlKey || h.metaKey) return Le(t, h);
708
709
  if (h.shiftKey) return t.move(-h.deltaY, 0);
709
710
  t.move(-h.deltaX, -h.deltaY);
710
711
  }, v = (h) => {
@@ -717,7 +718,7 @@ function De(t) {
717
718
  { dom: n, evt: "pointermove", func: w },
718
719
  { dom: n, evt: "pointerup", func: y },
719
720
  { dom: n, evt: "pointercancel", func: u },
720
- { dom: n, evt: "click", func: d },
721
+ { dom: n, evt: "click", func: f },
721
722
  { dom: n, evt: "contextmenu", func: g },
722
723
  { dom: n, evt: "wheel", func: typeof t.handleWheel == "function" ? t.handleWheel : b },
723
724
  { dom: n, evt: "blur", func: u },
@@ -725,7 +726,7 @@ function De(t) {
725
726
  { dom: n, evt: "keyup", func: C }
726
727
  ]);
727
728
  }
728
- function Le() {
729
+ function Pe() {
729
730
  return {
730
731
  handlers: {},
731
732
  addListener: function(t, e) {
@@ -772,7 +773,7 @@ const N = "http://www.w3.org/2000/svg", U = function(t) {
772
773
  }, pt = function() {
773
774
  const t = document.createElementNS(N, "line");
774
775
  return t.setAttribute("stroke", "#4dc4ff"), t.setAttribute("fill", "none"), t.setAttribute("stroke-width", "2"), t.setAttribute("opacity", "0.45"), t;
775
- }, Me = function(t, e, n, o) {
776
+ }, ke = function(t, e, n, o) {
776
777
  const s = document.createElementNS(N, "g");
777
778
  return [
778
779
  {
@@ -788,21 +789,21 @@ const N = "http://www.w3.org/2000/svg", U = function(t) {
788
789
  d: n
789
790
  }
790
791
  ].forEach((r, c) => {
791
- const l = r.d, a = document.createElementNS(N, "path"), d = {
792
+ const l = r.d, a = document.createElementNS(N, "path"), f = {
792
793
  d: l,
793
794
  stroke: o?.stroke || "rgb(227, 125, 116)",
794
795
  fill: "none",
795
796
  "stroke-linecap": o?.strokeLinecap || "cap",
796
797
  "stroke-width": String(o?.strokeWidth || "2")
797
798
  };
798
- o?.opacity !== void 0 && (d.opacity = String(o.opacity)), D(a, d), c === 0 && a.setAttribute("stroke-dasharray", o?.strokeDasharray || "8,2");
799
- const f = document.createElementNS(N, "path");
800
- D(f, {
799
+ o?.opacity !== void 0 && (f.opacity = String(o.opacity)), D(a, f), c === 0 && a.setAttribute("stroke-dasharray", o?.strokeDasharray || "8,2");
800
+ const d = document.createElementNS(N, "path");
801
+ D(d, {
801
802
  d: l,
802
803
  stroke: "transparent",
803
804
  fill: "none",
804
805
  "stroke-width": "15"
805
- }), s.appendChild(f), s.appendChild(a), s[r.name] = a;
806
+ }), s.appendChild(d), s.appendChild(a), s[r.name] = a;
806
807
  }), s;
807
808
  }, Lt = function(t, e, n) {
808
809
  if (!e) return;
@@ -831,11 +832,11 @@ const N = "http://www.w3.org/2000/svg", U = function(t) {
831
832
  obj: n
832
833
  }));
833
834
  });
834
- }, Pe = function(t) {
835
+ }, Ne = function(t) {
835
836
  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");
836
837
  this.lines.innerHTML = "";
837
838
  for (let c = 0; c < r.length; c++) {
838
- const l = r[c], a = l.querySelector("me-tpc"), { offsetLeft: d, offsetTop: f } = M(this.nodes, a), p = a.offsetWidth, w = a.offsetHeight, y = l.parentNode.className, u = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: f, cL: d, cW: p, cH: w, direction: y, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, b = a.nodeObj.branchColor || g[c % g.length];
839
+ const l = r[c], a = l.querySelector("me-tpc"), { offsetLeft: f, offsetTop: d } = M(this.nodes, a), p = a.offsetWidth, w = a.offsetHeight, y = l.parentNode.className, u = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: d, cL: f, cW: p, cH: w, direction: y, containerHeight: this.nodes.offsetHeight }), g = this.theme.palette, b = a.nodeObj.branchColor || g[c % g.length];
839
840
  if (a.style.borderColor = b, this.lines.appendChild(Dt(u, b, "3")), t && t !== l)
840
841
  continue;
841
842
  const v = W("subLines"), C = l.lastChild;
@@ -845,9 +846,9 @@ const N = "http://www.w3.org/2000/svg", U = function(t) {
845
846
  }, Mt = function(t, e, n, o, s, i) {
846
847
  const r = o.firstChild, c = o.children[1].children;
847
848
  if (c.length === 0) return;
848
- const l = r.offsetTop, a = r.offsetLeft, d = r.offsetWidth, f = r.offsetHeight;
849
+ const l = r.offsetTop, a = r.offsetLeft, f = r.offsetWidth, d = r.offsetHeight;
849
850
  for (let p = 0; p < c.length; p++) {
850
- const w = c[p], y = w.firstChild, u = y.offsetTop, g = y.offsetLeft, b = y.offsetWidth, v = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: l, pL: a, pW: d, pH: f, cT: u, cL: g, cW: b, cH: v, direction: s, isFirst: i });
851
+ const w = c[p], y = w.firstChild, u = y.offsetTop, g = y.offsetLeft, b = y.offsetWidth, v = y.offsetHeight, C = y.firstChild.nodeObj.branchColor || n, T = t.generateSubBranch({ pT: l, pL: a, pW: f, pH: d, cT: u, cL: g, cW: b, cH: v, direction: s, isFirst: i });
851
852
  e.appendChild(Dt(T, C, "2"));
852
853
  const h = y.children[1];
853
854
  if (h) {
@@ -856,33 +857,33 @@ const N = "http://www.w3.org/2000/svg", U = function(t) {
856
857
  continue;
857
858
  Mt(t, e, C, w, s);
858
859
  }
859
- }, 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"><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>', Ne = '<?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>', Ae = '<?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>', $e = '<?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>', He = '<?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>', Ie = '<?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>', Oe = '<?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>', Be = {
860
- side: ke,
861
- left: Ne,
862
- right: Ae,
863
- full: $e,
864
- living: He,
865
- zoomin: Ie,
866
- zoomout: Oe
860
+ }, Ae = '<?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>', $e = '<?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>', He = '<?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>', Ie = '<?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>', Oe = '<?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>', Be = '<?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>', We = '<?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>', Ye = {
861
+ side: Ae,
862
+ left: $e,
863
+ right: He,
864
+ full: Ie,
865
+ living: Oe,
866
+ zoomin: Be,
867
+ zoomout: We
867
868
  }, $ = (t, e) => {
868
869
  const n = document.createElement("span");
869
- return n.id = t, n.innerHTML = Be[e], n;
870
+ return n.id = t, n.innerHTML = Ye[e], n;
870
871
  };
871
- function We(t) {
872
+ function Re(t) {
872
873
  const e = document.createElement("div"), n = $("fullscreen", "full"), o = $("toCenter", "living"), s = $("zoomout", "zoomout"), i = $("zoomin", "zoomin");
873
874
  e.appendChild(n), e.appendChild(o), e.appendChild(s), e.appendChild(i), e.className = "mind-elixir-toolbar rb";
874
875
  let r = null;
875
876
  const c = () => {
876
- const a = t.container.getBoundingClientRect(), d = ot(t.map.style.transform), f = a.width / 2, p = a.height / 2, w = (f - d.x) / t.scaleVal, y = (p - d.y) / t.scaleVal;
877
+ const a = t.container.getBoundingClientRect(), f = ot(t.map.style.transform), d = a.width / 2, p = a.height / 2, w = (d - f.x) / t.scaleVal, y = (p - f.y) / t.scaleVal;
877
878
  r = {
878
879
  containerRect: a,
879
- currentTransform: d,
880
+ currentTransform: f,
880
881
  mapCenterX: w,
881
882
  mapCenterY: y
882
883
  };
883
884
  }, l = () => {
884
885
  if (r) {
885
- const a = t.container.getBoundingClientRect(), d = a.width / 2, f = a.height / 2, p = d - r.mapCenterX * t.scaleVal, w = f - r.mapCenterY * t.scaleVal, y = p - r.currentTransform.x, u = w - r.currentTransform.y;
886
+ const a = t.container.getBoundingClientRect(), f = a.width / 2, d = a.height / 2, p = f - r.mapCenterX * t.scaleVal, w = d - r.mapCenterY * t.scaleVal, y = p - r.currentTransform.x, u = w - r.currentTransform.y;
886
887
  t.move(y, u);
887
888
  }
888
889
  };
@@ -896,7 +897,7 @@ function We(t) {
896
897
  t.scale(t.scaleVal + t.scaleSensitivity);
897
898
  }, e;
898
899
  }
899
- function Ye(t) {
900
+ function Xe(t) {
900
901
  const e = document.createElement("div"), n = $("tbltl", "left"), o = $("tbltr", "right"), s = $("tblts", "side");
901
902
  return e.appendChild(n), e.appendChild(o), e.appendChild(s), e.className = "mind-elixir-toolbar lt", n.onclick = () => {
902
903
  t.initLeft();
@@ -906,10 +907,10 @@ function Ye(t) {
906
907
  t.initSide();
907
908
  }, e;
908
909
  }
909
- function Re(t) {
910
- t.container.append(We(t)), t.container.append(Ye(t));
910
+ function Ve(t) {
911
+ t.container.append(Re(t)), t.container.append(Xe(t));
911
912
  }
912
- const Xe = function(t, e = !0) {
913
+ const ze = function(t, e = !0) {
913
914
  this.theme = t;
914
915
  const o = {
915
916
  ...(t.type === "dark" ? et : tt).cssVar,
@@ -920,7 +921,7 @@ const Xe = function(t, e = !0) {
920
921
  this.container.style.setProperty(r, o[r]);
921
922
  }
922
923
  e && this.refresh();
923
- }, Ve = function(t) {
924
+ }, Fe = function(t) {
924
925
  return {
925
926
  dom: t,
926
927
  moved: !1,
@@ -956,15 +957,15 @@ const Xe = function(t, e = !0) {
956
957
  }
957
958
  };
958
959
  }, gt = {
959
- create: Ve
960
- }, ze = "#4dc4ff";
961
- function Pt(t, e, n, o, s, i, r, c) {
960
+ create: Fe
961
+ }, Pt = "#4dc4ff";
962
+ function kt(t, e, n, o, s, i, r, c) {
962
963
  return {
963
964
  x: t / 8 + n * 3 / 8 + s * 3 / 8 + r / 8,
964
965
  y: e / 8 + o * 3 / 8 + i * 3 / 8 + c / 8
965
966
  };
966
967
  }
967
- function Fe(t, e, n) {
968
+ function Ge(t, e, n) {
968
969
  t && (t.dataset.x = e.toString(), t.dataset.y = n.toString(), U(t));
969
970
  }
970
971
  function V(t, e, n, o, s) {
@@ -976,17 +977,17 @@ function V(t, e, n, o, s) {
976
977
  });
977
978
  }
978
979
  function mt(t, e, n, o, s, i, r, c, l, a) {
979
- const d = `M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`;
980
- if (t.line.setAttribute("d", d), a.style) {
980
+ const f = `M ${e} ${n} C ${o} ${s} ${i} ${r} ${c} ${l}`;
981
+ if (t.line.setAttribute("d", f), a.style) {
981
982
  const u = a.style;
982
983
  u.stroke && t.line.setAttribute("stroke", u.stroke), u.strokeWidth && t.line.setAttribute("stroke-width", String(u.strokeWidth)), u.strokeDasharray && t.line.setAttribute("stroke-dasharray", u.strokeDasharray), u.strokeLinecap && t.line.setAttribute("stroke-linecap", u.strokeLinecap), u.opacity !== void 0 && t.line.setAttribute("opacity", String(u.opacity));
983
984
  }
984
- const f = t.querySelectorAll('path[stroke="transparent"]');
985
- f.length > 0 && f[0].setAttribute("d", d);
985
+ const d = t.querySelectorAll('path[stroke="transparent"]');
986
+ d.length > 0 && d[0].setAttribute("d", f);
986
987
  const p = _(i, r, c, l);
987
988
  if (p) {
988
989
  const u = `M ${p.x1} ${p.y1} L ${c} ${l} L ${p.x2} ${p.y2}`;
989
- if (t.arrow1.setAttribute("d", u), f.length > 1 && f[1].setAttribute("d", u), a.style) {
990
+ if (t.arrow1.setAttribute("d", u), d.length > 1 && d[1].setAttribute("d", u), a.style) {
990
991
  const g = a.style;
991
992
  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));
992
993
  }
@@ -995,28 +996,28 @@ function mt(t, e, n, o, s, i, r, c, l, a) {
995
996
  const u = _(o, s, e, n);
996
997
  if (u) {
997
998
  const g = `M ${u.x1} ${u.y1} L ${e} ${n} L ${u.x2} ${u.y2}`;
998
- if (t.arrow2.setAttribute("d", g), f.length > 2 && f[2].setAttribute("d", g), a.style) {
999
+ if (t.arrow2.setAttribute("d", g), d.length > 2 && d[2].setAttribute("d", g), a.style) {
999
1000
  const b = a.style;
1000
1001
  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));
1001
1002
  }
1002
1003
  }
1003
1004
  }
1004
- const { x: w, y } = Pt(e, n, o, s, i, r, c, l);
1005
- if (t.labelEl && Fe(t.labelEl, w, y), a.style?.labelColor) {
1005
+ const { x: w, y } = kt(e, n, o, s, i, r, c, l);
1006
+ if (t.labelEl && Ge(t.labelEl, w, y), a.style?.labelColor) {
1006
1007
  const u = t.labelEl;
1007
1008
  u && (u.style.color = a.style.labelColor);
1008
1009
  }
1009
1010
  Qe(t);
1010
1011
  }
1011
1012
  function q(t, e, n) {
1012
- const { offsetLeft: o, offsetTop: s } = M(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, l = s + r / 2, a = c + n.x, d = l + n.y;
1013
+ const { offsetLeft: o, offsetTop: s } = M(t.nodes, e), i = e.offsetWidth, r = e.offsetHeight, c = o + i / 2, l = s + r / 2, a = c + n.x, f = l + n.y;
1013
1014
  return {
1014
1015
  w: i,
1015
1016
  h: r,
1016
1017
  cx: c,
1017
1018
  cy: l,
1018
1019
  ctrlX: a,
1019
- ctrlY: d
1020
+ ctrlY: f
1020
1021
  };
1021
1022
  }
1022
1023
  function H(t) {
@@ -1027,20 +1028,20 @@ function H(t) {
1027
1028
  y: n
1028
1029
  };
1029
1030
  }
1030
- const Ge = function(t, e, n) {
1031
- const o = M(t.nodes, e), s = M(t.nodes, n), i = o.offsetLeft + e.offsetWidth / 2, r = o.offsetTop + e.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, l = s.offsetTop + n.offsetHeight / 2, a = c - i, d = l - r, f = Math.sqrt(a * a + d * d), p = Math.max(50, Math.min(200, f * 0.3)), w = Math.abs(a), y = Math.abs(d);
1031
+ const _e = function(t, e, n) {
1032
+ const o = M(t.nodes, e), s = M(t.nodes, n), i = o.offsetLeft + e.offsetWidth / 2, r = o.offsetTop + e.offsetHeight / 2, c = s.offsetLeft + n.offsetWidth / 2, l = s.offsetTop + n.offsetHeight / 2, a = c - i, f = l - r, d = Math.sqrt(a * a + f * f), p = Math.max(50, Math.min(200, d * 0.3)), w = Math.abs(a), y = Math.abs(f);
1032
1033
  let u, g;
1033
- if (f < 150) {
1034
+ if (d < 150) {
1034
1035
  const v = e.closest("me-main").className === "lhs" ? -1 : 1;
1035
1036
  u = { x: 200 * v, y: 0 }, g = { x: 200 * v, y: 0 };
1036
1037
  } else if (w > y * 1.5) {
1037
1038
  const v = a > 0 ? e.offsetWidth / 2 : -e.offsetWidth / 2, C = a > 0 ? -n.offsetWidth / 2 : n.offsetWidth / 2;
1038
1039
  u = { x: v + (a > 0 ? p : -p), y: 0 }, g = { x: C + (a > 0 ? -p : p), y: 0 };
1039
1040
  } else if (y > w * 1.5) {
1040
- const v = d > 0 ? e.offsetHeight / 2 : -e.offsetHeight / 2, C = d > 0 ? -n.offsetHeight / 2 : n.offsetHeight / 2;
1041
- u = { x: 0, y: v + (d > 0 ? p : -p) }, g = { x: 0, y: C + (d > 0 ? -p : p) };
1041
+ const v = f > 0 ? e.offsetHeight / 2 : -e.offsetHeight / 2, C = f > 0 ? -n.offsetHeight / 2 : n.offsetHeight / 2;
1042
+ u = { x: 0, y: v + (f > 0 ? p : -p) }, g = { x: 0, y: C + (f > 0 ? -p : p) };
1042
1043
  } else {
1043
- const v = Math.atan2(d, a), C = e.offsetWidth / 2 * Math.cos(v), T = e.offsetHeight / 2 * Math.sin(v), h = -(n.offsetWidth / 2) * Math.cos(v), m = -(n.offsetHeight / 2) * Math.sin(v), x = p * 0.7 * (a > 0 ? 1 : -1), S = p * 0.7 * (d > 0 ? 1 : -1);
1044
+ const v = Math.atan2(f, a), C = e.offsetWidth / 2 * Math.cos(v), T = e.offsetHeight / 2 * Math.sin(v), h = -(n.offsetWidth / 2) * Math.cos(v), m = -(n.offsetHeight / 2) * Math.sin(v), x = p * 0.7 * (a > 0 ? 1 : -1), S = p * 0.7 * (f > 0 ? 1 : -1);
1044
1045
  u = { x: C + x, y: T + S }, g = { x: h - x, y: m - S };
1045
1046
  }
1046
1047
  return {
@@ -1051,19 +1052,19 @@ const Ge = function(t, e, n) {
1051
1052
  if (!e || !n)
1052
1053
  return;
1053
1054
  if (!o.delta1 || !o.delta2) {
1054
- const E = Ge(t, e, n);
1055
+ const E = _e(t, e, n);
1055
1056
  o.delta1 = E.delta1, o.delta2 = E.delta2;
1056
1057
  }
1057
- const i = q(t, e, o.delta1), r = q(t, n, o.delta2), { x: c, y: l } = H(i), { ctrlX: a, ctrlY: d } = i, { ctrlX: f, ctrlY: p } = r, { x: w, y } = H(r), u = _(f, p, w, y);
1058
+ const i = q(t, e, o.delta1), r = q(t, n, o.delta2), { x: c, y: l } = H(i), { ctrlX: a, ctrlY: f } = i, { ctrlX: d, ctrlY: p } = r, { x: w, y } = H(r), u = _(d, p, w, y);
1058
1059
  if (!u) return;
1059
1060
  const g = `M ${u.x1} ${u.y1} L ${w} ${y} L ${u.x2} ${u.y2}`;
1060
1061
  let b = "";
1061
1062
  if (o.bidirectional) {
1062
- const E = _(a, d, c, l);
1063
+ const E = _(a, f, c, l);
1063
1064
  if (!E) return;
1064
1065
  b = `M ${E.x1} ${E.y1} L ${c} ${l} L ${E.x2} ${E.y2}`;
1065
1066
  }
1066
- const v = Me(`M ${c} ${l} C ${a} ${d} ${f} ${p} ${w} ${y}`, g, b, o.style), { x: C, y: T } = Pt(c, l, a, d, f, p, w, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1067
+ const v = ke(`M ${c} ${l} C ${a} ${f} ${d} ${p} ${w} ${y}`, g, b, o.style), { x: C, y: T } = kt(c, l, a, f, d, p, w, y), h = o.style?.labelColor || "rgb(235, 95, 82)", m = "a-" + o.id;
1067
1068
  v.id = m;
1068
1069
  const x = t.markdown ? t.markdown(o.label, o) : o.label, S = Q(x, C, T, {
1069
1070
  anchor: "middle",
@@ -1071,8 +1072,8 @@ const Ge = function(t, e, n) {
1071
1072
  dataType: "arrow",
1072
1073
  svgId: m
1073
1074
  });
1074
- v.labelEl = S, v.arrowObj = o, v.dataset.linkid = o.id, t.labelContainer.appendChild(S), t.arrowSvg.appendChild(v), U(S), s || (t.arrows.push(o), t.currentArrow = v, kt(t, o, i, r));
1075
- }, _e = function(t, e, n = {}) {
1075
+ v.labelEl = S, v.arrowObj = o, v.dataset.linkid = o.id, t.labelContainer.appendChild(S), t.arrowSvg.appendChild(v), U(S), s || (t.arrows.push(o), t.currentArrow = v, At(t, o, i, r));
1076
+ }, qe = function(t, e, n = {}) {
1076
1077
  const o = {
1077
1078
  id: Y(),
1078
1079
  label: "Custom Link",
@@ -1084,14 +1085,14 @@ const Ge = function(t, e, n) {
1084
1085
  name: "createArrow",
1085
1086
  obj: o
1086
1087
  });
1087
- }, qe = function(t) {
1088
+ }, je = function(t) {
1088
1089
  K(this);
1089
1090
  const e = { ...t, id: Y() };
1090
1091
  it(this, this.findEle(e.from), this.findEle(e.to), e), this.bus.fire("operation", {
1091
1092
  name: "createArrow",
1092
1093
  obj: e
1093
1094
  });
1094
- }, je = function(t) {
1095
+ }, Ue = function(t) {
1095
1096
  let e;
1096
1097
  if (t ? e = t : e = this.currentArrow, !e) return;
1097
1098
  K(this);
@@ -1102,11 +1103,11 @@ const Ge = function(t, e, n) {
1102
1103
  id: n
1103
1104
  }
1104
1105
  });
1105
- }, Ue = function(t) {
1106
+ }, Ke = function(t) {
1106
1107
  this.currentArrow = t;
1107
1108
  const e = t.arrowObj, n = this.findEle(e.from), o = this.findEle(e.to), s = q(this, n, e.delta1), i = q(this, o, e.delta2);
1108
- kt(this, e, s, i), this.bus.fire("selectArrow", e);
1109
- }, Ke = function() {
1109
+ this.editable ? At(this, e, s, i) : Nt(t, Pt), this.bus.fire("selectArrow", e);
1110
+ }, Je = function() {
1110
1111
  K(this), this.currentArrow = null, this.bus.fire("unselectArrow");
1111
1112
  }, Z = function(t, e) {
1112
1113
  const n = document.createElementNS(N, "path");
@@ -1118,7 +1119,7 @@ const Ge = function(t, e, n) {
1118
1119
  "stroke-linecap": "round",
1119
1120
  "stroke-linejoin": "round"
1120
1121
  }), n;
1121
- }, Je = function(t, e) {
1122
+ }, Nt = function(t, e) {
1122
1123
  const n = document.createElementNS(N, "g");
1123
1124
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
1124
1125
  const o = Z(t.line.getAttribute("d"), e);
@@ -1139,19 +1140,19 @@ const Ge = function(t, e, n) {
1139
1140
  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"));
1140
1141
  }, K = function(t) {
1141
1142
  t.helper1?.destroy(), t.helper2?.destroy(), t.linkController.style.display = "none", t.P2.style.display = "none", t.P3.style.display = "none", t.currentArrow && Ze(t.currentArrow);
1142
- }, kt = function(t, e, n, o) {
1143
- const { linkController: s, P2: i, P3: r, line1: c, line2: l, nodes: a, map: d, currentArrow: f, bus: p } = t;
1144
- if (!f) return;
1145
- s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(r), Je(f, ze);
1143
+ }, At = function(t, e, n, o) {
1144
+ const { linkController: s, P2: i, P3: r, line1: c, line2: l, nodes: a, map: f, currentArrow: d, bus: p } = t;
1145
+ if (!d) return;
1146
+ s.style.display = "initial", i.style.display = "initial", r.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(r), Nt(d, Pt);
1146
1147
  let { x: w, y } = H(n), { ctrlX: u, ctrlY: g } = n, { ctrlX: b, ctrlY: v } = o, { x: C, y: T } = H(o);
1147
- i.style.cssText = `top:${g}px;left:${u}px;`, r.style.cssText = `top:${v}px;left:${b}px;`, V(c, w, y, u, g), V(l, b, v, C, T), t.helper1 = gt.create(i), t.helper2 = gt.create(r), t.helper1.init(d, (h, m) => {
1148
+ i.style.cssText = `top:${g}px;left:${u}px;`, r.style.cssText = `top:${v}px;left:${b}px;`, V(c, w, y, u, g), V(l, b, v, C, T), t.helper1 = gt.create(i), t.helper2 = gt.create(r), t.helper1.init(f, (h, m) => {
1148
1149
  u = u + h / t.scaleVal, g = g + m / t.scaleVal;
1149
1150
  const x = H({ ...n, ctrlX: u, ctrlY: g });
1150
- w = x.x, y = x.y, i.style.top = g + "px", i.style.left = u + "px", mt(f, w, y, u, g, b, v, C, T, e), V(c, w, y, u, g), e.delta1.x = Math.round(u - n.cx), e.delta1.y = Math.round(g - n.cy), p.fire("updateArrowDelta", e);
1151
- }), t.helper2.init(d, (h, m) => {
1151
+ w = x.x, y = x.y, i.style.top = g + "px", i.style.left = u + "px", mt(d, w, y, u, g, b, v, C, T, e), V(c, w, y, u, g), e.delta1.x = Math.round(u - n.cx), e.delta1.y = Math.round(g - n.cy), p.fire("updateArrowDelta", e);
1152
+ }), t.helper2.init(f, (h, m) => {
1152
1153
  b = b + h / t.scaleVal, v = v + m / t.scaleVal;
1153
1154
  const x = H({ ...o, ctrlX: b, ctrlY: v });
1154
- C = x.x, T = x.y, r.style.top = v + "px", r.style.left = b + "px", mt(f, w, y, u, g, b, v, C, T, e), V(l, b, v, C, T), e.delta2.x = Math.round(b - o.cx), e.delta2.y = Math.round(v - o.cy), p.fire("updateArrowDelta", e);
1155
+ C = x.x, T = x.y, r.style.top = v + "px", r.style.left = b + "px", mt(d, w, y, u, g, b, v, C, T, e), V(l, b, v, C, T), e.delta2.x = Math.round(b - o.cx), e.delta2.y = Math.round(v - o.cy), p.fire("updateArrowDelta", e);
1155
1156
  });
1156
1157
  };
1157
1158
  function tn() {
@@ -1173,35 +1174,35 @@ function nn() {
1173
1174
  }
1174
1175
  const on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1175
1176
  __proto__: null,
1176
- createArrow: _e,
1177
- createArrowFrom: qe,
1177
+ createArrow: qe,
1178
+ createArrowFrom: je,
1178
1179
  editArrowLabel: en,
1179
- removeArrow: je,
1180
+ removeArrow: Ue,
1180
1181
  renderArrow: tn,
1181
- selectArrow: Ue,
1182
+ selectArrow: Ke,
1182
1183
  tidyArrow: nn,
1183
- unselectArrow: Ke
1184
+ unselectArrow: Je
1184
1185
  }, Symbol.toStringTag, { value: "Module" })), sn = function(t) {
1185
1186
  if (t.length === 0) throw new Error("No selected node.");
1186
1187
  if (t.length === 1) {
1187
1188
  const l = t[0].nodeObj, a = t[0].nodeObj.parent;
1188
1189
  if (!a) throw new Error("Can not select root node.");
1189
- const d = a.children.findIndex((f) => l === f);
1190
+ const f = a.children.findIndex((d) => l === d);
1190
1191
  return {
1191
1192
  parent: a.id,
1192
- start: d,
1193
- end: d
1193
+ start: f,
1194
+ end: f
1194
1195
  };
1195
1196
  }
1196
1197
  let e = 0;
1197
1198
  const n = t.map((l) => {
1198
1199
  let a = l.nodeObj;
1199
- const d = [];
1200
+ const f = [];
1200
1201
  for (; a.parent; ) {
1201
- const f = a.parent, w = f.children?.indexOf(a);
1202
- a = f, d.unshift({ node: a, index: w });
1202
+ const d = a.parent, w = d.children?.indexOf(a);
1203
+ a = d, f.unshift({ node: a, index: w });
1203
1204
  }
1204
- return d.length > e && (e = d.length), d;
1205
+ return f.length > e && (e = f.length), f;
1205
1206
  });
1206
1207
  let o = 0;
1207
1208
  t: for (; o < e; o++) {
@@ -1235,7 +1236,7 @@ const on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1235
1236
  let i;
1236
1237
  return s.parent ? i = o.closest("me-main").className : i = t.findEle(s.children[n].id).closest("me-main").className, i;
1237
1238
  }, rt = function(t, e) {
1238
- const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: l, theme: a, summarySvg: d } = t, p = t.findEle(s).nodeObj, w = ln(t, e);
1239
+ const { id: n, label: o, parent: s, start: i, end: r, style: c } = e, { nodes: l, theme: a, summarySvg: f } = t, p = t.findEle(s).nodeObj, w = ln(t, e);
1239
1240
  let y = 1 / 0, u = 0, g = 0, b = 0;
1240
1241
  for (let B = i; B <= r; B++) {
1241
1242
  const ct = p.children?.[B];
@@ -1248,7 +1249,7 @@ const on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1248
1249
  const T = p.parent ? 10 : 0, h = g + T, m = b + T, x = (h + m) / 2, S = c?.stroke || a.cssVar["--color"], E = c?.labelColor || a.cssVar["--color"], P = "s-" + n, k = t.markdown ? t.markdown(o, e) : o;
1249
1250
  w === I.LHS ? (v = yt(`M ${y + 10} ${h} c -5 0 -10 5 -10 10 L ${y} ${m - 10} c 0 5 5 10 10 10 M ${y} ${x} h -10`, S), C = Q(k, y - 20, x, { anchor: "end", color: E, dataType: "summary", svgId: P })) : (v = yt(`M ${u - 10} ${h} c 5 0 10 5 10 10 L ${u} ${m - 10} c 0 5 -5 10 -10 10 M ${u} ${x} h 10`, S), C = Q(k, u + 20, x, { anchor: "start", color: E, dataType: "summary", svgId: P }));
1250
1251
  const O = rn(P);
1251
- return O.appendChild(v), t.labelContainer.appendChild(C), U(C), O.summaryObj = e, O.labelEl = C, d.appendChild(O), O;
1252
+ return O.appendChild(v), t.labelContainer.appendChild(C), U(C), O.summaryObj = e, O.labelEl = C, f.appendChild(O), O;
1252
1253
  }, an = function(t = {}) {
1253
1254
  if (!this.currentNodes) return;
1254
1255
  const { currentNodes: e, summaries: n, bus: o } = this, { parent: s, start: i, end: r } = sn(e), c = { id: Y(), parent: s, start: i, end: r, label: "summary", style: t.style }, l = rt(this, c);
@@ -1399,25 +1400,25 @@ const F = 100, En = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "
1399
1400
  width: `${s}`,
1400
1401
  height: `${o}`,
1401
1402
  fill: t.theme.cssVar["--bgcolor"]
1402
- }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((f) => {
1403
- const p = f.cloneNode(!0), { offsetLeft: w, offsetTop: y } = M(n, f.parentElement);
1403
+ }), i.appendChild(c), n.querySelectorAll(".subLines").forEach((d) => {
1404
+ const p = d.cloneNode(!0), { offsetLeft: w, offsetTop: y } = M(n, d.parentElement);
1404
1405
  p.setAttribute("x", `${w}`), p.setAttribute("y", `${y}`), r.appendChild(p);
1405
1406
  });
1406
1407
  const l = n.querySelector(".lines")?.cloneNode(!0);
1407
1408
  l && r.appendChild(l);
1408
1409
  const a = n.querySelector(".topiclinks")?.cloneNode(!0);
1409
1410
  a && r.appendChild(a);
1410
- const d = n.querySelector(".summary")?.cloneNode(!0);
1411
- return d && r.appendChild(d), n.querySelectorAll("me-tpc").forEach((f) => {
1412
- f.nodeObj.dangerouslySetInnerHTML ? r.appendChild(z(t, f, !e)) : (r.appendChild(xn(t, f)), r.appendChild(z(t, f.text, !e)));
1413
- }), n.querySelectorAll(".tags > span").forEach((f) => {
1414
- r.appendChild(z(t, f));
1415
- }), n.querySelectorAll(".icons > span").forEach((f) => {
1416
- r.appendChild(z(t, f));
1417
- }), n.querySelectorAll(".hyper-link").forEach((f) => {
1418
- r.appendChild(Cn(t, f));
1419
- }), n.querySelectorAll("img").forEach((f) => {
1420
- r.appendChild(Sn(t, f));
1411
+ const f = n.querySelector(".summary")?.cloneNode(!0);
1412
+ return f && r.appendChild(f), n.querySelectorAll("me-tpc").forEach((d) => {
1413
+ d.nodeObj.dangerouslySetInnerHTML ? r.appendChild(z(t, d, !e)) : (r.appendChild(xn(t, d)), r.appendChild(z(t, d.text, !e)));
1414
+ }), n.querySelectorAll(".tags > span").forEach((d) => {
1415
+ r.appendChild(z(t, d));
1416
+ }), n.querySelectorAll(".icons > span").forEach((d) => {
1417
+ r.appendChild(z(t, d));
1418
+ }), n.querySelectorAll(".hyper-link").forEach((d) => {
1419
+ r.appendChild(Cn(t, d));
1420
+ }), n.querySelectorAll("img").forEach((d) => {
1421
+ r.appendChild(Sn(t, d));
1421
1422
  }), D(r, {
1422
1423
  x: F + "",
1423
1424
  y: F + "",
@@ -1452,24 +1453,24 @@ const Mn = function(t = !1, e) {
1452
1453
  exportSvg: Mn
1453
1454
  }, Symbol.toStringTag, { value: "Module" })), Nn = {}, An = {
1454
1455
  getObjById: G,
1455
- generateNewObj: At,
1456
- layout: Rt,
1457
- linkDiv: Pe,
1458
- editTopic: qt,
1459
- createWrapper: zt,
1460
- createParent: Ft,
1461
- createChildren: Gt,
1462
- createTopic: _t,
1456
+ generateNewObj: Ht,
1457
+ layout: Vt,
1458
+ linkDiv: Ne,
1459
+ editTopic: Ut,
1460
+ createWrapper: Gt,
1461
+ createParent: _t,
1462
+ createChildren: qt,
1463
+ createTopic: jt,
1463
1464
  findEle: Ct,
1464
- changeTheme: Xe,
1465
- ...ve,
1465
+ changeTheme: ze,
1466
+ ...xe,
1466
1467
  ...Nn,
1467
1468
  ...on,
1468
1469
  ...mn,
1469
1470
  ...kn,
1470
1471
  init(t) {
1471
1472
  if (t = JSON.parse(JSON.stringify(t)), !t || !t.nodeData) return new Error("MindElixir: `data` is required");
1472
- t.direction !== void 0 && (this.direction = t.direction), this.changeTheme(t.theme || this.theme, !1), this.nodeData = t.nodeData, nt(this.nodeData), this.arrows = t.arrows || [], this.summaries = t.summaries || [], this.tidyArrow(), this.toolBar && Re(this), this.layout(), this.linkDiv(), this.toCenter();
1473
+ t.direction !== void 0 && (this.direction = t.direction), this.changeTheme(t.theme || this.theme, !1), this.nodeData = t.nodeData, nt(this.nodeData), this.arrows = t.arrows || [], this.summaries = t.summaries || [], this.tidyArrow(), this.toolBar && Ve(this), this.layout(), this.linkDiv(), this.toCenter();
1473
1474
  },
1474
1475
  destroy() {
1475
1476
  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.arrowSvg = 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;
@@ -1483,23 +1484,23 @@ const Mn = function(t = !1, e) {
1483
1484
  }
1484
1485
  };
1485
1486
  function $n({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, containerHeight: a }) {
1486
- let d = e + n / 2;
1487
- const f = t + o / 2;
1487
+ let f = e + n / 2;
1488
+ const d = t + o / 2;
1488
1489
  let p;
1489
1490
  l === I.LHS ? p = i + r : p = i;
1490
- const w = s + c / 2, u = (1 - Math.abs(w - f) / a) * 0.25 * (n / 2);
1491
- return l === I.LHS ? d = d - n / 10 - u : d = d + n / 10 + u, `M ${d} ${f} Q ${d} ${w} ${p} ${w}`;
1491
+ const w = s + c / 2, u = (1 - Math.abs(w - d) / a) * 0.25 * (n / 2);
1492
+ return l === I.LHS ? f = f - n / 10 - u : f = f + n / 10 + u, `M ${f} ${d} Q ${f} ${w} ${p} ${w}`;
1492
1493
  }
1493
1494
  function Hn({ pT: t, pL: e, pW: n, pH: o, cT: s, cL: i, cW: r, cH: c, direction: l, isFirst: a }) {
1494
- const d = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
1495
- let f = 0, p = 0;
1496
- a ? f = t + o / 2 : f = t + o;
1495
+ const f = parseInt(this.container.style.getPropertyValue("--node-gap-x"));
1496
+ let d = 0, p = 0;
1497
+ a ? d = t + o / 2 : d = t + o;
1497
1498
  const w = s + c;
1498
1499
  let y = 0, u = 0, g = 0;
1499
- const b = Math.abs(f - w) / 300 * d;
1500
- return l === I.LHS ? (g = e, y = g + d, u = g - d, p = i + d, `M ${y} ${f} C ${g} ${f} ${g + b} ${w} ${u} ${w} H ${p}`) : (g = e + n, y = g - d, u = g + d, p = i + r - d, `M ${y} ${f} C ${g} ${f} ${g - b} ${w} ${u} ${w} H ${p}`);
1500
+ const b = Math.abs(d - w) / 300 * f;
1501
+ return l === I.LHS ? (g = e, y = g + f, u = g - f, p = i + f, `M ${y} ${d} C ${g} ${d} ${g + b} ${w} ${u} ${w} H ${p}`) : (g = e + n, y = g - f, u = g + f, p = i + r - f, `M ${y} ${d} C ${g} ${d} ${g - b} ${w} ${u} ${w} H ${p}`);
1501
1502
  }
1502
- const In = "5.11.1-beta.3";
1503
+ const In = "5.11.2";
1503
1504
  function On(t) {
1504
1505
  return {
1505
1506
  x: 0,
@@ -1538,8 +1539,8 @@ function A({
1538
1539
  selectionContainer: c,
1539
1540
  before: l,
1540
1541
  newTopicName: a,
1541
- allowUndo: d,
1542
- generateMainBranch: f,
1542
+ allowUndo: f,
1543
+ generateMainBranch: d,
1543
1544
  generateSubBranch: p,
1544
1545
  overflowHidden: w,
1545
1546
  theme: y,
@@ -1556,11 +1557,11 @@ function A({
1556
1557
  let S = null;
1557
1558
  const E = Object.prototype.toString.call(t);
1558
1559
  if (E === "[object HTMLDivElement]" ? S = t : E === "[object String]" && (S = document.querySelector(t)), !S) throw new Error("MindElixir: el is not a valid element");
1559
- S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = l || {}, this.newTopicName = a || "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 = d ?? !0, this.scaleSensitivity = g ?? 0.1, this.scaleMax = b ?? 1.4, this.scaleMin = v ?? 0.2, this.generateMainBranch = f || $n, this.generateSubBranch = p || Hn, this.overflowHidden = w ?? !1, this.alignment = u ?? "root", this.handleWheel = C ?? !0, this.markdown = T || void 0, this.imageProxy = h || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = x ?? !1, this.panHelper = On(this), this.bus = Le(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1560
+ S.style.position = "relative", S.innerHTML = "", this.el = S, this.disposable = [], this.before = l || {}, this.newTopicName = a || "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 = f ?? !0, this.scaleSensitivity = g ?? 0.1, this.scaleMax = b ?? 1.4, this.scaleMin = v ?? 0.2, this.generateMainBranch = d || $n, this.generateSubBranch = p || Hn, this.overflowHidden = w ?? !1, this.alignment = u ?? "root", this.handleWheel = C ?? !0, this.markdown = T || void 0, this.imageProxy = h || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = x ?? !1, this.panHelper = On(this), this.bus = Pe(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
1560
1561
  const P = window.matchMedia("(prefers-color-scheme: dark)");
1561
1562
  this.theme = y || (P.matches ? et : tt);
1562
1563
  const k = document.createElement("div");
1563
- k.className = "map-canvas", this.map = k, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("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 = pt(), this.line2 = pt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = W("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(De(this)), m && (this.pasteHandler = m);
1564
+ k.className = "map-canvas", this.map = k, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = W("lines"), this.summarySvg = W("summary"), this.linkController = W("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 = pt(), this.line2 = pt(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = W("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(Me(this)), m && (this.pasteHandler = m);
1564
1565
  }
1565
1566
  A.prototype = An;
1566
1567
  Object.defineProperty(A.prototype, "currentNode", {