fuxi-topology 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -371,7 +371,7 @@ function Oo(e) {
371
371
  return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
372
372
  }
373
373
  var Po = /^[-+]?[0-9]+e/;
374
- function ko(e, t) {
374
+ function Lo(e, t) {
375
375
  var n;
376
376
  if (isNaN(e))
377
377
  switch (t) {
@@ -404,15 +404,15 @@ function ko(e, t) {
404
404
  return "-0.0";
405
405
  return n = e.toString(10), Po.test(n) ? n.replace("e", ".e") : n;
406
406
  }
407
- function Lo(e) {
407
+ function ko(e) {
408
408
  return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || I.isNegativeZero(e));
409
409
  }
410
410
  var yi = new C("tag:yaml.org,2002:float", {
411
411
  kind: "scalar",
412
412
  resolve: Eo,
413
413
  construct: Oo,
414
- predicate: Lo,
415
- represent: ko,
414
+ predicate: ko,
415
+ represent: Lo,
416
416
  defaultStyle: "lowercase"
417
417
  }), _i = gi.extend({
418
418
  implicit: [
@@ -561,7 +561,7 @@ var Ei = new C("tag:yaml.org,2002:set", {
561
561
  Mi,
562
562
  Ei
563
563
  ]
564
- }), te = Object.prototype.hasOwnProperty, at = 1, Oi = 2, Pi = 3, ct = 4, Ft = 1, Zo = 2, Tn = 3, Qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, es = /[\x85\u2028\u2029]/, ts = /[,\[\]\{\}]/, ki = /^(?:!|!!|![a-z\-]+!)$/i, Li = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
564
+ }), te = Object.prototype.hasOwnProperty, at = 1, Oi = 2, Pi = 3, ct = 4, Ft = 1, Zo = 2, Tn = 3, Qo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, es = /[\x85\u2028\u2029]/, ts = /[,\[\]\{\}]/, Li = /^(?:!|!!|![a-z\-]+!)$/i, ki = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
565
565
  function Mn(e) {
566
566
  return Object.prototype.toString.call(e);
567
567
  }
@@ -571,7 +571,7 @@ function G(e) {
571
571
  function ue(e) {
572
572
  return e === 9 || e === 32;
573
573
  }
574
- function k(e) {
574
+ function L(e) {
575
575
  return e === 9 || e === 32 || e === 10 || e === 13;
576
576
  }
577
577
  function xe(e) {
@@ -635,7 +635,7 @@ var On = {
635
635
  },
636
636
  TAG: function(t, n, i) {
637
637
  var r, o;
638
- i.length !== 2 && y(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], ki.test(r) || y(t, "ill-formed tag handle (first argument) of the TAG directive"), te.call(t.tagMap, r) && y(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Li.test(o) || y(t, "ill-formed tag prefix (second argument) of the TAG directive");
638
+ i.length !== 2 && y(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], Li.test(r) || y(t, "ill-formed tag handle (first argument) of the TAG directive"), te.call(t.tagMap, r) && y(t, 'there is a previously declared suffix for "' + r + '" tag handle'), ki.test(o) || y(t, "ill-formed tag prefix (second argument) of the TAG directive");
639
639
  try {
640
640
  o = decodeURIComponent(o);
641
641
  } catch {
@@ -696,7 +696,7 @@ function A(e, t, n) {
696
696
  }
697
697
  function St(e) {
698
698
  var t = e.position, n;
699
- return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || k(n)));
699
+ return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || L(n)));
700
700
  }
701
701
  function pn(e, t) {
702
702
  t === 1 ? e.result += " " : t > 1 && (e.result += I.repeat(`
@@ -704,14 +704,14 @@ function pn(e, t) {
704
704
  }
705
705
  function as(e, t, n) {
706
706
  var i, r, o, s, a, c, l, h, u = e.kind, f = e.result, d;
707
- if (d = e.input.charCodeAt(e.position), k(d) || xe(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (r = e.input.charCodeAt(e.position + 1), k(r) || n && xe(r)))
707
+ if (d = e.input.charCodeAt(e.position), L(d) || xe(d) || d === 35 || d === 38 || d === 42 || d === 33 || d === 124 || d === 62 || d === 39 || d === 34 || d === 37 || d === 64 || d === 96 || (d === 63 || d === 45) && (r = e.input.charCodeAt(e.position + 1), L(r) || n && xe(r)))
708
708
  return !1;
709
709
  for (e.kind = "scalar", e.result = "", o = s = e.position, a = !1; d !== 0; ) {
710
710
  if (d === 58) {
711
- if (r = e.input.charCodeAt(e.position + 1), k(r) || n && xe(r))
711
+ if (r = e.input.charCodeAt(e.position + 1), L(r) || n && xe(r))
712
712
  break;
713
713
  } else if (d === 35) {
714
- if (i = e.input.charCodeAt(e.position - 1), k(i))
714
+ if (i = e.input.charCodeAt(e.position - 1), L(i))
715
715
  break;
716
716
  } else {
717
717
  if (e.position === e.lineStart && St(e) || n && xe(d))
@@ -776,7 +776,7 @@ function hs(e, t) {
776
776
  for (e.anchor !== null && (e.anchorMap[e.anchor] = a), m = e.input.charCodeAt(++e.position); m !== 0; ) {
777
777
  if (A(e, !0, t), m = e.input.charCodeAt(e.position), m === h)
778
778
  return e.position++, e.tag = s, e.anchor = c, e.kind = d ? "mapping" : "sequence", e.result = a, !0;
779
- n ? m === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g = _ = null, u = f = !1, m === 63 && (l = e.input.charCodeAt(e.position + 1), k(l) && (u = f = !0, e.position++, A(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ae(e, t, at, !1, !0), v = e.tag, g = e.result, A(e, !0, t), m = e.input.charCodeAt(e.position), (f || e.line === i) && m === 58 && (u = !0, m = e.input.charCodeAt(++e.position), A(e, !0, t), Ae(e, t, at, !1, !0), _ = e.result), d ? ve(e, a, p, v, g, _, i, r, o) : u ? a.push(ve(e, null, p, v, g, _, i, r, o)) : a.push(g), A(e, !0, t), m = e.input.charCodeAt(e.position), m === 44 ? (n = !0, m = e.input.charCodeAt(++e.position)) : n = !1;
779
+ n ? m === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g = _ = null, u = f = !1, m === 63 && (l = e.input.charCodeAt(e.position + 1), L(l) && (u = f = !0, e.position++, A(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ae(e, t, at, !1, !0), v = e.tag, g = e.result, A(e, !0, t), m = e.input.charCodeAt(e.position), (f || e.line === i) && m === 58 && (u = !0, m = e.input.charCodeAt(++e.position), A(e, !0, t), Ae(e, t, at, !1, !0), _ = e.result), d ? ve(e, a, p, v, g, _, i, r, o) : u ? a.push(ve(e, null, p, v, g, _, i, r, o)) : a.push(g), A(e, !0, t), m = e.input.charCodeAt(e.position), m === 44 ? (n = !0, m = e.input.charCodeAt(++e.position)) : n = !1;
780
780
  }
781
781
  y(e, "unexpected end of the stream within a flow collection");
782
782
  }
@@ -827,10 +827,10 @@ function us(e, t) {
827
827
  }
828
828
  return !0;
829
829
  }
830
- function kn(e, t) {
830
+ function Ln(e, t) {
831
831
  var n, i = e.tag, r = e.anchor, o = [], s, a = !1, c;
832
832
  if (e.firstTabInLine !== -1) return !1;
833
- for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(c !== 45 || (s = e.input.charCodeAt(e.position + 1), !k(s)))); ) {
833
+ for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), !(c !== 45 || (s = e.input.charCodeAt(e.position + 1), !L(s)))); ) {
834
834
  if (a = !0, e.position++, A(e, !0, -1) && e.lineIndent <= t) {
835
835
  o.push(null), c = e.input.charCodeAt(e.position);
836
836
  continue;
@@ -846,7 +846,7 @@ function fs(e, t, n) {
846
846
  var i, r, o, s, a, c, l = e.tag, h = e.anchor, u = {}, f = /* @__PURE__ */ Object.create(null), d = null, p = null, g = null, v = !1, _ = !1, m;
847
847
  if (e.firstTabInLine !== -1) return !1;
848
848
  for (e.anchor !== null && (e.anchorMap[e.anchor] = u), m = e.input.charCodeAt(e.position); m !== 0; ) {
849
- if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (m === 63 || m === 58) && k(i))
849
+ if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (m === 63 || m === 58) && L(i))
850
850
  m === 63 ? (v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : y(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, m = i;
851
851
  else {
852
852
  if (s = e.line, a = e.lineStart, c = e.position, !Ae(e, n, Oi, !1, !0))
@@ -855,7 +855,7 @@ function fs(e, t, n) {
855
855
  for (m = e.input.charCodeAt(e.position); ue(m); )
856
856
  m = e.input.charCodeAt(++e.position);
857
857
  if (m === 58)
858
- m = e.input.charCodeAt(++e.position), k(m) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !1, r = !1, d = e.tag, p = e.result;
858
+ m = e.input.charCodeAt(++e.position), L(m) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !1, r = !1, d = e.tag, p = e.result;
859
859
  else if (_)
860
860
  y(e, "can not read an implicit mapping pair; a colon is missed");
861
861
  else
@@ -881,11 +881,11 @@ function ds(e) {
881
881
  while (s !== 0 && s !== 62);
882
882
  e.position < e.length ? (o = e.input.slice(t, e.position), s = e.input.charCodeAt(++e.position)) : y(e, "unexpected end of the stream within a verbatim tag");
883
883
  } else {
884
- for (; s !== 0 && !k(s); )
885
- s === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), ki.test(r) || y(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), s = e.input.charCodeAt(++e.position);
884
+ for (; s !== 0 && !L(s); )
885
+ s === 33 && (i ? y(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), Li.test(r) || y(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), s = e.input.charCodeAt(++e.position);
886
886
  o = e.input.slice(t, e.position), ts.test(o) && y(e, "tag suffix cannot contain flow indicator characters");
887
887
  }
888
- o && !Li.test(o) && y(e, "tag name cannot contain such characters: " + o);
888
+ o && !ki.test(o) && y(e, "tag name cannot contain such characters: " + o);
889
889
  try {
890
890
  o = decodeURIComponent(o);
891
891
  } catch {
@@ -896,14 +896,14 @@ function ds(e) {
896
896
  function ps(e) {
897
897
  var t, n;
898
898
  if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
899
- for (e.anchor !== null && y(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !k(n) && !xe(n); )
899
+ for (e.anchor !== null && y(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !L(n) && !xe(n); )
900
900
  n = e.input.charCodeAt(++e.position);
901
901
  return e.position === t && y(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
902
902
  }
903
903
  function gs(e) {
904
904
  var t, n, i;
905
905
  if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
906
- for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !k(i) && !xe(i); )
906
+ for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !L(i) && !xe(i); )
907
907
  i = e.input.charCodeAt(++e.position);
908
908
  return e.position === t && y(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), te.call(e.anchorMap, n) || y(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], A(e, !0, -1), !0;
909
909
  }
@@ -912,7 +912,7 @@ function Ae(e, t, n, i, r) {
912
912
  if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = s = a = ct === n || Pi === n, i && A(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
913
913
  for (; ds(e) || ps(e); )
914
914
  A(e, !0, -1) ? (l = !0, a = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : a = !1;
915
- if (a && (a = l || r), (c === 1 || ct === n) && (at === n || Oi === n ? g = t : g = t + 1, v = e.position - e.lineStart, c === 1 ? a && (kn(e, v) || fs(e, v, g)) || hs(e, g) ? h = !0 : (s && us(e, g) || cs(e, g) || ls(e, g) ? h = !0 : gs(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : as(e, g, at === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && kn(e, v))), e.tag === null)
915
+ if (a && (a = l || r), (c === 1 || ct === n) && (at === n || Oi === n ? g = t : g = t + 1, v = e.position - e.lineStart, c === 1 ? a && (Ln(e, v) || fs(e, v, g)) || hs(e, g) ? h = !0 : (s && us(e, g) || cs(e, g) || ls(e, g) ? h = !0 : gs(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : as(e, g, at === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && Ln(e, v))), e.tag === null)
916
916
  e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
917
917
  else if (e.tag === "?") {
918
918
  for (e.result !== null && e.kind !== "scalar" && y(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, f = e.implicitTypes.length; u < f; u += 1)
@@ -936,7 +936,7 @@ function Ae(e, t, n, i, r) {
936
936
  function ms(e) {
937
937
  var t = e.position, n, i, r, o = !1, s;
938
938
  for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (s = e.input.charCodeAt(e.position)) !== 0 && (A(e, !0, -1), s = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || s !== 37)); ) {
939
- for (o = !0, s = e.input.charCodeAt(++e.position), n = e.position; s !== 0 && !k(s); )
939
+ for (o = !0, s = e.input.charCodeAt(++e.position), n = e.position; s !== 0 && !L(s); )
940
940
  s = e.input.charCodeAt(++e.position);
941
941
  for (i = e.input.slice(n, e.position), r = [], i.length < 1 && y(e, "directive name must not be less than one character in length"); s !== 0; ) {
942
942
  for (; ue(s); )
@@ -948,7 +948,7 @@ function ms(e) {
948
948
  break;
949
949
  }
950
950
  if (G(s)) break;
951
- for (n = e.position; s !== 0 && !k(s); )
951
+ for (n = e.position; s !== 0 && !L(s); )
952
952
  s = e.input.charCodeAt(++e.position);
953
953
  r.push(e.input.slice(n, e.position));
954
954
  }
@@ -992,7 +992,7 @@ function vs(e, t) {
992
992
  var ys = xs, _s = vs, zi = {
993
993
  loadAll: ys,
994
994
  load: _s
995
- }, Ui = Object.prototype.toString, Hi = Object.prototype.hasOwnProperty, gn = 65279, ws = 9, De = 10, Ss = 13, As = 32, bs = 33, Is = 34, Xt = 35, Cs = 37, Ts = 38, Ms = 39, Es = 42, Yi = 44, Os = 45, ht = 58, Ps = 61, ks = 62, Ls = 63, Ns = 64, Bi = 91, Gi = 93, Rs = 96, Wi = 123, Ds = 124, Xi = 125, E = {};
995
+ }, Ui = Object.prototype.toString, Hi = Object.prototype.hasOwnProperty, gn = 65279, ws = 9, De = 10, Ss = 13, As = 32, bs = 33, Is = 34, Xt = 35, Cs = 37, Ts = 38, Ms = 39, Es = 42, Yi = 44, Os = 45, ht = 58, Ps = 61, Ls = 62, ks = 63, Ns = 64, Bi = 91, Gi = 93, Rs = 96, Wi = 123, Ds = 124, Xi = 125, E = {};
996
996
  E[0] = "\\0";
997
997
  E[7] = "\\a";
998
998
  E[8] = "\\b";
@@ -1049,7 +1049,7 @@ var Hs = 1, $e = 2;
1049
1049
  function Ys(e) {
1050
1050
  this.schema = e.schema || fn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = I.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = zs(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? $e : Hs, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
1051
1051
  }
1052
- function Ln(e, t) {
1052
+ function kn(e, t) {
1053
1053
  for (var n = I.repeat(" ", t), i = 0, r = -1, o = "", s, a = e.length; i < a; )
1054
1054
  r = e.indexOf(`
1055
1055
  `, i), r === -1 ? (s = e.slice(i), i = a) : (s = e.slice(i, r + 1), i = r + 1), s.length && s !== `
@@ -1087,7 +1087,7 @@ function Rn(e, t, n) {
1087
1087
  );
1088
1088
  }
1089
1089
  function Gs(e) {
1090
- return Fe(e) && e !== gn && !ut(e) && e !== Os && e !== Ls && e !== ht && e !== Yi && e !== Bi && e !== Gi && e !== Wi && e !== Xi && e !== Xt && e !== Ts && e !== Es && e !== bs && e !== Ds && e !== Ps && e !== ks && e !== Ms && e !== Is && e !== Cs && e !== Ns && e !== Rs;
1090
+ return Fe(e) && e !== gn && !ut(e) && e !== Os && e !== ks && e !== ht && e !== Yi && e !== Bi && e !== Gi && e !== Wi && e !== Xi && e !== Xt && e !== Ts && e !== Es && e !== bs && e !== Ds && e !== Ps && e !== Ls && e !== Ms && e !== Is && e !== Cs && e !== Ns && e !== Rs;
1091
1091
  }
1092
1092
  function Ws(e) {
1093
1093
  return !ut(e) && e !== ht;
@@ -1147,9 +1147,9 @@ function js(e, t, n, i, r) {
1147
1147
  case qt:
1148
1148
  return "'" + t.replace(/'/g, "''") + "'";
1149
1149
  case Ki:
1150
- return "|" + Dn(t, e.indent) + $n(Ln(t, o));
1150
+ return "|" + Dn(t, e.indent) + $n(kn(t, o));
1151
1151
  case Vi:
1152
- return ">" + Dn(t, e.indent) + $n(Ln(qs(t, s), o));
1152
+ return ">" + Dn(t, e.indent) + $n(kn(qs(t, s), o));
1153
1153
  case me:
1154
1154
  return '"' + Ks(t) + '"';
1155
1155
  default:
@@ -1792,7 +1792,7 @@ class ba extends At {
1792
1792
  this.scene.lines?.removeLinesForNode(t);
1793
1793
  }
1794
1794
  }
1795
- const Le = 64, Hn = 200, en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
1795
+ const ke = 64, Hn = 200, en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
1796
1796
  function dr() {
1797
1797
  if ($.size <= Hn) return;
1798
1798
  const e = [...$.keys()].slice(0, $.size - Hn);
@@ -1806,14 +1806,14 @@ function Ia(e, t, n) {
1806
1806
  const i = xn(e, t, n), r = en.get(i);
1807
1807
  if (r) return r;
1808
1808
  const o = document.createElement("canvas");
1809
- o.width = n, o.height = Le;
1809
+ o.width = n, o.height = ke;
1810
1810
  const s = o.getContext("2d"), a = e >> 16 & 255, c = e >> 8 & 255, l = e & 255;
1811
1811
  if (t) {
1812
1812
  const h = s.createLinearGradient(0, 0, n, 0);
1813
1813
  h.addColorStop(0, `rgba(${a},${c},${l},0)`), h.addColorStop(0.2, `rgba(${a},${c},${l},0.8)`), h.addColorStop(0.25, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},0)`), s.fillStyle = h;
1814
1814
  } else
1815
1815
  s.fillStyle = `rgb(${a},${c},${l})`;
1816
- return s.fillRect(0, 0, n, Le), en.set(i, o), o;
1816
+ return s.fillRect(0, 0, n, ke), en.set(i, o), o;
1817
1817
  }
1818
1818
  function Ca(e, t, n) {
1819
1819
  const i = xn(e, t, n), r = tn.get(i);
@@ -1825,12 +1825,12 @@ function Ta(e) {
1825
1825
  const { color: t, width: n, dashPattern: i = [10, 5] } = e, r = i.reduce((v, _) => v + _, 0), o = Math.max(Math.round(n), 2), s = `dash_c${t}_d${i.join(",")}_w${o}`, a = $.get(s);
1826
1826
  if (a) return a;
1827
1827
  const c = t >> 16 & 255, l = t >> 8 & 255, h = t & 255, u = document.createElement("canvas");
1828
- u.width = r, u.height = Le;
1828
+ u.width = r, u.height = ke;
1829
1829
  const f = u.getContext("2d");
1830
- f.clearRect(0, 0, r, Le), f.fillStyle = `rgb(${c},${l},${h})`;
1830
+ f.clearRect(0, 0, r, ke), f.fillStyle = `rgb(${c},${l},${h})`;
1831
1831
  let d = 0;
1832
1832
  for (let v = 0; v < i.length; v++)
1833
- v % 2 === 0 && f.fillRect(d, 0, i[v], Le), d += i[v];
1833
+ v % 2 === 0 && f.fillRect(d, 0, i[v], ke), d += i[v];
1834
1834
  const p = Se.from({ resource: u, antialias: !1 });
1835
1835
  p.source.addressMode = "repeat";
1836
1836
  const g = new Se({
@@ -2091,7 +2091,7 @@ class Pa extends At {
2091
2091
  for (const t of this.items.values()) t.draw();
2092
2092
  }
2093
2093
  }
2094
- class ka extends We {
2094
+ class La extends We {
2095
2095
  container;
2096
2096
  tilingSprite = null;
2097
2097
  constructor(t = {}) {
@@ -2152,7 +2152,7 @@ class ka extends We {
2152
2152
  this.tilingSprite && this.tilingSprite.destroy(), this.container.destroy();
2153
2153
  }
2154
2154
  }
2155
- class La extends We {
2155
+ class ka extends We {
2156
2156
  container;
2157
2157
  textSprite;
2158
2158
  textStyle;
@@ -2242,7 +2242,7 @@ class Na extends At {
2242
2242
  super(t, "text");
2243
2243
  }
2244
2244
  createItem(t) {
2245
- return new La(t);
2245
+ return new ka(t);
2246
2246
  }
2247
2247
  }
2248
2248
  class Ra extends We {
@@ -2510,7 +2510,7 @@ class _e extends Ce {
2510
2510
  _isActive = !1;
2511
2511
  _cameraHandler;
2512
2512
  constructor(t, n, i, r) {
2513
- super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Pa(this), this.nodes = new ba(this), this.texts = new Na(this), this.rects = new Da(this), this.grid = new ka();
2513
+ super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Pa(this), this.nodes = new ba(this), this.texts = new Na(this), this.rects = new Da(this), this.grid = new La();
2514
2514
  const { skewX: o, skewY: s } = er();
2515
2515
  this.projectionContainer.sortableChildren = !0, this.projectionContainer.skew.set(o, s), this.projectionContainer.scale.set(_e.DEFAULT_ZOOM), this.projectionContainer.position.set(n.screen.width / 2, n.screen.height / 2), this.projectionContainer.addChild(
2516
2516
  this.grid.getGraphics(),
@@ -2927,7 +2927,7 @@ function Pu(e, t, n) {
2927
2927
  };
2928
2928
  }
2929
2929
  const Ke = /* @__PURE__ */ new WeakMap();
2930
- function ku(e, t, n) {
2930
+ function Lu(e, t, n) {
2931
2931
  const i = n?.frequency ?? 2, r = n?.height ?? 12;
2932
2932
  return {
2933
2933
  stateId: e,
@@ -2961,7 +2961,7 @@ function Mt(e) {
2961
2961
  n <= 0 ? (Ne.delete(t), t.filterArea = void 0) : Ne.set(t, n);
2962
2962
  }
2963
2963
  const Ut = /* @__PURE__ */ new WeakMap();
2964
- function Lu(e, t, n) {
2964
+ function ku(e, t, n) {
2965
2965
  const i = n?.brightness ?? 1.5;
2966
2966
  return {
2967
2967
  stateId: e,
@@ -3716,8 +3716,15 @@ class yn extends Xe {
3716
3716
  for (const a of n.getAll()) this.detachBehavior(this.getItemId(a));
3717
3717
  };
3718
3718
  }
3719
- onItemPointerDown({ itemType: t }) {
3720
- t !== this.targetType && this.clearSelection();
3719
+ onItemPointerDown({ itemType: t, itemId: n }) {
3720
+ if (t !== this.targetType) {
3721
+ t !== null ? this.clearSelectionSilent() : this.clearSelection();
3722
+ return;
3723
+ }
3724
+ if (n) {
3725
+ const i = this.dragStates.get(n);
3726
+ i && this.selectItem(i.item);
3727
+ }
3721
3728
  }
3722
3729
  onSceneSwitched() {
3723
3730
  this.clearSelection();
@@ -3738,7 +3745,7 @@ class yn extends Xe {
3738
3745
  }, a = (h) => {
3739
3746
  s.isDragging = !0;
3740
3747
  const u = n.toLocal(h.global);
3741
- s.startPointer = { x: u.x, y: u.y }, s.startTile = { ...this.getItemPosition(t) }, this.selectItem(t);
3748
+ s.startPointer = { x: u.x, y: u.y }, s.startTile = { ...this.getItemPosition(t) };
3742
3749
  }, c = (h) => {
3743
3750
  if (!s.isDragging) return;
3744
3751
  const u = n.toLocal(h.global), f = u.x - s.startPointer.x, d = u.y - s.startPointer.y, p = s.startTile.x + this.snapDelta(f), g = s.startTile.y + this.snapDelta(d);
@@ -3759,19 +3766,22 @@ class yn extends Xe {
3759
3766
  onDragEnd(t, n) {
3760
3767
  }
3761
3768
  selectItem(t) {
3762
- this.selected !== t && (this.clearSelection(), this.selected = t, t.select(), this.highlight.draw(t.getGraphics(), this.highlightOptions), this.topology?.emit("selection:changed", {
3769
+ this.selected !== t && (this.clearSelectionSilent(), this.selected = t, t.select(), this.highlight.draw(t.getGraphics(), this.highlightOptions), this.topology?.emit("selection:changed", {
3763
3770
  pluginName: this.name,
3764
3771
  itemType: this.targetType,
3765
3772
  itemId: this.getItemId(t)
3766
3773
  }));
3767
3774
  }
3768
3775
  clearSelection() {
3769
- this.selected && (this.selected.deselect(), this.selected = null, this.highlight.destroy(), this.topology?.emit("selection:changed", {
3776
+ this.selected && (this.clearSelectionSilent(), this.topology?.emit("selection:changed", {
3770
3777
  pluginName: this.name,
3771
3778
  itemType: this.targetType,
3772
3779
  itemId: null
3773
3780
  }));
3774
3781
  }
3782
+ clearSelectionSilent() {
3783
+ this.selected && (this.selected.deselect(), this.selected = null, this.highlight.destroy());
3784
+ }
3775
3785
  getSelectedId() {
3776
3786
  return this.selected ? this.getItemId(this.selected) : null;
3777
3787
  }
@@ -3959,7 +3969,7 @@ function Pc(e, t, n) {
3959
3969
  var i = this.enter(), r = this, o = this.exit();
3960
3970
  return typeof e == "function" ? (i = e(i), i && (i = i.selection())) : i = i.append(e + ""), t != null && (r = t(r), r && (r = r.selection())), n == null ? o.remove() : n(o), i && r ? i.merge(r).order() : r;
3961
3971
  }
3962
- function kc(e) {
3972
+ function Lc(e) {
3963
3973
  for (var t = e.selection ? e.selection() : e, n = this._groups, i = t._groups, r = n.length, o = i.length, s = Math.min(r, o), a = new Array(r), c = 0; c < s; ++c)
3964
3974
  for (var l = n[c], h = i[c], u = l.length, f = a[c] = new Array(u), d, p = 0; p < u; ++p)
3965
3975
  (d = l[p] || h[p]) && (f[p] = d);
@@ -3967,7 +3977,7 @@ function kc(e) {
3967
3977
  a[c] = n[c];
3968
3978
  return new N(a, this._parents);
3969
3979
  }
3970
- function Lc() {
3980
+ function kc() {
3971
3981
  for (var e = this._groups, t = -1, n = e.length; ++t < n; )
3972
3982
  for (var i = e[t], r = i.length - 1, o = i[r], s; --r >= 0; )
3973
3983
  (s = i[r]) && (o && s.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(s, o), o = s);
@@ -4268,7 +4278,7 @@ function Pl(e, t, n) {
4268
4278
  this.addEventListener(e.type, o, n), r = { type: e.type, name: e.name, value: t, listener: o, options: n }, i ? i.push(r) : this.__on = [r];
4269
4279
  };
4270
4280
  }
4271
- function kl(e, t, n) {
4281
+ function Ll(e, t, n) {
4272
4282
  var i = El(e + ""), r, o = i.length, s;
4273
4283
  if (arguments.length < 2) {
4274
4284
  var a = this.node().__on;
@@ -4287,7 +4297,7 @@ function Ir(e, t, n) {
4287
4297
  var i = _r(e), r = i.CustomEvent;
4288
4298
  typeof r == "function" ? r = new r(t, n) : (r = i.document.createEvent("Event"), n ? (r.initEvent(t, n.bubbles, n.cancelable), r.detail = n.detail) : r.initEvent(t, !1, !1)), e.dispatchEvent(r);
4289
4299
  }
4290
- function Ll(e, t) {
4300
+ function kl(e, t) {
4291
4301
  return function() {
4292
4302
  return Ir(this, e, t);
4293
4303
  };
@@ -4298,7 +4308,7 @@ function Nl(e, t) {
4298
4308
  };
4299
4309
  }
4300
4310
  function Rl(e, t) {
4301
- return this.each((typeof t == "function" ? Nl : Ll)(e, t));
4311
+ return this.each((typeof t == "function" ? Nl : kl)(e, t));
4302
4312
  }
4303
4313
  function* Dl() {
4304
4314
  for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
@@ -4326,9 +4336,9 @@ N.prototype = je.prototype = {
4326
4336
  enter: Ac,
4327
4337
  exit: Oc,
4328
4338
  join: Pc,
4329
- merge: kc,
4339
+ merge: Lc,
4330
4340
  selection: $l,
4331
- order: Lc,
4341
+ order: kc,
4332
4342
  sort: Nc,
4333
4343
  call: Dc,
4334
4344
  nodes: $c,
@@ -4349,7 +4359,7 @@ N.prototype = je.prototype = {
4349
4359
  remove: Al,
4350
4360
  clone: Cl,
4351
4361
  datum: Tl,
4352
- on: kl,
4362
+ on: Ll,
4353
4363
  dispatch: Rl,
4354
4364
  [Symbol.iterator]: Dl
4355
4365
  };
@@ -4417,7 +4427,7 @@ function Bn(e, t, n) {
4417
4427
  }
4418
4428
  return n != null && e.push({ name: t, value: n }), e;
4419
4429
  }
4420
- var Ie = 0, Pe = 0, Ee = 0, Mr = 1e3, xt, ke, vt = 0, pe = 0, Pt = 0, Ue = typeof performance == "object" && performance.now ? performance : Date, Er = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
4430
+ var Ie = 0, Pe = 0, Ee = 0, Mr = 1e3, xt, Le, vt = 0, pe = 0, Pt = 0, Ue = typeof performance == "object" && performance.now ? performance : Date, Er = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
4421
4431
  setTimeout(e, 17);
4422
4432
  };
4423
4433
  function Sn() {
@@ -4433,7 +4443,7 @@ yt.prototype = Or.prototype = {
4433
4443
  constructor: yt,
4434
4444
  restart: function(e, t, n) {
4435
4445
  if (typeof e != "function") throw new TypeError("callback is not a function");
4436
- n = (n == null ? Sn() : +n) + (t == null ? 0 : +t), !this._next && ke !== this && (ke ? ke._next = this : xt = this, ke = this), this._call = e, this._time = n, rn();
4446
+ n = (n == null ? Sn() : +n) + (t == null ? 0 : +t), !this._next && Le !== this && (Le ? Le._next = this : xt = this, Le = this), this._call = e, this._time = n, rn();
4437
4447
  },
4438
4448
  stop: function() {
4439
4449
  this._call && (this._call = null, this._time = 1 / 0, rn());
@@ -4464,7 +4474,7 @@ function Gl() {
4464
4474
  function Wl() {
4465
4475
  for (var e, t = xt, n, i = 1 / 0; t; )
4466
4476
  t._call ? (i > t._time && (i = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : xt = n);
4467
- ke = e, rn(i);
4477
+ Le = e, rn(i);
4468
4478
  }
4469
4479
  function rn(e) {
4470
4480
  if (!Ie) {
@@ -4480,7 +4490,7 @@ function Wn(e, t, n) {
4480
4490
  }, t, n), i;
4481
4491
  }
4482
4492
  var Xl = Tr("start", "end", "cancel", "interrupt"), jl = [], Pr = 0, Xn = 1, on = 2, ot = 3, jn = 4, sn = 5, st = 6;
4483
- function kt(e, t, n, i, r, o) {
4493
+ function Lt(e, t, n, i, r, o) {
4484
4494
  var s = e.__transition;
4485
4495
  if (!s) e.__transition = {};
4486
4496
  else if (n in s) return;
@@ -4570,7 +4580,7 @@ function Vl(e) {
4570
4580
  function bn(e, t, n) {
4571
4581
  e.prototype = t.prototype = n, n.constructor = e;
4572
4582
  }
4573
- function kr(e, t) {
4583
+ function Lr(e, t) {
4574
4584
  var n = Object.create(e.prototype);
4575
4585
  for (var i in t) n[i] = t[i];
4576
4586
  return n;
@@ -4749,42 +4759,42 @@ function rh() {
4749
4759
  return this.rgb().formatHex8();
4750
4760
  }
4751
4761
  function oh() {
4752
- return Lr(this).formatHsl();
4762
+ return kr(this).formatHsl();
4753
4763
  }
4754
4764
  function Vn() {
4755
4765
  return this.rgb().formatRgb();
4756
4766
  }
4757
4767
  function Be(e) {
4758
4768
  var t, n;
4759
- return e = (e + "").trim().toLowerCase(), (t = Jl.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Jn(t) : n === 3 ? new L(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Qe(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Qe(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zl.exec(e)) ? new L(t[1], t[2], t[3], 1) : (t = Ql.exec(e)) ? new L(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = eh.exec(e)) ? Qe(t[1], t[2], t[3], t[4]) : (t = th.exec(e)) ? Qe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = nh.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, 1) : (t = ih.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, t[4]) : qn.hasOwnProperty(e) ? Jn(qn[e]) : e === "transparent" ? new L(NaN, NaN, NaN, 0) : null;
4769
+ return e = (e + "").trim().toLowerCase(), (t = Jl.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Jn(t) : n === 3 ? new k(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Qe(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Qe(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zl.exec(e)) ? new k(t[1], t[2], t[3], 1) : (t = Ql.exec(e)) ? new k(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = eh.exec(e)) ? Qe(t[1], t[2], t[3], t[4]) : (t = th.exec(e)) ? Qe(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = nh.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, 1) : (t = ih.exec(e)) ? ei(t[1], t[2] / 100, t[3] / 100, t[4]) : qn.hasOwnProperty(e) ? Jn(qn[e]) : e === "transparent" ? new k(NaN, NaN, NaN, 0) : null;
4760
4770
  }
4761
4771
  function Jn(e) {
4762
- return new L(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
4772
+ return new k(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
4763
4773
  }
4764
4774
  function Qe(e, t, n, i) {
4765
- return i <= 0 && (e = t = n = NaN), new L(e, t, n, i);
4775
+ return i <= 0 && (e = t = n = NaN), new k(e, t, n, i);
4766
4776
  }
4767
4777
  function sh(e) {
4768
- return e instanceof qe || (e = Be(e)), e ? (e = e.rgb(), new L(e.r, e.g, e.b, e.opacity)) : new L();
4778
+ return e instanceof qe || (e = Be(e)), e ? (e = e.rgb(), new k(e.r, e.g, e.b, e.opacity)) : new k();
4769
4779
  }
4770
4780
  function an(e, t, n, i) {
4771
- return arguments.length === 1 ? sh(e) : new L(e, t, n, i ?? 1);
4781
+ return arguments.length === 1 ? sh(e) : new k(e, t, n, i ?? 1);
4772
4782
  }
4773
- function L(e, t, n, i) {
4783
+ function k(e, t, n, i) {
4774
4784
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +i;
4775
4785
  }
4776
- bn(L, an, kr(qe, {
4786
+ bn(k, an, Lr(qe, {
4777
4787
  brighter(e) {
4778
- return e = e == null ? _t : Math.pow(_t, e), new L(this.r * e, this.g * e, this.b * e, this.opacity);
4788
+ return e = e == null ? _t : Math.pow(_t, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
4779
4789
  },
4780
4790
  darker(e) {
4781
- return e = e == null ? He : Math.pow(He, e), new L(this.r * e, this.g * e, this.b * e, this.opacity);
4791
+ return e = e == null ? He : Math.pow(He, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
4782
4792
  },
4783
4793
  rgb() {
4784
4794
  return this;
4785
4795
  },
4786
4796
  clamp() {
4787
- return new L(fe(this.r), fe(this.g), fe(this.b), wt(this.opacity));
4797
+ return new k(fe(this.r), fe(this.g), fe(this.b), wt(this.opacity));
4788
4798
  },
4789
4799
  displayable() {
4790
4800
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
@@ -4818,7 +4828,7 @@ function he(e) {
4818
4828
  function ei(e, t, n, i) {
4819
4829
  return i <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new F(e, t, n, i);
4820
4830
  }
4821
- function Lr(e) {
4831
+ function kr(e) {
4822
4832
  if (e instanceof F) return new F(e.h, e.s, e.l, e.opacity);
4823
4833
  if (e instanceof qe || (e = Be(e)), !e) return new F();
4824
4834
  if (e instanceof F) return e;
@@ -4827,12 +4837,12 @@ function Lr(e) {
4827
4837
  return a ? (t === o ? s = (n - i) / a + (n < i) * 6 : n === o ? s = (i - t) / a + 2 : s = (t - n) / a + 4, a /= c < 0.5 ? o + r : 2 - o - r, s *= 60) : a = c > 0 && c < 1 ? 0 : s, new F(s, a, c, e.opacity);
4828
4838
  }
4829
4839
  function ch(e, t, n, i) {
4830
- return arguments.length === 1 ? Lr(e) : new F(e, t, n, i ?? 1);
4840
+ return arguments.length === 1 ? kr(e) : new F(e, t, n, i ?? 1);
4831
4841
  }
4832
4842
  function F(e, t, n, i) {
4833
4843
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +i;
4834
4844
  }
4835
- bn(F, ch, kr(qe, {
4845
+ bn(F, ch, Lr(qe, {
4836
4846
  brighter(e) {
4837
4847
  return e = e == null ? _t : Math.pow(_t, e), new F(this.h, this.s, this.l * e, this.opacity);
4838
4848
  },
@@ -4841,7 +4851,7 @@ bn(F, ch, kr(qe, {
4841
4851
  },
4842
4852
  rgb() {
4843
4853
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, i = n + (n < 0.5 ? n : 1 - n) * t, r = 2 * n - i;
4844
- return new L(
4854
+ return new k(
4845
4855
  Bt(e >= 240 ? e - 240 : e + 120, r, i),
4846
4856
  Bt(e, r, i),
4847
4857
  Bt(e < 120 ? e + 240 : e - 120, r, i),
@@ -5096,7 +5106,7 @@ function Ph(e, t) {
5096
5106
  }
5097
5107
  return r._value = t, r;
5098
5108
  }
5099
- function kh(e, t) {
5109
+ function Lh(e, t) {
5100
5110
  var n, i;
5101
5111
  function r() {
5102
5112
  var o = t.apply(this, arguments);
@@ -5104,13 +5114,13 @@ function kh(e, t) {
5104
5114
  }
5105
5115
  return r._value = t, r;
5106
5116
  }
5107
- function Lh(e, t) {
5117
+ function kh(e, t) {
5108
5118
  var n = "attr." + e;
5109
5119
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
5110
5120
  if (t == null) return this.tween(n, null);
5111
5121
  if (typeof t != "function") throw new Error();
5112
5122
  var i = Ot(e);
5113
- return this.tween(n, (i.local ? Ph : kh)(i, t));
5123
+ return this.tween(n, (i.local ? Ph : Lh)(i, t));
5114
5124
  }
5115
5125
  function Nh(e, t) {
5116
5126
  return function() {
@@ -5209,7 +5219,7 @@ function Jh(e) {
5209
5219
  typeof e != "function" && (e = _n(e));
5210
5220
  for (var i = this._groups, r = i.length, o = new Array(r), s = 0; s < r; ++s)
5211
5221
  for (var a = i[s], c = a.length, l = o[s] = new Array(c), h, u, f = 0; f < c; ++f)
5212
- (h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u, kt(l[f], t, n, f, l, z(h, n)));
5222
+ (h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u, Lt(l[f], t, n, f, l, z(h, n)));
5213
5223
  return new J(o, this._parents, t, n);
5214
5224
  }
5215
5225
  function Zh(e) {
@@ -5219,7 +5229,7 @@ function Zh(e) {
5219
5229
  for (var c = i[a], l = c.length, h, u = 0; u < l; ++u)
5220
5230
  if (h = c[u]) {
5221
5231
  for (var f = e.call(h, h.__data__, u, c), d, p = z(h, n), g = 0, v = f.length; g < v; ++g)
5222
- (d = f[g]) && kt(d, t, n, g, f, p);
5232
+ (d = f[g]) && Lt(d, t, n, g, f, p);
5223
5233
  o.push(f), s.push(h);
5224
5234
  }
5225
5235
  return new J(o, s, t, n);
@@ -5324,7 +5334,7 @@ function gu() {
5324
5334
  for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
5325
5335
  if (c = s[l]) {
5326
5336
  var h = z(c, t);
5327
- kt(c, e, n, l, s, {
5337
+ Lt(c, e, n, l, s, {
5328
5338
  time: h.time + h.delay + h.duration,
5329
5339
  delay: 0,
5330
5340
  duration: h.duration,
@@ -5371,7 +5381,7 @@ J.prototype = {
5371
5381
  each: K.each,
5372
5382
  on: qh,
5373
5383
  attr: Mh,
5374
- attrTween: Lh,
5384
+ attrTween: kh,
5375
5385
  style: ou,
5376
5386
  styleTween: cu,
5377
5387
  text: uu,
@@ -5406,7 +5416,7 @@ function wu(e) {
5406
5416
  e instanceof J ? (t = e._id, e = e._name) : (t = Ur(), (n = yu).time = Sn(), e = e == null ? null : e + "");
5407
5417
  for (var i = this._groups, r = i.length, o = 0; o < r; ++o)
5408
5418
  for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
5409
- (c = s[l]) && kt(c, e, t, l, s, n || _u(c, t));
5419
+ (c = s[l]) && Lt(c, e, t, l, s, n || _u(c, t));
5410
5420
  return new J(i, this._parents, e, t);
5411
5421
  }
5412
5422
  je.prototype.interrupt = Vl;
@@ -5528,8 +5538,12 @@ class Hu extends Xe {
5528
5538
  for (const o of n.getAll()) this.detachLine(o.id);
5529
5539
  };
5530
5540
  }
5531
- onItemPointerDown({ itemType: t }) {
5532
- t !== "line" && this.clearSelection();
5541
+ onItemPointerDown({ itemType: t, itemId: n }) {
5542
+ if (t !== "line") {
5543
+ t !== null ? this.clearSelectionSilent() : this.clearSelection();
5544
+ return;
5545
+ }
5546
+ n && this.selectedLineId !== n && this.select(n);
5533
5547
  }
5534
5548
  attachLine(t, n) {
5535
5549
  const i = t.getContainer();
@@ -5537,11 +5551,7 @@ class Hu extends Xe {
5537
5551
  const r = new ee();
5538
5552
  r.visible = !1, r.zIndex = 1e4, n.projectionContainer.addChild(r);
5539
5553
  const o = (a) => {
5540
- if (this.selectedLineId !== t.id) {
5541
- this.select(t.id);
5542
- return;
5543
- }
5544
- this.handlePathDrag(a, t, n);
5554
+ this.selectedLineId === t.id && this.handlePathDrag(a, t, n);
5545
5555
  }, s = () => {
5546
5556
  this.selectedLineId === t.id && this.renderMarkers(this.editStates.get(t.id));
5547
5557
  };
@@ -5556,7 +5566,7 @@ class Hu extends Xe {
5556
5566
  savedZIndex = null;
5557
5567
  SELECTED_ZINDEX = 9999;
5558
5568
  select(t) {
5559
- if (this.selectedLineId && this.selectedLineId !== t && this.deselect(this.selectedLineId), this.selectedLineId === t) {
5569
+ if (this.selectedLineId && this.selectedLineId !== t && this.clearSelectionSilent(), this.selectedLineId === t) {
5560
5570
  this.deselect(t);
5561
5571
  return;
5562
5572
  }
@@ -5576,6 +5586,11 @@ class Hu extends Xe {
5576
5586
  clearSelection() {
5577
5587
  this.selectedLineId && this.deselect(this.selectedLineId);
5578
5588
  }
5589
+ clearSelectionSilent() {
5590
+ if (!this.selectedLineId) return;
5591
+ const t = this.editStates.get(this.selectedLineId);
5592
+ t && (this.savedZIndex !== null && (t.line.getContainer().zIndex = this.savedZIndex, this.savedZIndex = null), this.selectedLineId = null, this.cancelDrag(), t.markersContainer.visible = !1, t.markersContainer.removeChildren());
5593
+ }
5579
5594
  renderMarkers(t) {
5580
5595
  const { line: n, scene: i, markersContainer: r } = t, o = n.options.anchor;
5581
5596
  r.removeChildren(), o.forEach((s, a) => {
@@ -5752,16 +5767,6 @@ class Gu extends Xe {
5752
5767
  for (const s of n.getAll()) this.detachListeners(s.id);
5753
5768
  };
5754
5769
  }
5755
- onItemPointerDown({ itemType: t, itemId: n, sceneId: i }) {
5756
- if (t === "rect" && n) {
5757
- const o = this.topology?.getScene(i)?.rects.get(n);
5758
- if (o) {
5759
- this.activeRect && this.activeRect !== o && this.activeRect.deselect(), o.select();
5760
- return;
5761
- }
5762
- }
5763
- this.activeRect?.deselect();
5764
- }
5765
5770
  onSceneSwitched() {
5766
5771
  this.activeRect?.deselect();
5767
5772
  }
@@ -5910,7 +5915,7 @@ class qu extends Et {
5910
5915
  return t.id;
5911
5916
  }
5912
5917
  }
5913
- class Lt extends vn {
5918
+ class kt extends vn {
5914
5919
  _isActive = !1;
5915
5920
  _opts;
5916
5921
  _prevDragEnabled = null;
@@ -6016,7 +6021,7 @@ class Lt extends vn {
6016
6021
  return { x: Math.round(i.x / x), y: Math.round(i.y / x) };
6017
6022
  }
6018
6023
  }
6019
- class Ku extends Lt {
6024
+ class Ku extends kt {
6020
6025
  name = "text-creator";
6021
6026
  _defaults = {};
6022
6027
  _previewId = null;
@@ -6068,7 +6073,7 @@ class Ku extends Lt {
6068
6073
  !t || !this._handlers || (t.off("globalpointermove", this._handlers.onMove), t.off("pointerdown", this._handlers.onDown), t.cursor = "default", this._handlers = null);
6069
6074
  }
6070
6075
  }
6071
- class Vu extends Lt {
6076
+ class Vu extends kt {
6072
6077
  name = "rect-creator";
6073
6078
  _defaults = {};
6074
6079
  _previewId = null;
@@ -6125,7 +6130,7 @@ class Vu extends Lt {
6125
6130
  !t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
6126
6131
  }
6127
6132
  }
6128
- class Ju extends Lt {
6133
+ class Ju extends kt {
6129
6134
  name = "line-creator";
6130
6135
  _defaults = {};
6131
6136
  _previewId = null;
@@ -6183,7 +6188,7 @@ class Ju extends Lt {
6183
6188
  !t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
6184
6189
  }
6185
6190
  }
6186
- class Zu extends Lt {
6191
+ class Zu extends kt {
6187
6192
  name = "node-creator";
6188
6193
  _defaults = {};
6189
6194
  _previewId = null;
@@ -6262,7 +6267,7 @@ export {
6262
6267
  it as BILLBOARD_SCALE_Y,
6263
6268
  cr as BILLBOARD_SKEW_X,
6264
6269
  lr as BILLBOARD_SKEW_Y,
6265
- Lt as BaseCreatorPlugin,
6270
+ kt as BaseCreatorPlugin,
6266
6271
  ft as COS_ELEVATION,
6267
6272
  Zi as ELEVATION,
6268
6273
  qa as HitTestPlugin,
@@ -6300,8 +6305,8 @@ export {
6300
6305
  er as calculateIsometricSkew,
6301
6306
  Mu as calculateIsometricTileDiagonals,
6302
6307
  Pu as createBlinkStatePlugin,
6303
- ku as createBounceStatePlugin,
6304
- Lu as createBrightenStatePlugin,
6308
+ Lu as createBounceStatePlugin,
6309
+ ku as createBrightenStatePlugin,
6305
6310
  Nu as createDarkenStatePlugin,
6306
6311
  Ru as createGlowStatePlugin,
6307
6312
  Du as createHeartbeatStatePlugin,