MCPcopy Create free account
hub / github.com/alignoth/alignoth / Xt

Function Xt

resources/vega.min.js:836–901  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

834 })(e);
835 }
836 function Xt(t, e) {
837 var n = {},
838 r = {},
839 i = {},
840 o = [],
841 a = -1;
842 function s(t, e) {
843 for (var r in t) {
844 var i = t[r];
845 (delete e[i.start],
846 delete i.start,
847 delete i.end,
848 i.forEach(function (t) {
849 n[t < 0 ? ~t : t] = 1;
850 }),
851 o.push(i));
852 }
853 }
854 return (
855 e.forEach(function (n, r) {
856 var i,
857 o = t.arcs[n < 0 ? ~n : n];
858 o.length < 3 &&
859 !o[1][0] &&
860 !o[1][1] &&
861 ((i = e[++a]), (e[a] = n), (e[r] = i));
862 }),
863 e.forEach(function (e) {
864 var n,
865 o,
866 a = (function (e) {
867 var n,
868 r = t.arcs[e < 0 ? ~e : e],
869 i = r[0];
870 t.transform
871 ? ((n = [0, 0]),
872 r.forEach(function (t) {
873 ((n[0] += t[0]), (n[1] += t[1]));
874 }))
875 : (n = r[r.length - 1]);
876 return e < 0 ? [n, i] : [i, n];
877 })(e),
878 s = a[0],
879 u = a[1];
880 if ((n = i[s]))
881 if ((delete i[n.end], n.push(e), (n.end = u), (o = r[u]))) {
882 delete r[o.start];
883 var l = o === n ? n : n.concat(o);
884 r[(l.start = n.start)] = i[(l.end = o.end)] = l;
885 } else r[n.start] = i[n.end] = n;
886 else if ((n = r[u]))
887 if ((delete r[n.start], n.unshift(e), (n.start = s), (o = i[s]))) {
888 delete i[o.end];
889 var c = o === n ? n : o.concat(n);
890 r[(c.start = o.start)] = i[(c.end = n.end)] = c;
891 } else r[n.start] = i[n.end] = n;
892 else r[((n = [e]).start = s)] = i[(n.end = u)] = n;
893 }),

Callers 1

ZtFunction · 0.70

Calls 1

sFunction · 0.70

Tested by

no test coverage detected