@qe-libs/qeviz 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/qeviz.es.js +899 -873
- package/dist/qeviz.es.js.map +1 -1
- package/dist/qeviz.umd.js +4 -4
- package/dist/qeviz.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/qeviz.es.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Di = Object.defineProperty;
|
|
2
2
|
var oi = (c) => {
|
|
3
3
|
throw TypeError(c);
|
|
4
4
|
};
|
|
5
|
-
var l = (c, t) =>
|
|
5
|
+
var l = (c, t) => Di(c, "name", { value: t, configurable: !0 });
|
|
6
6
|
var ai = (c, t, e) => t.has(c) || oi("Cannot " + e);
|
|
7
|
-
var
|
|
8
|
-
var Se, Ne,
|
|
9
|
-
const
|
|
7
|
+
var R = (c, t, e) => (ai(c, t, "read from private field"), e ? e.call(c) : t.get(c)), nt = (c, t, e) => t.has(c) ? oi("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(c) : t.set(c, e), W = (c, t, e, s) => (ai(c, t, "write to private field"), s ? s.call(c, e) : t.set(c, e), e);
|
|
8
|
+
var Se, Ne, Me, yt, Ee;
|
|
9
|
+
const Os = class Os extends Array {
|
|
10
10
|
constructor(e, s, i, n, r) {
|
|
11
11
|
super(...s);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
W(this,
|
|
12
|
+
nt(this, Se);
|
|
13
|
+
nt(this, Ne);
|
|
14
|
+
nt(this, Me);
|
|
15
|
+
nt(this, yt);
|
|
16
|
+
nt(this, Ee);
|
|
17
|
+
W(this, Me, e), W(this, Ne, i), W(this, yt, n), W(this, Ee, n == null ? void 0 : n.classes), W(this, Se, r);
|
|
18
18
|
}
|
|
19
19
|
get parent() {
|
|
20
|
-
return
|
|
20
|
+
return R(this, yt);
|
|
21
21
|
}
|
|
22
22
|
get names() {
|
|
23
|
-
return
|
|
23
|
+
return R(this, Me);
|
|
24
24
|
}
|
|
25
25
|
get rowName() {
|
|
26
|
-
return
|
|
26
|
+
return R(this, Ne);
|
|
27
27
|
}
|
|
28
28
|
get types() {
|
|
29
|
-
if (!
|
|
30
|
-
return
|
|
29
|
+
if (!R(this, yt)) throw new Error("No parent DataFrame attached to this row.");
|
|
30
|
+
return R(this, yt).types;
|
|
31
31
|
}
|
|
32
32
|
get classes() {
|
|
33
|
-
return
|
|
33
|
+
return R(this, Ee);
|
|
34
34
|
}
|
|
35
35
|
get rowNumber() {
|
|
36
|
-
return
|
|
36
|
+
return R(this, Se);
|
|
37
37
|
}
|
|
38
38
|
col(e) {
|
|
39
|
-
if (!
|
|
40
|
-
return
|
|
39
|
+
if (!R(this, yt)) throw new Error("No parent DataFrame attached to this row.");
|
|
40
|
+
return R(this, yt).col(e);
|
|
41
41
|
}
|
|
42
42
|
cols(...e) {
|
|
43
|
-
if (!
|
|
44
|
-
return
|
|
43
|
+
if (!R(this, yt)) throw new Error("No parent DataFrame attached to this row.");
|
|
44
|
+
return R(this, yt).cols(...e);
|
|
45
45
|
}
|
|
46
46
|
filter(e) {
|
|
47
47
|
console.error("DataFrameRow does not currently support filtering.");
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
Se = new WeakMap(), Ne = new WeakMap(),
|
|
51
|
-
let
|
|
52
|
-
var
|
|
50
|
+
Se = new WeakMap(), Ne = new WeakMap(), Me = new WeakMap(), yt = new WeakMap(), Ee = new WeakMap(), l(Os, "DataFrameRow");
|
|
51
|
+
let ae = Os;
|
|
52
|
+
var ji = /* @__PURE__ */ ((c) => (c.Character = "character", c.Double = "double", c.Logical = "logical", c.Integer = "integer", c))(ji || {}), ke, xt, ne, $t;
|
|
53
53
|
const Ps = class Ps extends Array {
|
|
54
54
|
constructor(e, s, i, n) {
|
|
55
55
|
super(s.length);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
nt(this, ke);
|
|
57
|
+
nt(this, xt);
|
|
58
|
+
nt(this, ne);
|
|
59
|
+
nt(this, $t);
|
|
60
60
|
for (let r = 0; r < s.length; r++)
|
|
61
61
|
this[r] = s[r];
|
|
62
|
-
if (W(this, ke, e), s.type !== void 0 ? W(this, xt, s.type) : s.every((r) => typeof r == "string" || r === null || r === void 0) ? W(this, xt, "character") : s.every((r) => Number.isInteger(r) || r === null || r === void 0) ? s.every((r) => r === 0 || r === 1 || r === null || r === void 0) ? W(this, xt, "logical") : W(this, xt, "integer") : s.every((r) => typeof r == "number" || r === null || r === void 0) ? W(this, xt, "double") : s.every((r) => typeof r == "boolean" || r === null || r === void 0) ? W(this, xt, "logical") : W(this, xt, "character"), W(this,
|
|
62
|
+
if (W(this, ke, e), s.type !== void 0 ? W(this, xt, s.type) : s.every((r) => typeof r == "string" || r === null || r === void 0) ? W(this, xt, "character") : s.every((r) => Number.isInteger(r) || r === null || r === void 0) ? s.every((r) => r === 0 || r === 1 || r === null || r === void 0) ? W(this, xt, "logical") : W(this, xt, "integer") : s.every((r) => typeof r == "number" || r === null || r === void 0) ? W(this, xt, "double") : s.every((r) => typeof r == "boolean" || r === null || r === void 0) ? W(this, xt, "logical") : W(this, xt, "character"), W(this, $t, n), i && i.length !== this.length)
|
|
63
63
|
throw new Error("Row names length must match the number of rows in the DataFrameColumn.");
|
|
64
|
-
i && i.length > 0 ? W(this,
|
|
64
|
+
i && i.length > 0 ? W(this, ne, i) : W(this, ne, void 0);
|
|
65
65
|
}
|
|
66
66
|
get name() {
|
|
67
|
-
return
|
|
67
|
+
return R(this, ke);
|
|
68
68
|
}
|
|
69
69
|
get type() {
|
|
70
|
-
return
|
|
70
|
+
return R(this, xt);
|
|
71
71
|
}
|
|
72
72
|
get rowNames() {
|
|
73
|
-
return
|
|
73
|
+
return R(this, ne);
|
|
74
74
|
}
|
|
75
75
|
row(e) {
|
|
76
|
-
if (!
|
|
77
|
-
return
|
|
76
|
+
if (!R(this, $t)) throw new Error("No parent DataFrame attached to this column.");
|
|
77
|
+
return R(this, $t).row(e);
|
|
78
78
|
}
|
|
79
79
|
rows(...e) {
|
|
80
|
-
if (!
|
|
81
|
-
return
|
|
80
|
+
if (!R(this, $t)) throw new Error("No parent DataFrame attached to this column.");
|
|
81
|
+
return R(this, $t).rows(...e);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
-
ke = new WeakMap(), xt = new WeakMap(),
|
|
85
|
-
let
|
|
86
|
-
var zt,
|
|
84
|
+
ke = new WeakMap(), xt = new WeakMap(), ne = new WeakMap(), $t = new WeakMap(), l(Ps, "DataFrameColumn");
|
|
85
|
+
let je = Ps;
|
|
86
|
+
var zt, _t, Ie;
|
|
87
87
|
const ge = class ge extends Array {
|
|
88
88
|
constructor(e, s, i, n) {
|
|
89
89
|
if ((!e || !s) && (s = [], e = []), s.map((r) => r.length).every((r) => r === e.length)) {
|
|
@@ -97,37 +97,37 @@ const ge = class ge extends Array {
|
|
|
97
97
|
s = r;
|
|
98
98
|
}
|
|
99
99
|
super(s.length);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
nt(this, zt);
|
|
101
|
+
nt(this, _t);
|
|
102
|
+
nt(this, Ie);
|
|
103
103
|
if (s.forEach((r, o) => {
|
|
104
|
-
r instanceof
|
|
104
|
+
r instanceof je ? this[o] = r : this[o] = new je(e[o], r, i, this);
|
|
105
105
|
}), W(this, zt, e), i && this[0] && i.length !== this[0].length)
|
|
106
106
|
throw new Error("Row names length must match the number of rows in the DataFrame.");
|
|
107
|
-
if (i && i.length > 0 && W(this,
|
|
107
|
+
if (i && i.length > 0 && W(this, _t, i), n && n.length !== this.length)
|
|
108
108
|
throw new Error("Classes length must match the number of columns in the DataFrame.");
|
|
109
109
|
n && n.length > 0 && W(this, Ie, n);
|
|
110
110
|
}
|
|
111
111
|
get classes() {
|
|
112
|
-
return
|
|
112
|
+
return R(this, Ie);
|
|
113
113
|
}
|
|
114
114
|
getColumnByName(e) {
|
|
115
|
-
const s =
|
|
115
|
+
const s = R(this, zt).indexOf(e);
|
|
116
116
|
return s >= 0 ? this[s] : void 0;
|
|
117
117
|
}
|
|
118
118
|
getRowByIndex(e) {
|
|
119
119
|
if (this && this.length === 0)
|
|
120
|
-
return console.warn("DataFrame is empty, cannot get row by index", e), new
|
|
120
|
+
return console.warn("DataFrame is empty, cannot get row by index", e), new ae(R(this, zt), [], void 0, this, e);
|
|
121
121
|
const s = [];
|
|
122
122
|
for (let i of this) {
|
|
123
123
|
let n = i[e];
|
|
124
124
|
s.push(n);
|
|
125
125
|
}
|
|
126
|
-
return new
|
|
126
|
+
return new ae(R(this, zt), s, R(this, _t) ? R(this, _t)[e] : void 0, this, e);
|
|
127
127
|
}
|
|
128
128
|
getRowByName(e) {
|
|
129
|
-
if (!
|
|
130
|
-
const s =
|
|
129
|
+
if (!R(this, _t)) return;
|
|
130
|
+
const s = R(this, _t).indexOf(e);
|
|
131
131
|
if (s !== -1)
|
|
132
132
|
return this.getRowByIndex(s);
|
|
133
133
|
}
|
|
@@ -157,11 +157,11 @@ const ge = class ge extends Array {
|
|
|
157
157
|
if (!this[0] || this.length === 0)
|
|
158
158
|
return [];
|
|
159
159
|
const r = this[0].length;
|
|
160
|
-
i = Array.from({ length: r }, (o, a) => this.getRowByIndex(a)), n =
|
|
160
|
+
i = Array.from({ length: r }, (o, a) => this.getRowByIndex(a)), n = R(this, _t);
|
|
161
161
|
} else
|
|
162
162
|
e.length === 1 && Array.isArray(e[0]) ? s = e[0] : s = e, i = s.map((r, o) => {
|
|
163
163
|
let a = this.row(r);
|
|
164
|
-
return
|
|
164
|
+
return R(this, _t) && a && (n == null || n.push(R(this, _t)[o])), a;
|
|
165
165
|
}).filter((r) => r !== void 0);
|
|
166
166
|
return i;
|
|
167
167
|
}
|
|
@@ -173,21 +173,21 @@ const ge = class ge extends Array {
|
|
|
173
173
|
}
|
|
174
174
|
cols(...e) {
|
|
175
175
|
let s, i, n = [];
|
|
176
|
-
return e.length === 0 ? (i = this.slice(), n =
|
|
176
|
+
return e.length === 0 ? (i = this.slice(), n = R(this, zt)) : (e.length === 1 && Array.isArray(e[0]) ? s = e[0] : s = e, i = s.map((r) => this.col(r)).filter((r) => r !== void 0), n = i.map((r) => r.name)), new ge(n, i, R(this, _t));
|
|
177
177
|
}
|
|
178
178
|
subset(e, s) {
|
|
179
179
|
const i = s && s.length > 0 ? this.cols(...s) : this.slice();
|
|
180
180
|
return new ge(
|
|
181
181
|
i.map((n) => n.name),
|
|
182
182
|
i.map((n) => n.values),
|
|
183
|
-
|
|
183
|
+
R(this, _t)
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
get names() {
|
|
187
|
-
return
|
|
187
|
+
return R(this, zt);
|
|
188
188
|
}
|
|
189
189
|
get rowNames() {
|
|
190
|
-
return
|
|
190
|
+
return R(this, _t);
|
|
191
191
|
}
|
|
192
192
|
get nrow() {
|
|
193
193
|
return this[0] ? this[0].length : 0;
|
|
@@ -196,11 +196,11 @@ const ge = class ge extends Array {
|
|
|
196
196
|
return this.length;
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
|
-
zt = new WeakMap(),
|
|
200
|
-
let
|
|
201
|
-
const
|
|
199
|
+
zt = new WeakMap(), _t = new WeakMap(), Ie = new WeakMap(), l(ge, "DataFrame");
|
|
200
|
+
let ee = ge;
|
|
201
|
+
const Ls = class Ls {
|
|
202
202
|
constructor(t = {}) {
|
|
203
|
-
this.unit_id_col = "id", this.node_id_col = "id", this.group_col = null, this.directed = !1, this.palette = [], this._points = t.points ?? new
|
|
203
|
+
this.unit_id_col = "id", this.node_id_col = "id", this.group_col = null, this.directed = !1, this.palette = [], this._points = t.points ?? new ee(), this._nodes = t.nodes ?? new ee(), this._edges = t.edges ?? new ee(), this._dimensions = t.dimensions ?? [], this._confidence = void 0, this._outlier = void 0, this._groups = void 0;
|
|
204
204
|
}
|
|
205
205
|
get updated() {
|
|
206
206
|
return this._updated;
|
|
@@ -285,24 +285,24 @@ const Rs = class Rs {
|
|
|
285
285
|
this[t] = e;
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
|
-
l(
|
|
289
|
-
let
|
|
290
|
-
const
|
|
291
|
-
function
|
|
292
|
-
|
|
288
|
+
l(Ls, "Model");
|
|
289
|
+
let Ye = Ls;
|
|
290
|
+
const Yi = globalThis.__QEVIZ_DEBUG__ === !0;
|
|
291
|
+
function he(...c) {
|
|
292
|
+
Yi && console.log(...c);
|
|
293
293
|
}
|
|
294
|
-
l(
|
|
295
|
-
function
|
|
294
|
+
l(he, "dbg");
|
|
295
|
+
function yi(c, t) {
|
|
296
296
|
var r, o, a, h;
|
|
297
297
|
["nodes", "edges", "points", "groups", "confidence", "outlier", "trajectories", "networks", "pointsets"].forEach((g) => {
|
|
298
|
-
var
|
|
298
|
+
var j;
|
|
299
299
|
const f = t[g];
|
|
300
|
-
if (!((
|
|
301
|
-
const m = f.data, _ = f.types || {}, d = Object.keys(m[0]), u = m.map((
|
|
300
|
+
if (!((j = f == null ? void 0 : f.data) != null && j.length)) return;
|
|
301
|
+
const m = f.data, _ = f.types || {}, d = Object.keys(m[0]), u = m.map((Y) => Object.values(Y)), b = d.map((Y) => _[Y] ?? "character");
|
|
302
302
|
let p;
|
|
303
|
-
g === "networks" ? p = "name" : g === "pointsets" ? p = "id" : g === "nodes" ? p = t.node_id_col ?? d.find((
|
|
304
|
-
const w = p ? d.indexOf(p) : 0,
|
|
305
|
-
c.setByKey(g, new
|
|
303
|
+
g === "networks" ? p = "name" : g === "pointsets" ? p = "id" : g === "nodes" ? p = t.node_id_col ?? d.find((Y) => (_[Y] ?? "character") === "character") : g === "edges" || g === "points" || g === "trajectories" ? p = t.id_col ?? d.find((Y) => (_[Y] ?? "character") === "character") : p = t.group_col ?? d.find((Y) => (_[Y] ?? "character") === "character");
|
|
304
|
+
const w = p ? d.indexOf(p) : 0, E = u.map((Y) => String(Y[w]));
|
|
305
|
+
c.setByKey(g, new ee(d, u, E, b));
|
|
306
306
|
}), c.setByKey("updated", t.updated ?? Date.now()), t.directed !== void 0 && (c.directed = t.directed), Array.isArray(t.palette) && (c.palette = t.palette.map(String));
|
|
307
307
|
const s = c.nodes;
|
|
308
308
|
c.node_id_col = t.node_id_col ?? ((r = s == null ? void 0 : s.names) == null ? void 0 : r.find((g) => {
|
|
@@ -332,13 +332,13 @@ function bi(c, t) {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
l(
|
|
336
|
-
function
|
|
337
|
-
const t = new
|
|
338
|
-
return
|
|
335
|
+
l(yi, "ingestModelData");
|
|
336
|
+
function qi(c) {
|
|
337
|
+
const t = new Ye();
|
|
338
|
+
return yi(t, c), t;
|
|
339
339
|
}
|
|
340
|
-
l(
|
|
341
|
-
const
|
|
340
|
+
l(qi, "modelFromData");
|
|
341
|
+
const xi = "http://www.w3.org/1999/xhtml", rs = class rs {
|
|
342
342
|
constructor(t) {
|
|
343
343
|
this.data = t, this.nodeType = 3, this.parentNode = null;
|
|
344
344
|
}
|
|
@@ -352,17 +352,17 @@ const yi = "http://www.w3.org/1999/xhtml", os = class os {
|
|
|
352
352
|
return this.data;
|
|
353
353
|
}
|
|
354
354
|
cloneNode() {
|
|
355
|
-
return new
|
|
355
|
+
return new rs(this.data);
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
l(
|
|
359
|
-
let
|
|
360
|
-
const
|
|
358
|
+
l(rs, "HeadlessText");
|
|
359
|
+
let le = rs;
|
|
360
|
+
const Rs = class Rs extends le {
|
|
361
361
|
};
|
|
362
|
-
l(
|
|
363
|
-
let be =
|
|
364
|
-
const hi = /* @__PURE__ */ l((c) => c.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), "camelToKebab"),
|
|
365
|
-
constructor(t, e =
|
|
362
|
+
l(Rs, "HeadlessRaw");
|
|
363
|
+
let be = Rs;
|
|
364
|
+
const hi = /* @__PURE__ */ l((c) => c.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), "camelToKebab"), Rt = class Rt {
|
|
365
|
+
constructor(t, e = xi) {
|
|
366
366
|
this.nodeType = 1, this.parentNode = null, this.childNodes = [], this.shadowRoot = null, this._attrs = /* @__PURE__ */ new Map(), this._style = /* @__PURE__ */ new Map(), this.tagName = t ?? this.constructor.tagName ?? "div", this.namespaceURI = e;
|
|
367
367
|
const s = this;
|
|
368
368
|
this.style = new Proxy({}, {
|
|
@@ -448,7 +448,7 @@ const hi = /* @__PURE__ */ l((c) => c.replace(/[A-Z]/g, (t) => "-" + t.toLowerCa
|
|
|
448
448
|
return this.parentNode;
|
|
449
449
|
}
|
|
450
450
|
get children() {
|
|
451
|
-
return this.childNodes.filter((t) => t instanceof
|
|
451
|
+
return this.childNodes.filter((t) => t instanceof Rt);
|
|
452
452
|
}
|
|
453
453
|
get firstChild() {
|
|
454
454
|
return this.childNodes[0] ?? null;
|
|
@@ -509,25 +509,25 @@ const hi = /* @__PURE__ */ l((c) => c.replace(/[A-Z]/g, (t) => "-" + t.toLowerCa
|
|
|
509
509
|
set textContent(t) {
|
|
510
510
|
this.childNodes.forEach((e) => {
|
|
511
511
|
e.parentNode = null;
|
|
512
|
-
}), this.childNodes = [], t != null && t !== "" && this.appendChild(new
|
|
512
|
+
}), this.childNodes = [], t != null && t !== "" && this.appendChild(new le(String(t)));
|
|
513
513
|
}
|
|
514
514
|
/** '' clears the children; other markup is kept verbatim (not parsed). */
|
|
515
515
|
set innerHTML(t) {
|
|
516
516
|
this.textContent = "", t && this.appendChild(new be(t));
|
|
517
517
|
}
|
|
518
518
|
get innerHTML() {
|
|
519
|
-
return this.childNodes.map((t) => t instanceof
|
|
519
|
+
return this.childNodes.map((t) => t instanceof Rt ? zs(t, !1) : t instanceof be ? t.data : wi(t.data)).join("");
|
|
520
520
|
}
|
|
521
521
|
cloneNode(t = !1) {
|
|
522
|
-
const e = new
|
|
523
|
-
return this._attrs.forEach((s, i) => e._attrs.set(i, s)), e._syncStyleFromAttribute(), t && this.childNodes.forEach((s) => e.appendChild(s instanceof
|
|
522
|
+
const e = new Rt(this.tagName, this.namespaceURI);
|
|
523
|
+
return this._attrs.forEach((s, i) => e._attrs.set(i, s)), e._syncStyleFromAttribute(), t && this.childNodes.forEach((s) => e.appendChild(s instanceof Rt ? s.cloneNode(!0) : s.cloneNode())), e;
|
|
524
524
|
}
|
|
525
525
|
attachShadow(t) {
|
|
526
|
-
return this.shadowRoot = new
|
|
526
|
+
return this.shadowRoot = new Rt("#shadow-root", null), this.shadowRoot.parentNode = this, this.shadowRoot;
|
|
527
527
|
}
|
|
528
528
|
// ── Selectors (simple compound selectors, comma-separated) ───────────────────
|
|
529
529
|
matches(t) {
|
|
530
|
-
return t.split(",").some((e) =>
|
|
530
|
+
return t.split(",").some((e) => Bi(this, e.trim()));
|
|
531
531
|
}
|
|
532
532
|
closest(t) {
|
|
533
533
|
let e = this;
|
|
@@ -579,9 +579,9 @@ const hi = /* @__PURE__ */ l((c) => c.replace(/[A-Z]/g, (t) => "-" + t.toLowerCa
|
|
|
579
579
|
return !0;
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
|
-
l(
|
|
583
|
-
let ye =
|
|
584
|
-
function
|
|
582
|
+
l(Rt, "HeadlessElement");
|
|
583
|
+
let ye = Rt;
|
|
584
|
+
function Bi(c, t) {
|
|
585
585
|
if (!t || t === "*") return !!t;
|
|
586
586
|
const s = /^([a-zA-Z][\w-]*)?((?:#[\w-]+|\.[\w-]+|\[[^\]]+\])*)$/.exec(t);
|
|
587
587
|
return !s || s[1] && s[1].toLowerCase() !== c.tagName.toLowerCase() ? !1 : (s[2].match(/#[\w-]+|\.[\w-]+|\[[^\]]+\]/g) ?? []).every((n) => {
|
|
@@ -607,36 +607,36 @@ function qi(c, t) {
|
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
l(
|
|
611
|
-
const
|
|
610
|
+
l(Bi, "matchesSimple");
|
|
611
|
+
const $s = class $s {
|
|
612
612
|
constructor() {
|
|
613
613
|
this.headless = !0;
|
|
614
614
|
}
|
|
615
615
|
createElement(t) {
|
|
616
|
-
return new ye(t.toLowerCase(),
|
|
616
|
+
return new ye(t.toLowerCase(), xi);
|
|
617
617
|
}
|
|
618
618
|
createElementNS(t, e) {
|
|
619
619
|
return new ye(e, t);
|
|
620
620
|
}
|
|
621
621
|
createTextNode(t) {
|
|
622
|
-
return new
|
|
622
|
+
return new le(t);
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
|
-
l(
|
|
626
|
-
let
|
|
627
|
-
const
|
|
628
|
-
function
|
|
625
|
+
l($s, "HeadlessDocument");
|
|
626
|
+
let vs = $s;
|
|
627
|
+
const De = new vs(), Gi = /* @__PURE__ */ l((c) => c.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), "escapeAttr"), wi = /* @__PURE__ */ l((c) => c.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), "escapeText");
|
|
628
|
+
function zs(c, t = !0) {
|
|
629
629
|
const e = [], s = /* @__PURE__ */ l((i, n) => {
|
|
630
630
|
if (i instanceof be) {
|
|
631
631
|
e.push(i.data);
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
if (i instanceof
|
|
635
|
-
e.push(
|
|
634
|
+
if (i instanceof le) {
|
|
635
|
+
e.push(wi(i.data));
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
638
638
|
if (i.tagName !== "#shadow-root") {
|
|
639
|
-
if (e.push("<", i.tagName), t && i.namespaceURI && i.namespaceURI !== n && !i.hasAttribute("xmlns") && e.push(` xmlns="${i.namespaceURI}"`), i.getAttributeNames().forEach((r) => e.push(` ${r}="${
|
|
639
|
+
if (e.push("<", i.tagName), t && i.namespaceURI && i.namespaceURI !== n && !i.hasAttribute("xmlns") && e.push(` xmlns="${i.namespaceURI}"`), i.getAttributeNames().forEach((r) => e.push(` ${r}="${Gi(i.getAttribute(r))}"`)), i.childNodes.length === 0) {
|
|
640
640
|
e.push("/>");
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
@@ -645,16 +645,16 @@ function Os(c, t = !0) {
|
|
|
645
645
|
}, "write");
|
|
646
646
|
return s(c, null), e.join("");
|
|
647
647
|
}
|
|
648
|
-
l(
|
|
649
|
-
const
|
|
650
|
-
function
|
|
648
|
+
l(zs, "serializeElement");
|
|
649
|
+
const Ui = 0.6, Wi = 1.2, Xi = 0.9;
|
|
650
|
+
function Hi(c) {
|
|
651
651
|
const t = c.textContent ?? "", e = Number(c.getAttribute("font-size")), s = Number(c.getAttribute("x") ?? 0), i = Number(c.getAttribute("y") ?? 0);
|
|
652
652
|
if (!t || !(e > 0) || !Number.isFinite(s) || !Number.isFinite(i)) return null;
|
|
653
|
-
const n = t.length * e *
|
|
654
|
-
return { x: r === "end" ? s - n : r === "middle" ? s - n / 2 : s, y: i - e * Xi, width: n, height: e *
|
|
653
|
+
const n = t.length * e * Ui, r = c.getAttribute("text-anchor") ?? "start";
|
|
654
|
+
return { x: r === "end" ? s - n : r === "middle" ? s - n / 2 : s, y: i - e * Xi, width: n, height: e * Wi };
|
|
655
655
|
}
|
|
656
|
-
l(
|
|
657
|
-
function
|
|
656
|
+
l(Hi, "estimateTextBox");
|
|
657
|
+
function Vi(c) {
|
|
658
658
|
let t = [1, 0, 0, 1, 0, 0];
|
|
659
659
|
if (!c) return t;
|
|
660
660
|
const e = /* @__PURE__ */ l((s, i) => [
|
|
@@ -671,13 +671,13 @@ function Hi(c) {
|
|
|
671
671
|
}
|
|
672
672
|
return t;
|
|
673
673
|
}
|
|
674
|
-
l(
|
|
675
|
-
function
|
|
674
|
+
l(Vi, "parseTransform");
|
|
675
|
+
function Zi(c) {
|
|
676
676
|
const [t, e, s, i, n, r] = c, o = t * i - e * s;
|
|
677
677
|
return o ? [i / o, -e / o, -s / o, t / o, (s * r - i * n) / o, (e * n - t * r) / o] : null;
|
|
678
678
|
}
|
|
679
|
-
l(
|
|
680
|
-
function
|
|
679
|
+
l(Zi, "invertTransform");
|
|
680
|
+
function Ki(c, t, e) {
|
|
681
681
|
const s = (c ?? "").trim().split(/[\s,]+/).map(Number);
|
|
682
682
|
if (s.length !== 4 || !s.every(Number.isFinite) || !(s[2] > 0) || !(s[3] > 0)) return null;
|
|
683
683
|
const [i, n, r, o] = s;
|
|
@@ -685,30 +685,30 @@ function Zi(c, t, e) {
|
|
|
685
685
|
const a = Math.min(t / r, e / o), h = t / a, g = e / a, f = i - (h - r) / 2, m = n - (g - o) / 2;
|
|
686
686
|
return { left: f, right: f + h, top: m, bottom: m + g };
|
|
687
687
|
}
|
|
688
|
-
l(
|
|
689
|
-
function
|
|
690
|
-
return typeof document < "u" ? document :
|
|
688
|
+
l(Ki, "visibleViewBox");
|
|
689
|
+
function vi() {
|
|
690
|
+
return typeof document < "u" ? document : De;
|
|
691
691
|
}
|
|
692
|
-
l(
|
|
693
|
-
function
|
|
692
|
+
l(vi, "defaultDocument");
|
|
693
|
+
function Ai(c) {
|
|
694
694
|
return !!c && c.headless === !0;
|
|
695
695
|
}
|
|
696
|
-
l(
|
|
696
|
+
l(Ai, "isHeadlessDocument");
|
|
697
697
|
const Nt = typeof HTMLElement < "u" ? HTMLElement : ye;
|
|
698
|
-
function
|
|
698
|
+
function Mt(c, t) {
|
|
699
699
|
typeof customElements > "u" || customElements.get(c) || customElements.define(c, t);
|
|
700
700
|
}
|
|
701
|
-
l(
|
|
702
|
-
const
|
|
701
|
+
l(Mt, "defineElement");
|
|
702
|
+
const In = {
|
|
703
703
|
get: /* @__PURE__ */ l((c) => {
|
|
704
704
|
const t = [...document.querySelectorAll("qe-graph")];
|
|
705
705
|
return typeof c == "number" && c >= 0 ? t[c] : t;
|
|
706
706
|
}, "get")
|
|
707
|
-
},
|
|
707
|
+
}, Jt = class Jt extends Nt {
|
|
708
708
|
constructor() {
|
|
709
|
-
super(), this._isVisible = !0, this.output = "", this._updated = "", this._active_points = [], this._points = /* @__PURE__ */ new Map(), this._edges = /* @__PURE__ */ new Map(), this._labels = /* @__PURE__ */ new Map(), this._model = new
|
|
710
|
-
const t = this.attachShadow({ mode: "open" }), e =
|
|
711
|
-
s.textContent =
|
|
709
|
+
super(), this._isVisible = !0, this.output = "", this._updated = "", this._active_points = [], this._points = /* @__PURE__ */ new Map(), this._edges = /* @__PURE__ */ new Map(), this._labels = /* @__PURE__ */ new Map(), this._model = new Ye();
|
|
710
|
+
const t = this.attachShadow({ mode: "open" }), e = vi(), s = e.createElement("style");
|
|
711
|
+
s.textContent = Jt.styles, t.appendChild(s), this._outputElement = e.createElement("div"), t.appendChild(this._outputElement);
|
|
712
712
|
}
|
|
713
713
|
static get observedAttributes() {
|
|
714
714
|
return ["updated"];
|
|
@@ -746,7 +746,7 @@ const kn = {
|
|
|
746
746
|
return this._labels;
|
|
747
747
|
}
|
|
748
748
|
connectedCallback() {
|
|
749
|
-
|
|
749
|
+
he("QEVisualElement connected"), this.render();
|
|
750
750
|
}
|
|
751
751
|
/**
|
|
752
752
|
* Accept pre-fetched ENA model data and update the visualization.
|
|
@@ -754,7 +754,7 @@ const kn = {
|
|
|
754
754
|
* rENA R package, Python package, or static JSON.
|
|
755
755
|
*/
|
|
756
756
|
setModelData(t) {
|
|
757
|
-
|
|
757
|
+
yi(this._model, t), this.updated = this._model.updated !== void 0 ? String(this._model.updated) : String(Date.now()), he("Model updated via setModelData:", this.updated), this.render();
|
|
758
758
|
}
|
|
759
759
|
/**
|
|
760
760
|
* Base implementation is a no-op. Subclasses (e.g. RQEVisualElement) override
|
|
@@ -767,7 +767,7 @@ const kn = {
|
|
|
767
767
|
this._isVisible ? this.classList.remove("hidden") : this.classList.add("hidden"), ((t = this._model) == null ? void 0 : t.updated) !== void 0 && this._model.updated !== null ? this._outputElement.innerHTML = `${this.output}<slot></slot>` : this._outputElement.innerHTML = "Define the model on the left.";
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
|
-
l(
|
|
770
|
+
l(Jt, "QEVisualElement"), Jt.tagName = "qe-visual", Jt.styles = `
|
|
771
771
|
:host { display: block; width: 100%; }
|
|
772
772
|
:host(.hidden) { display: none !important; }
|
|
773
773
|
/* The output wrapper and the slotted graph fill the host so the plot
|
|
@@ -775,14 +775,14 @@ l(Kt, "QEVisualElement"), Kt.tagName = "qe-visual", Kt.styles = `
|
|
|
775
775
|
div { display: block; width: 100%; height: 100%; }
|
|
776
776
|
::slotted(qe-graph) { display: block; width: 100%; height: 100%; }
|
|
777
777
|
`;
|
|
778
|
-
let
|
|
779
|
-
|
|
780
|
-
const
|
|
778
|
+
let qe = Jt;
|
|
779
|
+
Mt(qe.tagName, qe);
|
|
780
|
+
const rt = class rt {
|
|
781
781
|
constructor(t) {
|
|
782
782
|
return this.base = typeof t == "string" ? t : t.base, new Proxy(this, {
|
|
783
783
|
get(e, s) {
|
|
784
784
|
if (typeof s == "string" && /^[0-2]$/.test(s)) {
|
|
785
|
-
const { r: i, g: n, b: r } =
|
|
785
|
+
const { r: i, g: n, b: r } = rt.parseColor(e.base);
|
|
786
786
|
return [i, n, r][Number(s)];
|
|
787
787
|
}
|
|
788
788
|
return e[s];
|
|
@@ -807,26 +807,26 @@ const ot = class ot {
|
|
|
807
807
|
}
|
|
808
808
|
const s = e.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i);
|
|
809
809
|
if (s) return { r: Math.round(+s[1]), g: Math.round(+s[2]), b: Math.round(+s[3]) };
|
|
810
|
-
const i =
|
|
811
|
-
if (i) return
|
|
810
|
+
const i = rt.resolveCss(e);
|
|
811
|
+
if (i) return rt.parseColor(i);
|
|
812
812
|
throw new Error(`Unsupported color format: ${t}`);
|
|
813
813
|
}
|
|
814
814
|
/** The CSS named colours ("steelblue" → "#4682b4"), so names resolve
|
|
815
815
|
* without a browser (headless renderSVG) exactly as a browser would. */
|
|
816
816
|
static namedColor(t) {
|
|
817
|
-
|
|
818
|
-
const e =
|
|
817
|
+
rt._named || (rt._named = new Map(Ji.split(" ").map((s) => s.split(":"))));
|
|
818
|
+
const e = rt._named.get(t.trim().toLowerCase());
|
|
819
819
|
return e ? `#${e}` : null;
|
|
820
820
|
}
|
|
821
821
|
/** A CSS colour as "#rrggbb" / "rgba(...)", or null if it isn't one. */
|
|
822
822
|
static resolveCss(t) {
|
|
823
|
-
if (
|
|
824
|
-
const e =
|
|
823
|
+
if (rt._cssCache.has(t)) return rt._cssCache.get(t);
|
|
824
|
+
const e = rt.namedColor(t);
|
|
825
825
|
if (e)
|
|
826
|
-
return
|
|
827
|
-
|
|
826
|
+
return rt._cssCache.set(t, e), e;
|
|
827
|
+
rt._ctx === void 0 && (rt._ctx = typeof document < "u" ? document.createElement("canvas").getContext("2d") : null);
|
|
828
828
|
let s = null;
|
|
829
|
-
const i =
|
|
829
|
+
const i = rt._ctx;
|
|
830
830
|
if (i) {
|
|
831
831
|
i.fillStyle = "#000000", i.fillStyle = t;
|
|
832
832
|
const n = i.fillStyle;
|
|
@@ -834,21 +834,21 @@ const ot = class ot {
|
|
|
834
834
|
const r = i.fillStyle;
|
|
835
835
|
n === r && (s = String(n));
|
|
836
836
|
}
|
|
837
|
-
return
|
|
837
|
+
return rt._cssCache.set(t, s), s;
|
|
838
838
|
}
|
|
839
839
|
static rgb(t, e, s) {
|
|
840
840
|
return `rgb(${t}, ${e}, ${s})`;
|
|
841
841
|
}
|
|
842
842
|
};
|
|
843
|
-
l(
|
|
844
|
-
let
|
|
845
|
-
const fe = class fe extends
|
|
843
|
+
l(rt, "Color"), rt._cssCache = /* @__PURE__ */ new Map();
|
|
844
|
+
let at = rt;
|
|
845
|
+
const fe = class fe extends at {
|
|
846
846
|
constructor(t, e, s) {
|
|
847
847
|
super(t), this.weight = e, this.alpha = s;
|
|
848
848
|
}
|
|
849
849
|
// Parse hex → HSV (h in [0, 360), s/v in [0, 1]).
|
|
850
850
|
static toHSV(t) {
|
|
851
|
-
const { r: e, g: s, b: i } =
|
|
851
|
+
const { r: e, g: s, b: i } = at.parseColor(t), n = e / 255, r = s / 255, o = i / 255, a = Math.max(n, r, o), h = Math.min(n, r, o), g = a - h, f = a, m = a === 0 ? 0 : g / a;
|
|
852
852
|
let _ = 0;
|
|
853
853
|
if (g > 0)
|
|
854
854
|
switch (a) {
|
|
@@ -885,8 +885,8 @@ const fe = class fe extends ht {
|
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
887
|
l(fe, "WeightedColor");
|
|
888
|
-
let
|
|
889
|
-
const
|
|
888
|
+
let Be = fe;
|
|
889
|
+
const Ji = "aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32", Ts = class Ts {
|
|
890
890
|
constructor(t = null) {
|
|
891
891
|
this._values = [1, 0, 0, 1, 0, 0], this._keys = ["a", "b", "c", "d", "e", "f"], t && (this.values = t);
|
|
892
892
|
}
|
|
@@ -966,8 +966,8 @@ const Ki = "aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 a
|
|
|
966
966
|
return this.get("f");
|
|
967
967
|
}
|
|
968
968
|
};
|
|
969
|
-
l(
|
|
970
|
-
let xe =
|
|
969
|
+
l(Ts, "Transform");
|
|
970
|
+
let xe = Ts;
|
|
971
971
|
var we;
|
|
972
972
|
((c) => {
|
|
973
973
|
((t) => {
|
|
@@ -1016,8 +1016,8 @@ var we;
|
|
|
1016
1016
|
}
|
|
1017
1017
|
l(r, "slopeIntercept"), s.slopeIntercept = r;
|
|
1018
1018
|
function o(u, b = 0) {
|
|
1019
|
-
const p = b, w = (1 - p) * u[0][0] + p * u[1][0],
|
|
1020
|
-
return [w,
|
|
1019
|
+
const p = b, w = (1 - p) * u[0][0] + p * u[1][0], E = (1 - p) * u[0][1] + p * u[1][1];
|
|
1020
|
+
return [w, E];
|
|
1021
1021
|
}
|
|
1022
1022
|
l(o, "point_along"), s.point_along = o;
|
|
1023
1023
|
function a(u, b, p = 0.5) {
|
|
@@ -1037,43 +1037,43 @@ var we;
|
|
|
1037
1037
|
], w = [
|
|
1038
1038
|
-p[1],
|
|
1039
1039
|
p[0]
|
|
1040
|
-
],
|
|
1040
|
+
], E = [
|
|
1041
1041
|
-w[0],
|
|
1042
1042
|
-w[1]
|
|
1043
|
-
],
|
|
1043
|
+
], j = [
|
|
1044
1044
|
w[0] + b[0],
|
|
1045
1045
|
w[1] + b[1]
|
|
1046
|
-
],
|
|
1047
|
-
|
|
1048
|
-
|
|
1046
|
+
], Y = [
|
|
1047
|
+
E[0] + b[0],
|
|
1048
|
+
E[1] + b[1]
|
|
1049
1049
|
];
|
|
1050
|
-
return [
|
|
1050
|
+
return [j, Y];
|
|
1051
1051
|
}
|
|
1052
1052
|
l(g, "rotate"), s.rotate = g;
|
|
1053
1053
|
function f(u, b, p = 90) {
|
|
1054
|
-
const w = c.Geometry.Line.slope(u[0], u[1]),
|
|
1055
|
-
u = [
|
|
1056
|
-
const
|
|
1057
|
-
(
|
|
1054
|
+
const w = c.Geometry.Line.slope(u[0], u[1]), E = c.Geometry.Line.intercept(u[0], u[1]), j = [0, E], Y = [1, w + E];
|
|
1055
|
+
u = [j, Y];
|
|
1056
|
+
const Q = [u[0][0], u[1][0]], A = [u[0][1], u[1][1]], B = b[0], et = b[1], wt = -2 * Math.PI * p / 360, Et = Q.map(
|
|
1057
|
+
(Pt, Ht) => (Pt - B) * Math.cos(wt) - (A[Ht] - et) * Math.sin(wt) + B
|
|
1058
1058
|
), ze = A.map(
|
|
1059
|
-
(
|
|
1059
|
+
(Pt, Ht) => (Q[Ht] - B) * Math.sin(wt) - (Pt - et) * Math.cos(wt) + et
|
|
1060
1060
|
);
|
|
1061
1061
|
return [
|
|
1062
|
-
[
|
|
1063
|
-
[
|
|
1062
|
+
[Et[0], ze[0]],
|
|
1063
|
+
[Et[1], ze[1]]
|
|
1064
1064
|
];
|
|
1065
1065
|
}
|
|
1066
1066
|
l(f, "rotate2"), s.rotate2 = f;
|
|
1067
1067
|
function m(u, b) {
|
|
1068
|
-
const [[p, w], [
|
|
1069
|
-
return [wt /
|
|
1068
|
+
const [[p, w], [E, j]] = u, [[Y, Q], [A, B]] = b, et = (p - E) * (Q - B) - (w - j) * (Y - A), wt = (p * j - w * E) * (Y - A) - (p - E) * (Y * B - Q * A), Et = (p * j - w * E) * (Q - B) - (w - j) * (Y * B - Q * A);
|
|
1069
|
+
return [wt / et, Et / et];
|
|
1070
1070
|
}
|
|
1071
1071
|
l(m, "intersection"), s.intersection = m;
|
|
1072
1072
|
function _(u, b, p) {
|
|
1073
|
-
let { slope: w, intercept:
|
|
1074
|
-
if (Math.sqrt(Math.pow(
|
|
1075
|
-
let B = (-
|
|
1076
|
-
A = [[B, wt], [
|
|
1073
|
+
let { slope: w, intercept: E } = c.Geometry.Line.slopeIntercept(u[0], u[1]), j = 1 + Math.pow(w, 2), Y = 2 * w * E - 2 * b[1] * w - 2 * b[0], Q = Math.pow(b[0], 2) + Math.pow(E, 2) + Math.pow(b[1], 2) - 2 * b[1] * E - Math.pow(p, 2), A = [[1 / 0, 1 / 0], [1 / 0, 1 / 0]];
|
|
1074
|
+
if (Math.sqrt(Math.pow(Y, 2) - 4 * j * Q) >= 0) {
|
|
1075
|
+
let B = (-Y + Math.sqrt(Math.pow(Y, 2) - 4 * j * Q)) / (2 * j), et = (-Y - Math.sqrt(Math.pow(Y, 2) - 4 * j * Q)) / (2 * j), wt = w * B + E, Et = w * et + E;
|
|
1076
|
+
A = [[B, wt], [et, Et]];
|
|
1077
1077
|
} else
|
|
1078
1078
|
console.error("The line and the circumference do not intersect");
|
|
1079
1079
|
return A;
|
|
@@ -1225,7 +1225,7 @@ var we;
|
|
|
1225
1225
|
})(t.Query || (t.Query = {}));
|
|
1226
1226
|
})(c.URL || (c.URL = {}));
|
|
1227
1227
|
})(we || (we = {}));
|
|
1228
|
-
const
|
|
1228
|
+
const Fs = class Fs {
|
|
1229
1229
|
constructor() {
|
|
1230
1230
|
this._state = /* @__PURE__ */ new Map(), this.listeners = /* @__PURE__ */ new Map();
|
|
1231
1231
|
}
|
|
@@ -1264,8 +1264,8 @@ const Ds = class Ds {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
};
|
|
1267
|
-
l(
|
|
1268
|
-
let
|
|
1267
|
+
l(Fs, "EventBus");
|
|
1268
|
+
let Ge = Fs;
|
|
1269
1269
|
const { ArrayTools: li } = we, me = class me extends Array {
|
|
1270
1270
|
constructor(...t) {
|
|
1271
1271
|
super(...t);
|
|
@@ -1307,14 +1307,14 @@ const { ArrayTools: li } = we, me = class me extends Array {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
n.push(o);
|
|
1309
1309
|
}
|
|
1310
|
-
return
|
|
1310
|
+
return he("Recurse results: ", n), n;
|
|
1311
1311
|
}
|
|
1312
1312
|
};
|
|
1313
1313
|
l(me, "LayerArray");
|
|
1314
|
-
let
|
|
1315
|
-
const
|
|
1314
|
+
let se = me;
|
|
1315
|
+
const Ds = class Ds {
|
|
1316
1316
|
constructor(t, e, s) {
|
|
1317
|
-
this.__state__ = new
|
|
1317
|
+
this.__state__ = new Ge(), this.scale_x = 1, this.scale_y = 1, this.scale_objects = !0, this.layers = new se(), this.objects = /* @__PURE__ */ new Map(), this.visible = !0, this.ID = t, this.name = e.name || `layer-${t}`, this.tabindex = e.tabindex, this.parent = s, this._transform = new xe(), s == null || s.__state__.addListener("graph_updated", "live", ({ key: i, newValue: n, oldValue: r }) => {
|
|
1318
1318
|
}), s == null || s.__state__.addListener(`graph_updated_${this.name}`, "live", ({ key: i, newValue: n, oldValue: r }) => {
|
|
1319
1319
|
this.objects = n, this.__state__.setVariable("layer_updated", this);
|
|
1320
1320
|
});
|
|
@@ -1326,47 +1326,47 @@ const js = class js {
|
|
|
1326
1326
|
this._transform = t;
|
|
1327
1327
|
}
|
|
1328
1328
|
};
|
|
1329
|
-
l(
|
|
1330
|
-
let
|
|
1331
|
-
var
|
|
1332
|
-
const
|
|
1329
|
+
l(Ds, "Layer");
|
|
1330
|
+
let As = Ds;
|
|
1331
|
+
var Ut, Ot;
|
|
1332
|
+
const os = class os extends Array {
|
|
1333
1333
|
constructor(...e) {
|
|
1334
1334
|
super(arguments.length);
|
|
1335
|
-
|
|
1336
|
-
|
|
1335
|
+
nt(this, Ut, !1);
|
|
1336
|
+
nt(this, Ot);
|
|
1337
1337
|
for (let s = 0; s < e.length; s++)
|
|
1338
1338
|
this[s] = e[s];
|
|
1339
|
-
W(this,
|
|
1339
|
+
W(this, Ut, !1);
|
|
1340
1340
|
}
|
|
1341
1341
|
static fromArray(e) {
|
|
1342
|
-
const s = new
|
|
1342
|
+
const s = new os();
|
|
1343
1343
|
return e.forEach((i, n) => {
|
|
1344
1344
|
s.push(i);
|
|
1345
1345
|
}), W(s, Ot, e.names), s;
|
|
1346
1346
|
}
|
|
1347
1347
|
flip() {
|
|
1348
|
-
W(this,
|
|
1348
|
+
W(this, Ut, !R(this, Ut));
|
|
1349
1349
|
for (let e = 0; e < this.length; e++)
|
|
1350
1350
|
this[e] = -this[e];
|
|
1351
1351
|
return this;
|
|
1352
1352
|
}
|
|
1353
1353
|
get(e) {
|
|
1354
|
-
return typeof e == "number" ? this[e] :
|
|
1354
|
+
return typeof e == "number" ? this[e] : R(this, Ot) && R(this, Ot).includes(e) ? this[R(this, Ot).indexOf(e)] : void 0;
|
|
1355
1355
|
}
|
|
1356
1356
|
get flipped() {
|
|
1357
|
-
return
|
|
1357
|
+
return R(this, Ut);
|
|
1358
1358
|
}
|
|
1359
1359
|
get names() {
|
|
1360
|
-
return
|
|
1360
|
+
return R(this, Ot) ? R(this, Ot) : this.map((e, s) => `V${s + 1}`);
|
|
1361
1361
|
}
|
|
1362
1362
|
};
|
|
1363
|
-
|
|
1364
|
-
let
|
|
1365
|
-
const
|
|
1363
|
+
Ut = new WeakMap(), Ot = new WeakMap(), l(os, "DimensionVector");
|
|
1364
|
+
let Gt = os;
|
|
1365
|
+
const js = class js {
|
|
1366
1366
|
constructor(t, e) {
|
|
1367
|
-
this.scale_x = 1, this.scale_y = 1, this.scale_size = 0.05, this.active = !1, this.visible = !1, this.highlighting = !1, this.meta = {}, this._x = 0, this._y = 0, this._highlight_default = new
|
|
1367
|
+
this.scale_x = 1, this.scale_y = 1, this.scale_size = 0.05, this.active = !1, this.visible = !1, this.highlighting = !1, this.meta = {}, this._x = 0, this._y = 0, this._highlight_default = new at("#000000"), this._size = 0, this.ID = e.ID, this._transform = new xe(), t instanceof Gt ? this._dimensions = t : t instanceof ae ? this._dimensions = Gt.fromArray(t) : Array.isArray(t) ? this._dimensions = new Gt(...t) : (console.warn("Invalid dimensions provided, using default DimensionVector(0, 0)"), this._dimensions = new Gt(0, 0));
|
|
1368
1368
|
let s = { ...e };
|
|
1369
|
-
this._original = { ...s }, this.ID = s.ID, this.x = s.x || this._dimensions[0], this.y = s.y || this._dimensions[1], this._size = s.size || 1, this._color = s.color || new
|
|
1369
|
+
this._original = { ...s }, this.ID = s.ID, this.x = s.x || this._dimensions[0], this.y = s.y || this._dimensions[1], this._size = s.size || 1, this._color = s.color || new at("#000000"), this.active = s.active || !1, this.shape = s.shape || null, this.meta = s.meta || {}, this._highlight = this._highlight_default, s.highlight && (this._highlight = s.highlight);
|
|
1370
1370
|
}
|
|
1371
1371
|
get dimensions() {
|
|
1372
1372
|
return this._dimensions;
|
|
@@ -1418,9 +1418,9 @@ const Ys = class Ys {
|
|
|
1418
1418
|
this._transform = t;
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
|
-
l(
|
|
1422
|
-
let
|
|
1423
|
-
const
|
|
1421
|
+
l(js, "PlottedObject");
|
|
1422
|
+
let Ft = js;
|
|
1423
|
+
const Ys = class Ys extends Ft {
|
|
1424
1424
|
// constructor(x: LineOptions) {
|
|
1425
1425
|
// super([], x);
|
|
1426
1426
|
// // const data = Object.assign({}, x);
|
|
@@ -1462,9 +1462,9 @@ const qs = class qs extends Tt {
|
|
|
1462
1462
|
this._color = t;
|
|
1463
1463
|
}
|
|
1464
1464
|
};
|
|
1465
|
-
l(
|
|
1466
|
-
let
|
|
1467
|
-
const pe = class pe extends
|
|
1465
|
+
l(Ys, "Line");
|
|
1466
|
+
let ce = Ys;
|
|
1467
|
+
const pe = class pe extends Ft {
|
|
1468
1468
|
// constructor(dimensions: DimensionType, o: PointOptions) { //, graph?: any) {
|
|
1469
1469
|
// super(dimensions, o);
|
|
1470
1470
|
// this.active = o.active || false;
|
|
@@ -1480,7 +1480,7 @@ const pe = class pe extends Tt {
|
|
|
1480
1480
|
constructor(t) {
|
|
1481
1481
|
var n, r;
|
|
1482
1482
|
let e, s, i;
|
|
1483
|
-
t ? t instanceof
|
|
1483
|
+
t ? t instanceof ae ? (e = (n = t.classes) == null ? void 0 : n.map((o, a) => o === "ena.co.occurrence" || o === "ena.dimension" ? t[a] : -1).filter((o) => o !== -1), s = (r = t.classes) == null ? void 0 : r.map((o, a) => o === "ena.metadata" ? [t.names[a], t[a]] : null).filter((o) => o !== null).reduce((o, a) => (o[a[0]] = a[1], o), {}), i = t.rowName || `point-${Math.random().toString(36).substring(2, 9)}`) : typeof t == "object" ? (e = t.dimensions || [], s = t.meta || {}, i = t.ID || `point-${Math.random().toString(36).substring(2, 9)}`) : (console.warn("Invalid data provided for Point, using default values"), e = [], s = {}, i = `point-${Math.random().toString(36).substring(2, 9)}`) : (e = [], s = {}, i = `point-${Math.random().toString(36).substring(2, 9)}`), super(e ?? [], { meta: s, ID: i }), this.edges = /* @__PURE__ */ new Map(), this.shape = pe.SHAPES.CIRCLE;
|
|
1484
1484
|
}
|
|
1485
1485
|
set label(t) {
|
|
1486
1486
|
this._label = t;
|
|
@@ -1502,8 +1502,8 @@ const pe = class pe extends Tt {
|
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
1504
|
l(pe, "Point"), pe.SHAPES = { CIRCLE: "circle", SQUARE: "rect" };
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1505
|
+
let tt = pe;
|
|
1506
|
+
const Qt = class Qt extends Ft {
|
|
1507
1507
|
constructor(t, e) {
|
|
1508
1508
|
super(e.dimensions, e), this._visible = !1, this.offset = 0, this.text = t, this.ID = e.ID, this.object = e, this.x = this.dimensions[0], this.y = this.dimensions[1], this.offset = e.size || 0, this.size = this.offset / 4, this.visible = !1, this._transform.set("e", 1), this._transform.set("f", 1);
|
|
1509
1509
|
}
|
|
@@ -1526,9 +1526,9 @@ const Jt = class Jt extends Tt {
|
|
|
1526
1526
|
this._transform = t;
|
|
1527
1527
|
}
|
|
1528
1528
|
};
|
|
1529
|
-
l(
|
|
1530
|
-
let U =
|
|
1531
|
-
const
|
|
1529
|
+
l(Qt, "Label"), Qt.DISPLAY_TYPES = { OFF: 0, AUTO: 1, CLICK: 2, ON: 3 }, Qt.HIGHLIGHT = { OFF: 0, ON: 2 }, Qt.POSITION = { OBJECT: 1, STATIC: 2, CONTAINER: 3, CUSTOM: 4 };
|
|
1530
|
+
let U = Qt;
|
|
1531
|
+
const qs = class qs {
|
|
1532
1532
|
constructor(t, e, s = 0, i = 0) {
|
|
1533
1533
|
this.x_max = t, this.y_max = e, this.cx = s, this.cy = i;
|
|
1534
1534
|
}
|
|
@@ -1561,9 +1561,9 @@ const Bs = class Bs {
|
|
|
1561
1561
|
return this.x_max;
|
|
1562
1562
|
}
|
|
1563
1563
|
};
|
|
1564
|
-
l(
|
|
1565
|
-
let
|
|
1566
|
-
const
|
|
1564
|
+
l(qs, "Extremes");
|
|
1565
|
+
let Tt = qs;
|
|
1566
|
+
const Bs = class Bs extends Ft {
|
|
1567
1567
|
constructor(t, e) {
|
|
1568
1568
|
super(t, e), this.visible = !0, this.size = e.size;
|
|
1569
1569
|
}
|
|
@@ -1589,8 +1589,8 @@ const Gs = class Gs extends Tt {
|
|
|
1589
1589
|
return this._transform;
|
|
1590
1590
|
}
|
|
1591
1591
|
};
|
|
1592
|
-
l(
|
|
1593
|
-
let
|
|
1592
|
+
l(Bs, "AxisPoint");
|
|
1593
|
+
let Ss = Bs, Si = {
|
|
1594
1594
|
GRAPH: {
|
|
1595
1595
|
ratio: 1,
|
|
1596
1596
|
x_max: 1,
|
|
@@ -1615,12 +1615,12 @@ let Ns = Gs, Ai = {
|
|
|
1615
1615
|
active: 2,
|
|
1616
1616
|
size: 0.05,
|
|
1617
1617
|
color: "#000",
|
|
1618
|
-
shape:
|
|
1618
|
+
shape: tt.SHAPES.CIRCLE,
|
|
1619
1619
|
labels: U.DISPLAY_TYPES.AUTO,
|
|
1620
1620
|
labelposition: U.POSITION.OBJECT
|
|
1621
1621
|
},
|
|
1622
1622
|
MEAN: {
|
|
1623
|
-
shape:
|
|
1623
|
+
shape: tt.SHAPES.SQUARE,
|
|
1624
1624
|
labels: U.DISPLAY_TYPES.AUTO
|
|
1625
1625
|
},
|
|
1626
1626
|
LABEL: {
|
|
@@ -1632,9 +1632,9 @@ let Ns = Gs, Ai = {
|
|
|
1632
1632
|
multiplier: 1
|
|
1633
1633
|
}
|
|
1634
1634
|
};
|
|
1635
|
-
const
|
|
1636
|
-
constructor(t = { ...
|
|
1637
|
-
this.__state__ = new
|
|
1635
|
+
const Gs = class Gs {
|
|
1636
|
+
constructor(t = { ...Si }) {
|
|
1637
|
+
this.__state__ = new Ge(), this.name = "unnamed-graph", this.origin = void 0, this.points = /* @__PURE__ */ new Map(), this.nodes = /* @__PURE__ */ new Map(), this.edges = /* @__PURE__ */ new Map(), this.trajectories = /* @__PURE__ */ new Map(), this.labels = /* @__PURE__ */ new Map(), this.transform = new xe(), this.scale_x = 1, this.scale_y = 1, this.SIZE_EFFECT = 1, this._mirror_y = !0, this._mirror_x = !1, this._layers = new se(
|
|
1638
1638
|
{ name: "graph", tabindex: 0, layers: [
|
|
1639
1639
|
{
|
|
1640
1640
|
name: "axes",
|
|
@@ -1673,8 +1673,8 @@ const Us = class Us {
|
|
|
1673
1673
|
{ name: "points", layers: [], tabindex: 0 },
|
|
1674
1674
|
{ name: "labels", layers: [], tabindex: 0 }
|
|
1675
1675
|
] }
|
|
1676
|
-
), this.options = t, this.origin = new
|
|
1677
|
-
new
|
|
1676
|
+
), this.options = t, this.origin = new Ss(
|
|
1677
|
+
new Gt(0, 0),
|
|
1678
1678
|
{
|
|
1679
1679
|
ID: "origin",
|
|
1680
1680
|
x: 0,
|
|
@@ -1682,35 +1682,35 @@ const Us = class Us {
|
|
|
1682
1682
|
size: 0,
|
|
1683
1683
|
meta: {},
|
|
1684
1684
|
graph: this,
|
|
1685
|
-
color: new
|
|
1686
|
-
highlight: new
|
|
1685
|
+
color: new at("#FFFFFF"),
|
|
1686
|
+
highlight: new at("#FFFFFF"),
|
|
1687
1687
|
active: !1
|
|
1688
1688
|
}
|
|
1689
1689
|
);
|
|
1690
1690
|
let e = 1;
|
|
1691
1691
|
function s(r, o, a) {
|
|
1692
|
-
const h = new
|
|
1693
|
-
return e += 1, h.parent = o || void 0, r.layers && Array.isArray(r.layers) && (h.layers = new
|
|
1692
|
+
const h = new As(`${e}`, r, a);
|
|
1693
|
+
return e += 1, h.parent = o || void 0, r.layers && Array.isArray(r.layers) && (h.layers = new se(...r.layers.map((g) => s(g, h, a)))), h;
|
|
1694
1694
|
}
|
|
1695
|
-
l(s, "buildLayerTree"), this.layers = new
|
|
1695
|
+
l(s, "buildLayerTree"), this.layers = new se(...this._layers.map((r) => s(r, null, this)));
|
|
1696
1696
|
let i = this.layers.search("layers", "axis_points");
|
|
1697
1697
|
i && i.objects.set(this.origin.ID, this.origin);
|
|
1698
1698
|
let n = this.layers.search("layers", "axis_lines");
|
|
1699
1699
|
if (n) {
|
|
1700
|
-
let r = this.extremes || new
|
|
1700
|
+
let r = this.extremes || new Tt(1, 1), o = new ce(
|
|
1701
1701
|
{},
|
|
1702
|
-
new
|
|
1703
|
-
new
|
|
1702
|
+
new tt({ ID: "axis-x-start", dimensions: [-r.x_max, 0], classes: ["ena.dimension", "ena.dimension"] }),
|
|
1703
|
+
new tt({ ID: "axis-x-end", dimensions: [r.x_max, 0], classes: ["ena.dimension", "ena.dimension"] })
|
|
1704
1704
|
);
|
|
1705
1705
|
o.ID = "axis-x", n.objects.set(o.ID, o);
|
|
1706
|
-
let a = new
|
|
1706
|
+
let a = new ce(
|
|
1707
1707
|
{},
|
|
1708
|
-
new
|
|
1709
|
-
new
|
|
1708
|
+
new tt({ ID: "axis-y-start", dimensions: [0, -r.y_max], classes: ["ena.dimension", "ena.dimension"] }),
|
|
1709
|
+
new tt({ ID: "axis-y-end", dimensions: [0, r.y_max], classes: ["ena.dimension", "ena.dimension"] })
|
|
1710
1710
|
);
|
|
1711
|
-
a.ID = "axis-y", n.objects.set(a.ID, a),
|
|
1711
|
+
a.ID = "axis-y", n.objects.set(a.ID, a), he("Added axis lines to layer: ", n);
|
|
1712
1712
|
}
|
|
1713
|
-
this.extremes = new
|
|
1713
|
+
this.extremes = new Tt(t.GRAPH.x_max, t.GRAPH.y_max);
|
|
1714
1714
|
}
|
|
1715
1715
|
set extremes(t) {
|
|
1716
1716
|
this._extremes = t;
|
|
@@ -1737,7 +1737,7 @@ const Us = class Us {
|
|
|
1737
1737
|
return this.mirror_y ? -1 : 1;
|
|
1738
1738
|
}
|
|
1739
1739
|
add_point(t) {
|
|
1740
|
-
const e = new
|
|
1740
|
+
const e = new tt(t);
|
|
1741
1741
|
this.points.set(e.ID, e);
|
|
1742
1742
|
}
|
|
1743
1743
|
add_points(t) {
|
|
@@ -1774,14 +1774,14 @@ const Us = class Us {
|
|
|
1774
1774
|
this.layers.search("layers", "nodes")
|
|
1775
1775
|
].filter((s) => s !== void 0);
|
|
1776
1776
|
if (e.length === 0)
|
|
1777
|
-
this.extremes = new
|
|
1777
|
+
this.extremes = new Tt(1, 1);
|
|
1778
1778
|
else {
|
|
1779
1779
|
let s = 1 / 0, i = -1 / 0, n = 1 / 0, r = -1 / 0;
|
|
1780
1780
|
e.forEach((m) => m.objects.forEach((_) => {
|
|
1781
1781
|
Number.isFinite(_.x) && (s = Math.min(s, _.x), i = Math.max(i, _.x)), Number.isFinite(_.y) && (n = Math.min(n, _.y), r = Math.max(r, _.y));
|
|
1782
1782
|
}));
|
|
1783
1783
|
const o = Number.isFinite(s) && Number.isFinite(n), a = t && o ? (s + i) / 2 : 0, h = t && o ? (n + r) / 2 : 0, g = o ? Math.max(Math.abs(s - a), Math.abs(i - a), Math.abs(n - h), Math.abs(r - h)) : 0, f = (g > 0 ? g : 1) * 1.3;
|
|
1784
|
-
this.extremes = new
|
|
1784
|
+
this.extremes = new Tt(f, f, a, h);
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
1787
|
/** Farthest node from (cx, cy), on either axis */
|
|
@@ -1797,11 +1797,11 @@ const Us = class Us {
|
|
|
1797
1797
|
return Math.min(1, e / (Math.sqrt(s) * t));
|
|
1798
1798
|
}
|
|
1799
1799
|
};
|
|
1800
|
-
l(
|
|
1801
|
-
let
|
|
1802
|
-
const
|
|
1803
|
-
constructor(t =
|
|
1804
|
-
if (super(), this.element = null, this.object = null, this.doc = t,
|
|
1800
|
+
l(Gs, "Graph");
|
|
1801
|
+
let Ns = Gs;
|
|
1802
|
+
const as = class as extends Nt {
|
|
1803
|
+
constructor(t = vi()) {
|
|
1804
|
+
if (super(), this.element = null, this.object = null, this.doc = t, Ai(t)) return;
|
|
1805
1805
|
const e = this, s = e.attachShadow({ mode: "open" }), i = t.createElement("style"), n = t.createElement("div");
|
|
1806
1806
|
i.textContent = this.constructor.style, s.appendChild(i), n.setAttribute("class", "wrapper"), s.appendChild(n);
|
|
1807
1807
|
}
|
|
@@ -1810,7 +1810,7 @@ const hs = class hs extends Nt {
|
|
|
1810
1810
|
return e == null ? void 0 : e.querySelector(".wrapper");
|
|
1811
1811
|
}
|
|
1812
1812
|
};
|
|
1813
|
-
l(
|
|
1813
|
+
l(as, "DrawableElement"), as.style = `
|
|
1814
1814
|
:host {
|
|
1815
1815
|
max-width: 100%;
|
|
1816
1816
|
display: block;
|
|
@@ -1821,21 +1821,21 @@ l(hs, "DrawableElement"), hs.style = `
|
|
|
1821
1821
|
justify-content: center;
|
|
1822
1822
|
}
|
|
1823
1823
|
`;
|
|
1824
|
-
let
|
|
1825
|
-
const
|
|
1826
|
-
function ci(c, t =
|
|
1824
|
+
let Ue = as;
|
|
1825
|
+
const Qi = 1e-8;
|
|
1826
|
+
function ci(c, t = Qi) {
|
|
1827
1827
|
return c.filter((e) => Math.abs(e.x) > t || Math.abs(e.y) > t);
|
|
1828
1828
|
}
|
|
1829
1829
|
l(ci, "nearOriginFilter");
|
|
1830
|
-
function
|
|
1830
|
+
function Ni(c) {
|
|
1831
1831
|
if (c <= 0) return [];
|
|
1832
1832
|
if (c === 1) return [0];
|
|
1833
1833
|
const t = new Array(c);
|
|
1834
1834
|
for (let e = 0; e < c; e++) t[e] = e / (c - 1);
|
|
1835
1835
|
return t;
|
|
1836
1836
|
}
|
|
1837
|
-
l(
|
|
1838
|
-
function
|
|
1837
|
+
l(Ni, "normalizedT");
|
|
1838
|
+
function Mi(c, t) {
|
|
1839
1839
|
return c.map((e) => {
|
|
1840
1840
|
const s = new Array(t + 1);
|
|
1841
1841
|
let i = 1;
|
|
@@ -1844,7 +1844,7 @@ function Ni(c, t) {
|
|
|
1844
1844
|
return s;
|
|
1845
1845
|
});
|
|
1846
1846
|
}
|
|
1847
|
-
l(
|
|
1847
|
+
l(Mi, "design");
|
|
1848
1848
|
function Ei(c) {
|
|
1849
1849
|
const t = c.length, e = c[0].length, s = c.map((n) => n.slice()), i = Array.from({ length: e }, () => new Array(e).fill(0));
|
|
1850
1850
|
for (let n = 0; n < e; n++) {
|
|
@@ -1872,7 +1872,7 @@ function Ms(c, t) {
|
|
|
1872
1872
|
return i;
|
|
1873
1873
|
}
|
|
1874
1874
|
l(Ms, "qtY");
|
|
1875
|
-
function
|
|
1875
|
+
function Es(c, t) {
|
|
1876
1876
|
const e = t.length, s = new Array(e).fill(0);
|
|
1877
1877
|
for (let i = e - 1; i >= 0; i--) {
|
|
1878
1878
|
let n = t[i];
|
|
@@ -1881,18 +1881,18 @@ function ks(c, t) {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
return s;
|
|
1883
1883
|
}
|
|
1884
|
-
l(
|
|
1885
|
-
function
|
|
1884
|
+
l(Es, "backSolve");
|
|
1885
|
+
function tn(c) {
|
|
1886
1886
|
return c.map((t) => {
|
|
1887
1887
|
let e = 0;
|
|
1888
1888
|
for (let s = 0; s < t.length; s++) e += t[s] * t[s];
|
|
1889
1889
|
return e;
|
|
1890
1890
|
});
|
|
1891
1891
|
}
|
|
1892
|
-
l(
|
|
1892
|
+
l(tn, "leverages");
|
|
1893
1893
|
function ui(c, t, e) {
|
|
1894
|
-
const s =
|
|
1895
|
-
return
|
|
1894
|
+
const s = Mi(c, e), { Q: i, R: n } = Ei(s);
|
|
1895
|
+
return Es(n, Ms(i, t));
|
|
1896
1896
|
}
|
|
1897
1897
|
l(ui, "fitCoeffs");
|
|
1898
1898
|
function We(c, t) {
|
|
@@ -1902,8 +1902,8 @@ function We(c, t) {
|
|
|
1902
1902
|
return e;
|
|
1903
1903
|
}
|
|
1904
1904
|
l(We, "evalPoly");
|
|
1905
|
-
function
|
|
1906
|
-
const i =
|
|
1905
|
+
function en(c, t, e, s) {
|
|
1906
|
+
const i = Mi(c, s), { Q: n, R: r } = Ei(i), o = tn(n), a = Es(r, Ms(n, t)), h = Es(r, Ms(n, e));
|
|
1907
1907
|
let g = 0;
|
|
1908
1908
|
for (let f = 0; f < c.length; f++) {
|
|
1909
1909
|
const m = 1 - o[f];
|
|
@@ -1913,29 +1913,29 @@ function tn(c, t, e, s) {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
return g;
|
|
1915
1915
|
}
|
|
1916
|
-
l(
|
|
1917
|
-
function
|
|
1916
|
+
l(en, "loocv2d");
|
|
1917
|
+
function sn(c, t, e) {
|
|
1918
1918
|
const s = c.length, i = Math.min(Math.max(1, Math.floor(t)), Math.max(1, s - 1));
|
|
1919
1919
|
if (e === "fixed" || s < 3) return i;
|
|
1920
|
-
const n =
|
|
1920
|
+
const n = Ni(s), r = c.map((g) => g.x), o = c.map((g) => g.y);
|
|
1921
1921
|
let a = 1, h = 1 / 0;
|
|
1922
1922
|
for (let g = 1; g <= i; g++) {
|
|
1923
|
-
const f =
|
|
1923
|
+
const f = en(n, r, o, g);
|
|
1924
1924
|
f < h && (h = f, a = g);
|
|
1925
1925
|
}
|
|
1926
1926
|
return a;
|
|
1927
1927
|
}
|
|
1928
|
-
l(
|
|
1929
|
-
function
|
|
1928
|
+
l(sn, "selectDegree");
|
|
1929
|
+
function nn(c, t) {
|
|
1930
1930
|
const e = ci(c);
|
|
1931
1931
|
if (e.length < 3) return null;
|
|
1932
1932
|
const s = t.selectionSet ? ci(t.selectionSet) : e, i = s.length >= 3 ? s : e;
|
|
1933
|
-
let n =
|
|
1933
|
+
let n = sn(i, t.maxDegree, t.degreeSelection);
|
|
1934
1934
|
n = Math.min(n, Math.max(1, e.length - 1));
|
|
1935
|
-
const r =
|
|
1935
|
+
const r = Ni(e.length), o = ui(r, e.map((h) => h.x), n), a = ui(r, e.map((h) => h.y), n);
|
|
1936
1936
|
return { degree: n, coeffsX: o, coeffsY: a };
|
|
1937
1937
|
}
|
|
1938
|
-
l(
|
|
1938
|
+
l(nn, "fitTrajectory");
|
|
1939
1939
|
function _i(c, t = 100) {
|
|
1940
1940
|
const e = [];
|
|
1941
1941
|
for (let s = 0; s <= t; s++) {
|
|
@@ -1945,9 +1945,9 @@ function _i(c, t = 100) {
|
|
|
1945
1945
|
return e;
|
|
1946
1946
|
}
|
|
1947
1947
|
l(_i, "sampleCurve");
|
|
1948
|
-
const di = 100,
|
|
1948
|
+
const di = 100, Us = class Us extends Ft {
|
|
1949
1949
|
constructor(t = {}) {
|
|
1950
|
-
const e = t.color instanceof
|
|
1950
|
+
const e = t.color instanceof at ? t.color : new at(typeof t.color == "string" ? t.color : "#000000");
|
|
1951
1951
|
super([], {
|
|
1952
1952
|
ID: t.ID || `traj-${Math.random().toString(36).substring(2, 9)}`,
|
|
1953
1953
|
size: t.size || 1,
|
|
@@ -1957,8 +1957,8 @@ const di = 100, Xs = class Xs extends Tt {
|
|
|
1957
1957
|
meta: t.meta || {},
|
|
1958
1958
|
...t
|
|
1959
1959
|
}), this._typeName = "Trajectory", this.trajPoints = [], this.smooth = "none", this.maxDegree = 3, this.degreeSelection = "loocv_2d", this.selectedDegree = -1, this.polyCoeffsX = [], this.polyCoeffsY = [], this.currentTime = 1 / 0, this.showPoints = !0, this.showTips = !0, this.lineStyle = "uniform", this.strokeWidth = 2, this.strokeWidthRange = [1, 6], this.opacityRange = [0.3, 1], this.smooth = t.smooth || "none", this.maxDegree = t.maxDegree !== void 0 ? t.maxDegree : 3, this.degreeSelection = t.degreeSelection || "loocv_2d", this.polyCoeffsX = t.polyCoeffsX || [], this.polyCoeffsY = t.polyCoeffsY || [], this.currentTime = t.currentTime !== void 0 ? t.currentTime : 1 / 0, this.showPoints = t.showPoints !== void 0 ? t.showPoints : !0, this.showTips = t.showTips !== void 0 ? t.showTips : !0, this.lineStyle = t.lineStyle || "uniform", this.strokeWidth = t.strokeWidth || 2, this.strokeWidthRange = t.strokeWidthRange || [1, 6], this.opacityRange = t.opacityRange || [0.3, 1], t.points && Array.isArray(t.points) && (this.trajPoints = t.points.map((s) => {
|
|
1960
|
-
if (s instanceof
|
|
1961
|
-
const i = new
|
|
1960
|
+
if (s instanceof tt) return s;
|
|
1961
|
+
const i = new tt({ dimensions: [s.x, s.y], meta: { time: s.time, label: s.label } });
|
|
1962
1962
|
return i.x = s.x, i.y = s.y, i;
|
|
1963
1963
|
}));
|
|
1964
1964
|
}
|
|
@@ -1977,7 +1977,7 @@ const di = 100, Xs = class Xs extends Tt {
|
|
|
1977
1977
|
{ degree: this.polyCoeffsX.length - 1, coeffsX: this.polyCoeffsX, coeffsY: this.polyCoeffsY },
|
|
1978
1978
|
di
|
|
1979
1979
|
);
|
|
1980
|
-
const e =
|
|
1980
|
+
const e = nn(
|
|
1981
1981
|
t.map((s) => ({ x: s.x, y: s.y })),
|
|
1982
1982
|
{
|
|
1983
1983
|
maxDegree: this.maxDegree,
|
|
@@ -1991,9 +1991,9 @@ const di = 100, Xs = class Xs extends Tt {
|
|
|
1991
1991
|
return t.map((e) => ({ x: e.x, y: e.y }));
|
|
1992
1992
|
}
|
|
1993
1993
|
};
|
|
1994
|
-
l(
|
|
1995
|
-
let
|
|
1996
|
-
const
|
|
1994
|
+
l(Us, "Trajectory");
|
|
1995
|
+
let Xe = Us;
|
|
1996
|
+
const ki = 1, Ws = class Ws extends ce {
|
|
1997
1997
|
constructor(t, e, s, i = 0) {
|
|
1998
1998
|
super(t, e, s), this._totalweight = 0, this._weight = i;
|
|
1999
1999
|
}
|
|
@@ -2001,8 +2001,8 @@ const Mi = 1, Ws = class Ws extends le {
|
|
|
2001
2001
|
return this._color;
|
|
2002
2002
|
}
|
|
2003
2003
|
get color() {
|
|
2004
|
-
const t = this._color || new
|
|
2005
|
-
return new
|
|
2004
|
+
const t = this._color || new at("#000000");
|
|
2005
|
+
return new Be(t, Math.abs(this.weight));
|
|
2006
2006
|
}
|
|
2007
2007
|
set color(t) {
|
|
2008
2008
|
this._color = t;
|
|
@@ -2024,43 +2024,43 @@ const Mi = 1, Ws = class Ws extends le {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
};
|
|
2026
2026
|
l(Ws, "Edge");
|
|
2027
|
-
let
|
|
2028
|
-
var
|
|
2029
|
-
const
|
|
2027
|
+
let He = Ws;
|
|
2028
|
+
var re;
|
|
2029
|
+
const Xs = class Xs extends Ft {
|
|
2030
2030
|
constructor(e) {
|
|
2031
2031
|
super(e.dimensions || [], e);
|
|
2032
|
-
|
|
2033
|
-
W(this,
|
|
2032
|
+
nt(this, re);
|
|
2033
|
+
W(this, re, e);
|
|
2034
2034
|
}
|
|
2035
2035
|
get edge() {
|
|
2036
|
-
return
|
|
2036
|
+
return R(this, re);
|
|
2037
2037
|
}
|
|
2038
2038
|
get path() {
|
|
2039
|
-
const e =
|
|
2039
|
+
const e = R(this, re), s = [e.to.x, e.to.y], i = e.from_point, [n, r] = e.base_pts, o = Math.hypot(i[0] - s[0], i[1] - s[1]), a = Math.hypot(n[0] - r[0], n[1] - r[1]);
|
|
2040
2040
|
if (!(o > 0) || !(a > 0)) return "";
|
|
2041
|
-
const h = [(i[0] - s[0]) / o, (i[1] - s[1]) / o], g = Math.hypot(n[0] - s[0], n[1] - s[1]), f = [(n[0] - s[0]) / g, (n[1] - s[1]) / g], m = /* @__PURE__ */ l((
|
|
2041
|
+
const h = [(i[0] - s[0]) / o, (i[1] - s[1]) / o], g = Math.hypot(n[0] - s[0], n[1] - s[1]), f = [(n[0] - s[0]) / g, (n[1] - s[1]) / g], m = /* @__PURE__ */ l((E) => a / 2 * Math.max(0, 1 - E / o), "halfW"), _ = /* @__PURE__ */ l((E, j) => `${s[0] + h[0] * E + f[0] * j} ${s[1] + h[1] * E + f[1] * j}`, "at"), d = 0.2 * o, u = Math.min(0.15 * o, 0.8 * 2 * m(d)), b = d + u / 2, p = d + u;
|
|
2042
2042
|
return `M${_(d, 0)} L${_(b, m(b))} L${_(p, m(p))} L${_(b, 0)} L${_(p, -m(p))} L${_(b, -m(b))}z`;
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2046
|
-
let
|
|
2047
|
-
var
|
|
2048
|
-
const
|
|
2045
|
+
re = new WeakMap(), l(Xs, "EdgeArrow");
|
|
2046
|
+
let Ve = Xs;
|
|
2047
|
+
var oe, Ce;
|
|
2048
|
+
const hs = class hs extends He {
|
|
2049
2049
|
constructor(e, s, i) {
|
|
2050
2050
|
super(e, s, i);
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
this._path = "", W(this,
|
|
2051
|
+
nt(this, oe);
|
|
2052
|
+
nt(this, Ce);
|
|
2053
|
+
this._path = "", W(this, oe, !1), this._directions = [
|
|
2054
2054
|
"from",
|
|
2055
2055
|
"to"
|
|
2056
2056
|
/* TO */
|
|
2057
|
-
], this.towards = "to",
|
|
2057
|
+
], this.towards = "to", R(this, oe) === !0 && W(this, Ce, new Ve(this));
|
|
2058
2058
|
}
|
|
2059
2059
|
get path() {
|
|
2060
2060
|
return `M${this.from.x} ${this.from.y} L${this.base_pts[0].join(" ")} L${this.base_pts[1].join(" ")}z`;
|
|
2061
2061
|
}
|
|
2062
2062
|
static calculate_base_points(e) {
|
|
2063
|
-
const s = e.towards, i = e._directions.find((b) => b !== e.towards), n = e[i].x, r = e[i].y, o = e[s].x, a = e[s].y, h = o - n, g = a - r, f = Math.hypot(h, g), m = (e.weight ?? 0) *
|
|
2063
|
+
const s = e.towards, i = e._directions.find((b) => b !== e.towards), n = e[i].x, r = e[i].y, o = e[s].x, a = e[s].y, h = o - n, g = a - r, f = Math.hypot(h, g), m = (e.weight ?? 0) * ki;
|
|
2064
2064
|
if (f === 0 || !isFinite(m) || m === 0)
|
|
2065
2065
|
return [[o, a], [o, a]];
|
|
2066
2066
|
const _ = -g / f, d = h / f, u = m / 2;
|
|
@@ -2070,21 +2070,21 @@ const ls = class ls extends Ve {
|
|
|
2070
2070
|
];
|
|
2071
2071
|
}
|
|
2072
2072
|
get base_pts() {
|
|
2073
|
-
return
|
|
2073
|
+
return hs.calculate_base_points(this);
|
|
2074
2074
|
}
|
|
2075
2075
|
get arrow() {
|
|
2076
|
-
return
|
|
2076
|
+
return R(this, Ce);
|
|
2077
2077
|
}
|
|
2078
2078
|
get with_arrow() {
|
|
2079
|
-
return
|
|
2079
|
+
return R(this, oe);
|
|
2080
2080
|
}
|
|
2081
2081
|
get from_point() {
|
|
2082
2082
|
return [this.from.x, this.from.y];
|
|
2083
2083
|
}
|
|
2084
2084
|
};
|
|
2085
|
-
|
|
2086
|
-
let
|
|
2087
|
-
const
|
|
2085
|
+
oe = new WeakMap(), Ce = new WeakMap(), l(hs, "TaperedEdge");
|
|
2086
|
+
let Wt = hs;
|
|
2087
|
+
const ls = class ls extends Wt {
|
|
2088
2088
|
constructor(t, e, s) {
|
|
2089
2089
|
super(t, e, s), this._dataWeight = 0, this._totalweight = t.totalweight ?? 0, this._dataWeight = t.weight ?? this._weight;
|
|
2090
2090
|
}
|
|
@@ -2092,21 +2092,21 @@ const cs = class cs extends Ut {
|
|
|
2092
2092
|
return we.Geometry.Line.interpolate(this.line)(1 - this._dataWeight / this._totalweight);
|
|
2093
2093
|
}
|
|
2094
2094
|
get base_pts() {
|
|
2095
|
-
return
|
|
2095
|
+
return Wt.calculate_base_points(this);
|
|
2096
2096
|
}
|
|
2097
2097
|
static build_path(t) {
|
|
2098
2098
|
return t._totalweight > 0 ? `M${t.weighted_midpoint[0]} ${t.weighted_midpoint[1]} L${t.base_pts[0].join(" ")} L${t.base_pts[1].join(" ")}z` : (console.error("TaperedWeightedMidpointEdge: No totalweight, returning empty path"), "");
|
|
2099
2099
|
}
|
|
2100
2100
|
get path() {
|
|
2101
|
-
return
|
|
2101
|
+
return ls.build_path(this);
|
|
2102
2102
|
}
|
|
2103
2103
|
get from_point() {
|
|
2104
2104
|
return this.weighted_midpoint;
|
|
2105
2105
|
}
|
|
2106
2106
|
};
|
|
2107
|
-
l(
|
|
2108
|
-
let
|
|
2109
|
-
const
|
|
2107
|
+
l(ls, "TaperedWeightedMidpointEdge");
|
|
2108
|
+
let ks = ls;
|
|
2109
|
+
const cs = class cs extends He {
|
|
2110
2110
|
constructor(t, e, s) {
|
|
2111
2111
|
super(t, e, s);
|
|
2112
2112
|
}
|
|
@@ -2115,14 +2115,14 @@ const us = class us extends Ve {
|
|
|
2115
2115
|
return `M ${i}, ${e.y} a ${s},${s} 0 1,0 ${n},0 a ${s},${s} 0 1,0 -${n},0`;
|
|
2116
2116
|
}
|
|
2117
2117
|
get path() {
|
|
2118
|
-
let t = this.weight *
|
|
2119
|
-
return
|
|
2118
|
+
let t = this.weight * ki;
|
|
2119
|
+
return cs.build_path(t, this.to);
|
|
2120
2120
|
}
|
|
2121
2121
|
};
|
|
2122
|
-
l(
|
|
2123
|
-
let
|
|
2124
|
-
const
|
|
2125
|
-
constructor(t, e, s, i = new
|
|
2122
|
+
l(cs, "NodeEdge");
|
|
2123
|
+
let ie = cs;
|
|
2124
|
+
const Hs = class Hs {
|
|
2125
|
+
constructor(t, e, s, i = new Dt()) {
|
|
2126
2126
|
this.__data__ = t, this.parent = e, this.graph = s, this.__children__ = i, this.svg_element = this.create();
|
|
2127
2127
|
}
|
|
2128
2128
|
get_size() {
|
|
@@ -2145,9 +2145,9 @@ const Vs = class Vs {
|
|
|
2145
2145
|
l(o, "animate"), requestAnimationFrame(o);
|
|
2146
2146
|
}
|
|
2147
2147
|
};
|
|
2148
|
-
l(
|
|
2149
|
-
let ve =
|
|
2150
|
-
const
|
|
2148
|
+
l(Hs, "Drawable");
|
|
2149
|
+
let ve = Hs;
|
|
2150
|
+
const rn = 0.04, on = [0.25, 1], an = [0.3, 1];
|
|
2151
2151
|
function gi(c, t, e, s) {
|
|
2152
2152
|
const i = Math.abs(c);
|
|
2153
2153
|
if (!(i > 0)) return 0;
|
|
@@ -2156,31 +2156,31 @@ function gi(c, t, e, s) {
|
|
|
2156
2156
|
return s[0] + n * (s[1] - s[0]);
|
|
2157
2157
|
}
|
|
2158
2158
|
l(gi, "rampFor");
|
|
2159
|
-
const
|
|
2160
|
-
function
|
|
2159
|
+
const hn = 0.011, ln = 0.75, cn = 0.8, un = 0.75, Ii = 6e-3, _n = 0.6;
|
|
2160
|
+
function dn(c) {
|
|
2161
2161
|
return 2 * c;
|
|
2162
2162
|
}
|
|
2163
|
-
l(
|
|
2164
|
-
function
|
|
2165
|
-
return c * t / (2 *
|
|
2163
|
+
l(dn, "widthPerWeight");
|
|
2164
|
+
function gn(c, t) {
|
|
2165
|
+
return c * t / (2 * Ii);
|
|
2166
2166
|
}
|
|
2167
|
-
l(
|
|
2168
|
-
function
|
|
2167
|
+
l(gn, "nodeSizeForEdges");
|
|
2168
|
+
function fn(c) {
|
|
2169
2169
|
const t = /rgba?\(([^)]+)\)/.exec(c);
|
|
2170
2170
|
if (!t) return c;
|
|
2171
2171
|
const [e, s, i, n = 1] = t[1].split(",").map(Number), r = /* @__PURE__ */ l((o) => Math.round(255 + (o - 255) * n), "f");
|
|
2172
2172
|
return `rgb(${r(e)},${r(s)},${r(i)})`;
|
|
2173
2173
|
}
|
|
2174
|
-
l(
|
|
2175
|
-
function
|
|
2174
|
+
l(fn, "flattenOnWhite");
|
|
2175
|
+
function mn(c, t) {
|
|
2176
2176
|
const e = /rgba?\(([^)]+)\)/.exec(c);
|
|
2177
2177
|
if (!e) return c;
|
|
2178
2178
|
const [s, i, n, r = 1] = e[1].split(",").map(Number);
|
|
2179
2179
|
return `rgba(${Math.round(s * t)},${Math.round(i * t)},${Math.round(n * t)},${r})`;
|
|
2180
2180
|
}
|
|
2181
|
-
l(
|
|
2182
|
-
const
|
|
2183
|
-
constructor(t, e, s, i = new
|
|
2181
|
+
l(mn, "darkenRgba");
|
|
2182
|
+
const Vs = class Vs extends ve {
|
|
2183
|
+
constructor(t, e, s, i = new Dt()) {
|
|
2184
2184
|
super(t, e, s, i), this.__data__ = t, this.parent = e, this.graph = s, this.__children__ = i, this.__name__ = "unnamed-line", this._arrow_el = null, this._hit_el = null, this.svg_element = this.create();
|
|
2185
2185
|
}
|
|
2186
2186
|
/** Stamp edge identity onto an element so <qe-graph> delegation can resolve
|
|
@@ -2193,11 +2193,11 @@ const Zs = class Zs extends ve {
|
|
|
2193
2193
|
s("data-edge-self", !!e.isSelf), s("data-edge-group", e.group), s("data-edge-unit", e.unit);
|
|
2194
2194
|
}
|
|
2195
2195
|
create() {
|
|
2196
|
-
if (this.__data__ instanceof
|
|
2196
|
+
if (this.__data__ instanceof ie) {
|
|
2197
2197
|
const e = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2198
2198
|
return e.setAttribute("fill", this.__data__.color.toString()), e.setAttribute("stroke", "none"), this.svg_element = e, e;
|
|
2199
2199
|
}
|
|
2200
|
-
if (this.__data__ instanceof
|
|
2200
|
+
if (this.__data__ instanceof Wt) {
|
|
2201
2201
|
const e = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
2202
2202
|
return e.setAttribute("fill", this.__data__.color.toString()), e.setAttribute("stroke", "none"), this.svg_element = e, e;
|
|
2203
2203
|
}
|
|
@@ -2206,7 +2206,7 @@ const Zs = class Zs extends ve {
|
|
|
2206
2206
|
}
|
|
2207
2207
|
/** Self and directed edges draw as a <path>, everything else as a <line>. */
|
|
2208
2208
|
get drawsPath() {
|
|
2209
|
-
return this.__data__ instanceof
|
|
2209
|
+
return this.__data__ instanceof ie || this.__data__ instanceof Wt;
|
|
2210
2210
|
}
|
|
2211
2211
|
update() {
|
|
2212
2212
|
var i, n, r, o;
|
|
@@ -2219,20 +2219,20 @@ const Zs = class Zs extends ve {
|
|
|
2219
2219
|
let s = !1;
|
|
2220
2220
|
if (e.isMeanEdge) {
|
|
2221
2221
|
this._stampEdge(this.svg_element);
|
|
2222
|
-
const a = typeof e.weight == "number" ? e.weight : 0, h = typeof e.maxWeight == "number" ? e.maxWeight : 1, g = typeof e.opacity == "number" ? e.opacity : Math.min(1, a / (h || 1)), f = t > 0 ? t : 1, m = e.fixedSize && this.graph.zoom_level || 1, _ = (typeof e.widthFrac == "number" ? f * e.widthFrac * a : f *
|
|
2223
|
-
if (this.__data__ instanceof
|
|
2222
|
+
const a = typeof e.weight == "number" ? e.weight : 0, h = typeof e.maxWeight == "number" ? e.maxWeight : 1, g = typeof e.opacity == "number" ? e.opacity : Math.min(1, a / (h || 1)), f = t > 0 ? t : 1, m = e.fixedSize && this.graph.zoom_level || 1, _ = (typeof e.widthFrac == "number" ? f * e.widthFrac * a : f * hn * (a / (h || 1))) / m, d = this.__data__._color || new at("#000000"), u = typeof e.saturation == "number" ? e.saturation : g, b = e.exactColor ? d.toString() : new Be(d, u, g).toString();
|
|
2223
|
+
if (this.__data__ instanceof ie) {
|
|
2224
2224
|
const p = typeof e.selfSize == "number" && e.selfSize > 0 ? e.selfSize : null, w = p != null ? (o = (r = this.graph)._nodeRadius) == null ? void 0 : o.call(r, String(e.source)) : null;
|
|
2225
2225
|
this.__data__.weight = typeof w == "number" ? 2 * p * w : _, this.svg_element.setAttribute("d", this.__data__.path), this.svg_element.setAttribute("fill", b), this.svg_element.setAttribute("stroke", "none");
|
|
2226
|
-
} else if (this.__data__ instanceof
|
|
2227
|
-
if (this.__data__.weight = _, this.svg_element.setAttribute("d", this.__data__.path), this.svg_element.setAttribute("fill", b), this.svg_element.setAttribute("stroke", b), this.svg_element.setAttribute("stroke-width", String(
|
|
2226
|
+
} else if (this.__data__ instanceof Wt) {
|
|
2227
|
+
if (this.__data__.weight = _, this.svg_element.setAttribute("d", this.__data__.path), this.svg_element.setAttribute("fill", b), this.svg_element.setAttribute("stroke", b), this.svg_element.setAttribute("stroke-width", String(ln)), this.svg_element.setAttribute("vector-effect", "non-scaling-stroke"), this.svg_element.setAttribute("stroke-linejoin", "round"), e.isDirected)
|
|
2228
2228
|
try {
|
|
2229
|
-
const w = new
|
|
2230
|
-
w && !w.includes("NaN") && !w.includes("Infinity") && (this._arrow_el || (this._arrow_el = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", "path"), this._arrow_el.setAttribute("stroke", "none")), this._arrow_el.parentElement || this.parent.appendChild(this._arrow_el), this._arrow_el.setAttribute("d", w), this._arrow_el.setAttribute("fill", fn(
|
|
2229
|
+
const w = new Ve(this.__data__).path;
|
|
2230
|
+
w && !w.includes("NaN") && !w.includes("Infinity") && (this._arrow_el || (this._arrow_el = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", "path"), this._arrow_el.setAttribute("stroke", "none")), this._arrow_el.parentElement || this.parent.appendChild(this._arrow_el), this._arrow_el.setAttribute("d", w), this._arrow_el.setAttribute("fill", mn(fn(b), cn)), this._arrow_el.setAttribute("stroke", "#ffffff"), this._arrow_el.setAttribute("stroke-width", String(un)), this._arrow_el.setAttribute("vector-effect", "non-scaling-stroke"), this._arrow_el.setAttribute("stroke-linejoin", "round"), s = !0);
|
|
2231
2231
|
} catch {
|
|
2232
2232
|
}
|
|
2233
2233
|
} else {
|
|
2234
|
-
const p = this.__data__.from.x, w = this.__data__.from.y,
|
|
2235
|
-
this.svg_element.setAttribute("x1", p.toString()), this.svg_element.setAttribute("y1", w.toString()), this.svg_element.setAttribute("x2",
|
|
2234
|
+
const p = this.__data__.from.x, w = this.__data__.from.y, E = this.__data__.to.x, j = this.__data__.to.y;
|
|
2235
|
+
this.svg_element.setAttribute("x1", p.toString()), this.svg_element.setAttribute("y1", w.toString()), this.svg_element.setAttribute("x2", E.toString()), this.svg_element.setAttribute("y2", j.toString()), this.svg_element.setAttribute("stroke-width", _.toString()), this.svg_element.setAttribute("stroke", b), this.svg_element.setAttribute("pointer-events", "stroke"), this.svg_element.removeAttribute("marker-end"), this._hit_el || (this._hit_el = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", "line"), this._hit_el.setAttribute("stroke", "transparent"), this._hit_el.setAttribute("stroke-linecap", "round"), this._hit_el.setAttribute("pointer-events", "stroke")), this._hit_el.parentElement || this.parent.appendChild(this._hit_el), this._hit_el.setAttribute("x1", p.toString()), this._hit_el.setAttribute("y1", w.toString()), this._hit_el.setAttribute("x2", E.toString()), this._hit_el.setAttribute("y2", j.toString()), this._hit_el.setAttribute("stroke-width", Math.max(_, t * 0.03 / m).toString()), this._stampEdge(this._hit_el);
|
|
2236
2236
|
}
|
|
2237
2237
|
} else {
|
|
2238
2238
|
this.svg_element.setAttribute("x1", this.__data__.from.x.toString()), this.svg_element.setAttribute("y1", this.__data__.from.y.toString()), this.svg_element.setAttribute("x2", this.__data__.to.x.toString()), this.svg_element.setAttribute("y2", this.__data__.to.y.toString());
|
|
@@ -2251,10 +2251,10 @@ const Zs = class Zs extends ve {
|
|
|
2251
2251
|
this._hit_el && ((t = this.parent) == null || t.appendChild(this._hit_el)), (e = this.parent) == null || e.appendChild(this.svg_element), this._arrow_el && ((s = this.parent) == null || s.appendChild(this._arrow_el));
|
|
2252
2252
|
}
|
|
2253
2253
|
};
|
|
2254
|
-
l(
|
|
2255
|
-
let Ct =
|
|
2256
|
-
const
|
|
2257
|
-
constructor(t, e, s, i = new
|
|
2254
|
+
l(Vs, "QELine");
|
|
2255
|
+
let Ct = Vs;
|
|
2256
|
+
const Zs = class Zs extends ve {
|
|
2257
|
+
constructor(t, e, s, i = new Dt()) {
|
|
2258
2258
|
super(t, e, s, i), this.__data__ = t, this.parent = e, this.graph = s, this.__children__ = i, this.__name__ = "unnamed-point", this.svg_element = this.create();
|
|
2259
2259
|
}
|
|
2260
2260
|
get x() {
|
|
@@ -2320,7 +2320,7 @@ const Ks = class Ks extends ve {
|
|
|
2320
2320
|
const f = (g = (h = this.graph.svg_element) == null ? void 0 : h.getBoundingClientRect) == null ? void 0 : g.call(h), m = this.graph.zoom_level || 1, _ = f && f.width > 0 ? f.width / (2 * t) : 1;
|
|
2321
2321
|
return this.__data__.size * 2 * e / _ / m;
|
|
2322
2322
|
}
|
|
2323
|
-
return t *
|
|
2323
|
+
return t * Ii * this.__data__.size * e;
|
|
2324
2324
|
}
|
|
2325
2325
|
/** Optional halo stroke (e.g. white outline on unit points to separate
|
|
2326
2326
|
* overlapping dots in dense clusters). Width scales with the dot so it holds
|
|
@@ -2362,10 +2362,10 @@ const Ks = class Ks extends ve {
|
|
|
2362
2362
|
(t = this.parent) == null || t.appendChild(this.svg_element);
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
l(
|
|
2366
|
-
let Ae =
|
|
2367
|
-
const
|
|
2368
|
-
constructor(t, e, s, i = new
|
|
2365
|
+
l(Zs, "QEPoint");
|
|
2366
|
+
let Ae = Zs;
|
|
2367
|
+
const Ks = class Ks extends ve {
|
|
2368
|
+
constructor(t, e, s, i = new Dt()) {
|
|
2369
2369
|
super(t, e, s, i), this.__data__ = t, this.parent = e, this.graph = s, this.__children__ = i, this.__name__ = "trajectory", this._path_el = null, this._segments_group = null, this._tip_el = null, this._points_group = null, this.svg_element = this.create();
|
|
2370
2370
|
}
|
|
2371
2371
|
// Trajectory styling is specified in display pixels, while SVG paths use
|
|
@@ -2418,9 +2418,9 @@ const Js = class Js extends ve {
|
|
|
2418
2418
|
this.svg_element && !this.svg_element.parentElement && this.parent.appendChild(this.svg_element), this.update();
|
|
2419
2419
|
}
|
|
2420
2420
|
};
|
|
2421
|
-
l(
|
|
2422
|
-
let
|
|
2423
|
-
const { ArrayTools: fi } = we,
|
|
2421
|
+
l(Ks, "QETrajectory");
|
|
2422
|
+
let Ze = Ks;
|
|
2423
|
+
const { ArrayTools: fi } = we, Js = class Js extends Array {
|
|
2424
2424
|
constructor(...t) {
|
|
2425
2425
|
super(...t);
|
|
2426
2426
|
}
|
|
@@ -2452,9 +2452,9 @@ const { ArrayTools: fi } = we, Qs = class Qs extends Array {
|
|
|
2452
2452
|
return this.reduce((t, e) => (t.push(e), e.layers && Array.isArray(e.layers) && t.push(...e.layers), t), []);
|
|
2453
2453
|
}
|
|
2454
2454
|
};
|
|
2455
|
-
l(
|
|
2456
|
-
let
|
|
2457
|
-
const
|
|
2455
|
+
l(Js, "QEArray");
|
|
2456
|
+
let Dt = Js;
|
|
2457
|
+
const pn = {
|
|
2458
2458
|
AxisPoint: Ae,
|
|
2459
2459
|
AxisLine: Ct,
|
|
2460
2460
|
Point: Ae,
|
|
@@ -2463,9 +2463,9 @@ const mn = {
|
|
|
2463
2463
|
TaperedEdge: Ct,
|
|
2464
2464
|
TaperedWeightedMidpointEdge: Ct,
|
|
2465
2465
|
NodeEdge: Ct,
|
|
2466
|
-
Trajectory:
|
|
2467
|
-
},
|
|
2468
|
-
constructor(t, e, s, i = new
|
|
2466
|
+
Trajectory: Ze
|
|
2467
|
+
}, te = class te {
|
|
2468
|
+
constructor(t, e, s, i = new Dt()) {
|
|
2469
2469
|
this.__data__ = t, this.parent = e, this.graph = s, this.__children__ = i, this.__name__ = t.name || "unnamed-layer", t.__state__.addListener("layer_updated", "live", ({ key: n, newValue: r, oldValue: o }) => {
|
|
2470
2470
|
const a = /* @__PURE__ */ l((m) => {
|
|
2471
2471
|
var _;
|
|
@@ -2479,8 +2479,8 @@ const mn = {
|
|
|
2479
2479
|
(m) => !this.__children__.some((_) => a(_) === m.ID)
|
|
2480
2480
|
).forEach((m) => {
|
|
2481
2481
|
const _ = m._typeName || m.constructor.name;
|
|
2482
|
-
let d =
|
|
2483
|
-
d || (m instanceof
|
|
2482
|
+
let d = pn[_];
|
|
2483
|
+
d || (m instanceof Xe ? d = Ze : m instanceof tt ? d = Ae : d = Ct);
|
|
2484
2484
|
const u = new d(m, this.svg_element, this.graph);
|
|
2485
2485
|
this.__children__.push(u);
|
|
2486
2486
|
}), g.forEach((m) => {
|
|
@@ -2501,8 +2501,8 @@ const mn = {
|
|
|
2501
2501
|
if (!this.__data__)
|
|
2502
2502
|
throw new Error("Layer is null");
|
|
2503
2503
|
let t = this.__data__;
|
|
2504
|
-
return this.svg_element = this.graph.doc.createElementNS("http://www.w3.org/2000/svg",
|
|
2505
|
-
const s = new
|
|
2504
|
+
return this.svg_element = this.graph.doc.createElementNS("http://www.w3.org/2000/svg", te.tagName), this.svg_element.setAttribute("data-layer-name", t.name), this.svg_element.setAttribute("data-layer-id", t.ID), this.svg_element.__data__ = t, this.svg_element.classList.add("ena-layer"), this.__data__.layers && this.__data__.layers.length > 0 && this.__data__.layers.forEach((e) => {
|
|
2505
|
+
const s = new te(e, this.svg_element, this.graph);
|
|
2506
2506
|
this.__children__.push(s);
|
|
2507
2507
|
}), this.svg_element;
|
|
2508
2508
|
}
|
|
@@ -2523,9 +2523,9 @@ const mn = {
|
|
|
2523
2523
|
this.__children__.push(t);
|
|
2524
2524
|
}
|
|
2525
2525
|
};
|
|
2526
|
-
l(
|
|
2527
|
-
let
|
|
2528
|
-
const
|
|
2526
|
+
l(te, "QELayer"), te.tagName = "g";
|
|
2527
|
+
let Is = te;
|
|
2528
|
+
const Qs = class Qs {
|
|
2529
2529
|
constructor(t, e, s, i, n = U.DISPLAY_TYPES.ON, r = U.POSITION.OBJECT, o, a) {
|
|
2530
2530
|
this.text = t, this.parent = s, this.graph = i, this.displayMode = n, this.position = r, this.customX = o, this.customY = a, this._visible = !1, this._offsetX = 0, this._offsetY = 0, this.pinned = !1, this._hostPinned = !1, this.fontWeight = null, this._point = e, this.svg_element = this._create(), n === U.DISPLAY_TYPES.ON ? (this._visible = !0, this.svg_element.setAttribute("display", "block")) : (this._visible = !1, this.svg_element.setAttribute("display", "none"));
|
|
2531
2531
|
}
|
|
@@ -2656,11 +2656,11 @@ const ti = class ti {
|
|
|
2656
2656
|
const e = (m = t.getBoundingClientRect) == null ? void 0 : m.call(t), s = /* @__PURE__ */ l((_) => {
|
|
2657
2657
|
const d = Number(t.getAttribute(_));
|
|
2658
2658
|
return Number.isFinite(d) && d > 0 ? d : 0;
|
|
2659
|
-
}, "size"), i = (e == null ? void 0 : e.width) || s("width"), n = (e == null ? void 0 : e.height) || s("height"), r =
|
|
2659
|
+
}, "size"), i = (e == null ? void 0 : e.width) || s("width"), n = (e == null ? void 0 : e.height) || s("height"), r = Ki(t.getAttribute("viewBox"), i, n);
|
|
2660
2660
|
if (!r) return null;
|
|
2661
2661
|
let o = [1, 0, 0, 1, 0, 0];
|
|
2662
2662
|
for (let _ = this.svg_element.parentElement; _ && _ !== t; _ = _.parentElement) {
|
|
2663
|
-
const d =
|
|
2663
|
+
const d = Vi(_.getAttribute("transform"));
|
|
2664
2664
|
o = [
|
|
2665
2665
|
d[0] * o[0] + d[2] * o[1],
|
|
2666
2666
|
d[1] * o[0] + d[3] * o[1],
|
|
@@ -2670,7 +2670,7 @@ const ti = class ti {
|
|
|
2670
2670
|
d[1] * o[4] + d[3] * o[5] + d[5]
|
|
2671
2671
|
];
|
|
2672
2672
|
}
|
|
2673
|
-
const a =
|
|
2673
|
+
const a = Zi(o);
|
|
2674
2674
|
if (!a) return null;
|
|
2675
2675
|
const h = /* @__PURE__ */ l((_, d) => ({ x: a[0] * _ + a[2] * d + a[4], y: a[1] * _ + a[3] * d + a[5] }), "map"), g = h(r.left, r.top), f = h(r.right, r.bottom);
|
|
2676
2676
|
return {
|
|
@@ -2684,7 +2684,7 @@ const ti = class ti {
|
|
|
2684
2684
|
* otherwise estimated from the font size and text length. */
|
|
2685
2685
|
bbox() {
|
|
2686
2686
|
const t = this.svg_element;
|
|
2687
|
-
if (typeof t.getBBox != "function") return
|
|
2687
|
+
if (typeof t.getBBox != "function") return Hi(t);
|
|
2688
2688
|
try {
|
|
2689
2689
|
const e = t.getBBox();
|
|
2690
2690
|
return e.width > 0 ? e : null;
|
|
@@ -2725,48 +2725,48 @@ const ti = class ti {
|
|
|
2725
2725
|
this.svg_element.remove();
|
|
2726
2726
|
}
|
|
2727
2727
|
};
|
|
2728
|
-
l(
|
|
2729
|
-
let
|
|
2728
|
+
l(Qs, "QELabel");
|
|
2729
|
+
let Cs = Qs;
|
|
2730
|
+
const us = class us extends Nt {
|
|
2731
|
+
};
|
|
2732
|
+
l(us, "QENodesElement"), us.tagName = "qe-nodes";
|
|
2733
|
+
let Ke = us;
|
|
2730
2734
|
const _s = class _s extends Nt {
|
|
2731
2735
|
};
|
|
2732
|
-
l(_s, "
|
|
2736
|
+
l(_s, "QENodeElement"), _s.tagName = "qe-node";
|
|
2733
2737
|
let Je = _s;
|
|
2734
2738
|
const ds = class ds extends Nt {
|
|
2735
2739
|
};
|
|
2736
|
-
l(ds, "
|
|
2740
|
+
l(ds, "QEMeansElement"), ds.tagName = "qe-means";
|
|
2737
2741
|
let Qe = ds;
|
|
2738
2742
|
const gs = class gs extends Nt {
|
|
2739
2743
|
};
|
|
2740
|
-
l(gs, "
|
|
2744
|
+
l(gs, "QEPointsElement"), gs.tagName = "qe-points";
|
|
2741
2745
|
let ts = gs;
|
|
2742
2746
|
const fs = class fs extends Nt {
|
|
2743
2747
|
};
|
|
2744
|
-
l(fs, "
|
|
2748
|
+
l(fs, "QEEdgesElement"), fs.tagName = "qe-edges";
|
|
2745
2749
|
let es = fs;
|
|
2746
2750
|
const ms = class ms extends Nt {
|
|
2747
2751
|
};
|
|
2748
|
-
l(ms, "
|
|
2752
|
+
l(ms, "QEEdgeElement"), ms.tagName = "qe-edge";
|
|
2749
2753
|
let ss = ms;
|
|
2750
2754
|
const ps = class ps extends Nt {
|
|
2751
2755
|
};
|
|
2752
|
-
l(ps, "
|
|
2756
|
+
l(ps, "QETrajectoriesElement"), ps.tagName = "qe-trajectories";
|
|
2753
2757
|
let is = ps;
|
|
2754
2758
|
const bs = class bs extends Nt {
|
|
2755
2759
|
};
|
|
2756
|
-
l(bs, "
|
|
2760
|
+
l(bs, "QEAxesElement"), bs.tagName = "qe-axes";
|
|
2757
2761
|
let ns = bs;
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
Et(ss.tagName, ss);
|
|
2767
|
-
Et(is.tagName, is);
|
|
2768
|
-
Et(ns.tagName, ns);
|
|
2769
|
-
Et(rs.tagName, rs);
|
|
2762
|
+
Mt(Ke.tagName, Ke);
|
|
2763
|
+
Mt(Je.tagName, Je);
|
|
2764
|
+
Mt(Qe.tagName, Qe);
|
|
2765
|
+
Mt(ts.tagName, ts);
|
|
2766
|
+
Mt(es.tagName, es);
|
|
2767
|
+
Mt(ss.tagName, ss);
|
|
2768
|
+
Mt(is.tagName, is);
|
|
2769
|
+
Mt(ns.tagName, ns);
|
|
2770
2770
|
const mi = [
|
|
2771
2771
|
"#4477AA",
|
|
2772
2772
|
"#EE6677",
|
|
@@ -2777,7 +2777,7 @@ const mi = [
|
|
|
2777
2777
|
"#BBBBBB",
|
|
2778
2778
|
"#000000"
|
|
2779
2779
|
];
|
|
2780
|
-
function
|
|
2780
|
+
function bn(c, t) {
|
|
2781
2781
|
for (const e of t)
|
|
2782
2782
|
if (c === `${e}.${e}`) return [e, e];
|
|
2783
2783
|
for (const e of t)
|
|
@@ -2787,20 +2787,25 @@ function pn(c, t) {
|
|
|
2787
2787
|
}
|
|
2788
2788
|
return null;
|
|
2789
2789
|
}
|
|
2790
|
-
l(
|
|
2791
|
-
function
|
|
2790
|
+
l(bn, "parseEdgePair");
|
|
2791
|
+
function yn(c, t, e, s) {
|
|
2792
2792
|
const i = Math.max(1, e - 1), n = i >= 120 ? 1.96 : i >= 60 ? 2 : i >= 30 ? 2.042 : i >= 20 ? 2.086 : i >= 10 ? 2.228 : i >= 5 ? 2.571 : 4.303, r = Math.sqrt(Math.max(0, c) / e) * s, o = Math.sqrt(Math.max(0, t) / e) * s;
|
|
2793
2793
|
return { halfW: n * r, halfH: n * o };
|
|
2794
2794
|
}
|
|
2795
|
-
l(
|
|
2796
|
-
const
|
|
2797
|
-
function
|
|
2795
|
+
l(yn, "computeCIRect");
|
|
2796
|
+
const xn = 0.5;
|
|
2797
|
+
function Re(c, t, e) {
|
|
2798
2798
|
if (!c) return;
|
|
2799
2799
|
const s = Math.min(Math.abs(t), Math.abs(e));
|
|
2800
|
-
s > 0 && (c.meta = { ...c.meta ?? {}, maxRadius: s *
|
|
2800
|
+
s > 0 && (c.meta = { ...c.meta ?? {}, maxRadius: s * xn });
|
|
2801
2801
|
}
|
|
2802
|
-
l(
|
|
2803
|
-
function
|
|
2802
|
+
l(Re, "capMeanToInterval");
|
|
2803
|
+
function pi(c) {
|
|
2804
|
+
const t = (c ?? "").trim().split(/[\s,]+/).map(Number);
|
|
2805
|
+
return t.every((e) => Number.isFinite(e) && e >= 0) && t.some((e) => e > 0) ? t : null;
|
|
2806
|
+
}
|
|
2807
|
+
l(pi, "parseDash");
|
|
2808
|
+
function $e(c, t, e, s = "") {
|
|
2804
2809
|
const i = /* @__PURE__ */ l((h) => {
|
|
2805
2810
|
const g = c.names.indexOf(h), f = g >= 0 ? c[g] : null;
|
|
2806
2811
|
if (f == null || f === "") return;
|
|
@@ -2809,8 +2814,8 @@ function Te(c, t, e, s = "") {
|
|
|
2809
2814
|
}, "get"), n = i(`${t}.${s}low`) ?? i(`${t}_${s}low`), r = i(`${t}.${s}high`) ?? i(`${t}_${s}high`), o = i(`${e}.${s}low`) ?? i(`${e}_${s}low`), a = i(`${e}.${s}high`) ?? i(`${e}_${s}high`);
|
|
2810
2815
|
return n == null || r == null || o == null || a == null ? null : { x_low: n, x_high: r, y_low: o, y_high: a };
|
|
2811
2816
|
}
|
|
2812
|
-
l(
|
|
2813
|
-
function
|
|
2817
|
+
l($e, "readIntervalBounds");
|
|
2818
|
+
function Te(c, t) {
|
|
2814
2819
|
const e = /* @__PURE__ */ l((h) => {
|
|
2815
2820
|
if (!c) return;
|
|
2816
2821
|
const g = c.names.indexOf(h);
|
|
@@ -2825,20 +2830,20 @@ function Fe(c, t) {
|
|
|
2825
2830
|
pinned: a === !0 || a === 1 || String(a).toLowerCase() === "true"
|
|
2826
2831
|
};
|
|
2827
2832
|
}
|
|
2828
|
-
l(
|
|
2829
|
-
function
|
|
2833
|
+
l(Te, "readLabelSpec");
|
|
2834
|
+
function wn(c) {
|
|
2830
2835
|
const t = c == null ? void 0 : c.trim().toLowerCase();
|
|
2831
2836
|
if (!t) return null;
|
|
2832
2837
|
if (t === "node") return 0.5;
|
|
2833
2838
|
const e = Number(t);
|
|
2834
2839
|
return Number.isFinite(e) && e > 0 ? e : null;
|
|
2835
2840
|
}
|
|
2836
|
-
l(
|
|
2837
|
-
function
|
|
2841
|
+
l(wn, "parseSelfSize");
|
|
2842
|
+
function Ci(c, t, e) {
|
|
2838
2843
|
return c ? [...c.children].filter((s) => s.tagName.toLowerCase() === t).map((s) => Object.fromEntries(["color", ...e].map((i) => [i, s.getAttribute(i) ?? ""]))).filter((s) => s.color && e.every((i) => s[i])) : [];
|
|
2839
2844
|
}
|
|
2840
|
-
l(
|
|
2841
|
-
function
|
|
2845
|
+
l(Ci, "childColors");
|
|
2846
|
+
function vn(c) {
|
|
2842
2847
|
var i, n;
|
|
2843
2848
|
const t = /* @__PURE__ */ l((r) => c.getAttribute(r), "a"), e = ((i = t("colors")) == null ? void 0 : i.split(",").map((r) => r.trim()).filter(Boolean)) ?? [], s = ((n = t("threshold")) == null ? void 0 : n.split(",").map(Number).filter(Number.isFinite)) ?? [];
|
|
2844
2849
|
return {
|
|
@@ -2850,23 +2855,23 @@ function wn(c) {
|
|
|
2850
2855
|
colors: e.length ? [e[0], e[1] ?? null] : null,
|
|
2851
2856
|
threshold: s.length ? [s[0], s.length > 1 ? s[1] : 1 / 0] : null,
|
|
2852
2857
|
name: t("name"),
|
|
2853
|
-
selfSize:
|
|
2858
|
+
selfSize: wn(t("self-size")),
|
|
2854
2859
|
fixedSize: c.hasAttribute("fixed-size"),
|
|
2855
|
-
edgeColors:
|
|
2860
|
+
edgeColors: Ci(c, "qe-edge", ["source", "target"])
|
|
2856
2861
|
};
|
|
2857
2862
|
}
|
|
2858
|
-
l(
|
|
2859
|
-
function
|
|
2860
|
-
const { r: t, g: e, b: s } =
|
|
2863
|
+
l(vn, "parseEdgeLayer");
|
|
2864
|
+
function An(c) {
|
|
2865
|
+
const { r: t, g: e, b: s } = at.parseColor(c), i = Math.max(t, e, s), n = Math.min(t, e, s), r = /* @__PURE__ */ l((o) => (i + n - o).toString(16).padStart(2, "0"), "f");
|
|
2861
2866
|
return `#${r(t)}${r(e)}${r(s)}`;
|
|
2862
2867
|
}
|
|
2863
|
-
l(
|
|
2864
|
-
function
|
|
2868
|
+
l(An, "complementColor");
|
|
2869
|
+
function Sn(c) {
|
|
2865
2870
|
const t = c == null ? void 0 : c.trim().toLowerCase();
|
|
2866
2871
|
return t === "plot" || t === "absolute" ? t : "model";
|
|
2867
2872
|
}
|
|
2868
|
-
l(
|
|
2869
|
-
function
|
|
2873
|
+
l(Sn, "parseColorScale");
|
|
2874
|
+
function Fe(c, t) {
|
|
2870
2875
|
switch (c == null ? void 0 : c.toLowerCase()) {
|
|
2871
2876
|
case "on":
|
|
2872
2877
|
return 3;
|
|
@@ -2880,10 +2885,10 @@ function De(c, t) {
|
|
|
2880
2885
|
return t;
|
|
2881
2886
|
}
|
|
2882
2887
|
}
|
|
2883
|
-
l(
|
|
2884
|
-
const
|
|
2888
|
+
l(Fe, "parseLabelMode");
|
|
2889
|
+
const ot = class ot extends Ue {
|
|
2885
2890
|
constructor(t, e) {
|
|
2886
|
-
super(t), this.zoom_level = 1, this.__children__ = new
|
|
2891
|
+
super(t), this.zoom_level = 1, this.__children__ = new Dt(), this._hasModel = !1, this._renderPending = !1, this._childObserver = null, this._ciRects = /* @__PURE__ */ new Map(), this._outlierRects = /* @__PURE__ */ new Map(), this._ciCross = /* @__PURE__ */ new Map(), this._labelsGroup = null, this._nodeLabels = /* @__PURE__ */ new Map(), this._meanLabels = /* @__PURE__ */ new Map(), this._pointLabels = /* @__PURE__ */ new Map(), this._setLabels = /* @__PURE__ */ new Map(), this._showAxes = !1, this._axisXText = null, this._axisYText = null, this._axisLabelEls = /* @__PURE__ */ new Map(), this._magnifyText = null, this._magnifyEl = null, this._rangeExtent = null, this._rangeMode = null, this._centerContent = !1, this._edgesFixedSize = !1, this._meansFixedSize = !1, this._intervalBase = /* @__PURE__ */ new WeakMap(), this._intervalPx = null, this._intervalDashPx = null, this._outlierDashPx = null, this._axesFixedSize = !1, this._plotTitle = null, this._titleEl = null, this._resizeObs = null, this._labelFont = { size: null, family: null, color: null }, this._host = this, this._zoomAnim = null, this._animateMs = 0, this._tweenRaf = null, this._tween = null, this._tweenView = null, this._highlight = { edges: /* @__PURE__ */ new Set(), nodes: /* @__PURE__ */ new Set() }, this._highlightGroup = null, this._tooltipEl = null, this._headless = Ai(this.doc), e && (this._host = e), this.graph = this, this.parent = null, this.__data__ = new Ns(Si), this.__name__ = this.__data__.name || "unnamed-graph", this.svg_element = this.create(), he("Created qe-graph svg element: ", this.svg_element), typeof document < "u" && !this._headless && document.addEventListener("model-updated", (s) => {
|
|
2887
2892
|
var r;
|
|
2888
2893
|
const i = ((r = s.composedPath) == null ? void 0 : r.call(s)[0]) ?? s.target;
|
|
2889
2894
|
if (this._vizena && i !== this._vizena) return;
|
|
@@ -2931,82 +2936,82 @@ const at = class at extends Xe {
|
|
|
2931
2936
|
this._renderPending = !1, (e = this._childObserver) == null || e.takeRecords(), this._animateMs = this._host.hasAttribute("animate") ? parseInt(this._host.getAttribute("animate") || "", 10) || 300 : 0;
|
|
2932
2937
|
const w = this._animateMs > 0 && this._hasModel ? this._captureTweenState() : null;
|
|
2933
2938
|
this._stopTween(), this._hasModel = !0;
|
|
2934
|
-
const
|
|
2935
|
-
this._showAxes = A.showAxes, this._axisXText = A.axisXLabel === null ? null : A.axisXLabel || String((
|
|
2936
|
-
const B = {},
|
|
2937
|
-
if (
|
|
2938
|
-
const
|
|
2939
|
-
|
|
2940
|
-
B[
|
|
2939
|
+
const E = t.dimensions, j = t.unit_id_col, Y = t.node_id_col, Q = t.group_col, A = this._readLayerConfig();
|
|
2940
|
+
this._showAxes = A.showAxes, this._axisXText = A.axisXLabel === null ? null : A.axisXLabel || String((E == null ? void 0 : E[0]) ?? "x"), this._magnifyText = A.edgeMagnify == null ? null : `(scaled ${A.edgeMagnify.toFixed(1)}x)`, this._axisYText = A.axisYLabel === null ? null : A.axisYLabel || String((E == null ? void 0 : E[1]) ?? "y");
|
|
2941
|
+
const B = {}, et = (s = t.palette) != null && s.length ? t.palette : mi;
|
|
2942
|
+
if (Q && ((i = t.points) != null && i.names)) {
|
|
2943
|
+
const k = t.points.col(Q);
|
|
2944
|
+
k && [...new Set([...k].map(String))].forEach(($, M) => {
|
|
2945
|
+
B[$] = et[M % et.length];
|
|
2941
2946
|
});
|
|
2942
2947
|
}
|
|
2943
|
-
(n = t.groups) != null && n.rows && t.groups.rows().length > 0 && t.groups.rows().forEach((
|
|
2944
|
-
const
|
|
2945
|
-
M && String(M) !== "NA" ? B[
|
|
2948
|
+
(n = t.groups) != null && n.rows && t.groups.rows().length > 0 && t.groups.rows().forEach((k) => {
|
|
2949
|
+
const C = k.rowName ?? String(k[0]), $ = k.names.indexOf("color"), M = $ >= 0 ? k[$] : null;
|
|
2950
|
+
M && String(M) !== "NA" ? B[C] = String(M) : B[C] || (B[C] = et[Object.keys(B).length % et.length]);
|
|
2946
2951
|
});
|
|
2947
|
-
const wt = Object.keys(B),
|
|
2948
|
-
A.activeMeanGroups.split(",").map((
|
|
2952
|
+
const wt = Object.keys(B), Et = A.activeMeanGroups && A.activeMeanGroups.trim() ? new Set(
|
|
2953
|
+
A.activeMeanGroups.split(",").map((k) => k.trim()).filter((k) => B[k])
|
|
2949
2954
|
// silently drop names not in model
|
|
2950
|
-
) : new Set(wt), ze = A.scalePoints, Oe = /* @__PURE__ */ l((
|
|
2951
|
-
let
|
|
2952
|
-
return
|
|
2953
|
-
const M =
|
|
2954
|
-
M >= 0 && (
|
|
2955
|
-
}),
|
|
2956
|
-
}, "getExtent"),
|
|
2957
|
-
this._rangeExtent = A.range === "network" ?
|
|
2958
|
-
const
|
|
2959
|
-
const
|
|
2960
|
-
ID:
|
|
2955
|
+
) : new Set(wt), ze = A.scalePoints, Oe = /* @__PURE__ */ l((k) => {
|
|
2956
|
+
let C = 0;
|
|
2957
|
+
return k.forEach(($) => {
|
|
2958
|
+
const M = $.names.indexOf(E[0]), N = E.length > 1 ? $.names.indexOf(E[1]) : -1;
|
|
2959
|
+
M >= 0 && (C = Math.max(C, Math.abs(Number($[M])))), N >= 0 && (C = Math.max(C, Math.abs(Number($[N]))));
|
|
2960
|
+
}), C;
|
|
2961
|
+
}, "getExtent"), Pt = (r = t.nodes) != null && r.rows ? Oe(t.nodes.rows()) : 0, Ht = (o = t.points) != null && o.rows ? Oe(t.points.rows()) : 0, zi = (a = t.trajectories) != null && a.rows ? Oe(t.trajectories.rows()) : 0, ys = Ht > 0 ? Ht : zi, q = A.pointScale !== null ? A.pointScale : ze && ys > 0 && Pt > 0 ? Pt / ys : 1;
|
|
2962
|
+
this._rangeExtent = A.range === "network" ? Pt * 1.2 : A.range === "points" ? ys * q * 1.2 : typeof A.range == "number" ? A.range : null, this._rangeMode = A.range === "network" || A.range === "points" ? A.range : typeof A.range == "number" ? "number" : null, this._centerContent = A.centerContent, this._edgesFixedSize = A.edgeLayers.some((k) => k.fixedSize), this._meansFixedSize = A.meanFixedSize, this._intervalPx = A.intervalWidth, this._intervalDashPx = A.intervalDash, this._outlierDashPx = A.outlierDash, this._axesFixedSize = A.axesFixedSize, this._plotTitle = A.plotTitle, this._labelFont = A.labelFont;
|
|
2963
|
+
const Oi = A.labelNodes, Pi = A.labelMeans, ti = A.labelPoints, jt = this._labelsGroup, xs = /* @__PURE__ */ l((k, C, $, M = 1) => {
|
|
2964
|
+
const N = k.names.indexOf(C), y = k.names.indexOf(E[0]), P = E.length > 1 ? k.names.indexOf(E[1]) : -1, v = new tt({
|
|
2965
|
+
ID: N >= 0 ? String(k[N]) : k.rowName || `pt-${Math.random().toString(36).slice(2)}`,
|
|
2961
2966
|
dimensions: [
|
|
2962
|
-
y >= 0 ? Number(
|
|
2963
|
-
|
|
2967
|
+
y >= 0 ? Number(k[y]) * M : 0,
|
|
2968
|
+
P >= 0 ? -Number(k[P]) * M : 0
|
|
2964
2969
|
// negate Y: SVG y-down vs ENA y-up
|
|
2965
2970
|
],
|
|
2966
2971
|
meta: {}
|
|
2967
2972
|
});
|
|
2968
|
-
return
|
|
2973
|
+
return $ && (v.color = new at($)), v;
|
|
2969
2974
|
}, "rowToPoint"), gt = {}, Li = A.showPoints;
|
|
2970
|
-
["points", "nodes", "edges", "edgenodes"].map((
|
|
2971
|
-
const
|
|
2972
|
-
if (A.pointSets.length && (
|
|
2973
|
-
const
|
|
2974
|
-
const
|
|
2975
|
-
return
|
|
2975
|
+
["points", "nodes", "edges", "edgenodes"].map((k) => this.__children__.search("__children__", k)).filter((k) => !!k).forEach((k) => k.__data__.objects.clear()), this.__data__.points.clear();
|
|
2976
|
+
const Pe = t.pointsets, ws = [];
|
|
2977
|
+
if (A.pointSets.length && (Pe != null && Pe.rows)) {
|
|
2978
|
+
const k = this.__children__.search("__children__", "points"), C = /* @__PURE__ */ l(($, M) => {
|
|
2979
|
+
const N = $.names.indexOf(M);
|
|
2980
|
+
return N >= 0 ? $[N] : null;
|
|
2976
2981
|
}, "col");
|
|
2977
|
-
A.pointSets.forEach((
|
|
2978
|
-
|
|
2979
|
-
if (String(
|
|
2980
|
-
const y = String(
|
|
2981
|
-
|
|
2982
|
-
const
|
|
2983
|
-
|
|
2984
|
-
const
|
|
2985
|
-
|
|
2982
|
+
A.pointSets.forEach(($, M) => {
|
|
2983
|
+
Pe.rows().forEach((N) => {
|
|
2984
|
+
if (String(C(N, "set")) !== $.set) return;
|
|
2985
|
+
const y = String(C(N, "id")), P = C(N, "group") != null && String(C(N, "group")) !== "NA" ? String(C(N, "group")) : null, v = C(N, "color") && String(C(N, "color")) !== "NA" ? String(C(N, "color")) : P && B[P] ? B[P] : et[M % et.length], I = xs(N, "id", v, q);
|
|
2986
|
+
I.ID = `${$.set}::${y}`, I.size = $.size ?? A.pointSize ?? 2.5;
|
|
2987
|
+
const D = C(N, "shape");
|
|
2988
|
+
D && String(D) !== "NA" && (I.shape = String(D));
|
|
2989
|
+
const X = C(N, "label");
|
|
2990
|
+
I.meta = {
|
|
2986
2991
|
stroke: "#ffffff",
|
|
2987
2992
|
kind: "point",
|
|
2988
|
-
name:
|
|
2989
|
-
group:
|
|
2993
|
+
name: X != null && String(X) !== "NA" ? String(X) : y,
|
|
2994
|
+
group: P ?? void 0,
|
|
2990
2995
|
unit: y,
|
|
2991
|
-
set:
|
|
2992
|
-
fixedSize:
|
|
2993
|
-
}, this.__data__.points.set(
|
|
2996
|
+
set: $.set,
|
|
2997
|
+
fixedSize: $.fixedSize
|
|
2998
|
+
}, this.__data__.points.set(I.ID, I), k == null || k.__data__.objects.set(I.ID, I), ws.push({ pt: I, spec: Te(N, y), mode: $.labelMode, weight: $.labelWeight });
|
|
2994
2999
|
});
|
|
2995
3000
|
});
|
|
2996
3001
|
}
|
|
2997
|
-
if (
|
|
2998
|
-
const
|
|
2999
|
-
this._setLabels.forEach((
|
|
3000
|
-
|
|
3001
|
-
}),
|
|
3002
|
+
if (jt) {
|
|
3003
|
+
const k = new Set(ws.map((C) => C.pt.ID));
|
|
3004
|
+
this._setLabels.forEach((C, $) => {
|
|
3005
|
+
k.has($) || (C.remove(), this._setLabels.delete($));
|
|
3006
|
+
}), ws.forEach((C) => this._syncLabel(this._setLabels, C.pt.ID, C.spec, C.pt, jt, C.mode, C.weight));
|
|
3002
3007
|
}
|
|
3003
3008
|
if ((h = t.points) != null && h.rows) {
|
|
3004
|
-
const
|
|
3005
|
-
if (
|
|
3009
|
+
const k = this.__children__.search("__children__", "points");
|
|
3010
|
+
if (k) {
|
|
3006
3011
|
t.points.rows().forEach((M) => {
|
|
3007
|
-
const
|
|
3012
|
+
const N = Q ? M.names.indexOf(Q) : -1, y = N >= 0 ? String(M[N]) : null, P = y ? B[y] ?? "#888888" : "#888888";
|
|
3008
3013
|
if (Li) {
|
|
3009
|
-
const v =
|
|
3014
|
+
const v = xs(M, j, P, q);
|
|
3010
3015
|
v.size = A.pointSize ?? 2.5, v.meta = {
|
|
3011
3016
|
...v.meta ?? {},
|
|
3012
3017
|
stroke: "#ffffff",
|
|
@@ -3015,175 +3020,172 @@ const at = class at extends Xe {
|
|
|
3015
3020
|
group: y ?? void 0,
|
|
3016
3021
|
unit: v.ID,
|
|
3017
3022
|
fixedSize: A.pointFixedSize
|
|
3018
|
-
}, this.__data__.points.set(v.ID, v),
|
|
3023
|
+
}, this.__data__.points.set(v.ID, v), k.__data__.objects.set(v.ID, v);
|
|
3019
3024
|
}
|
|
3020
3025
|
if (y) {
|
|
3021
|
-
const v = M.names.indexOf(
|
|
3022
|
-
gt[y] || (gt[y] = { x: 0, y: 0, x2: 0, y2: 0, xy: 0, n: 0, color:
|
|
3023
|
-
const
|
|
3024
|
-
gt[y].x +=
|
|
3026
|
+
const v = M.names.indexOf(E[0]), I = E.length > 1 ? M.names.indexOf(E[1]) : -1;
|
|
3027
|
+
gt[y] || (gt[y] = { x: 0, y: 0, x2: 0, y2: 0, xy: 0, n: 0, color: P });
|
|
3028
|
+
const D = v >= 0 ? Number(M[v]) : 0, X = I >= 0 ? Number(M[I]) : 0;
|
|
3029
|
+
gt[y].x += D, gt[y].y += X, gt[y].x2 += D * D, gt[y].y2 += X * X, gt[y].xy += D * X, gt[y].n += 1;
|
|
3025
3030
|
}
|
|
3026
3031
|
});
|
|
3027
|
-
const
|
|
3028
|
-
const
|
|
3029
|
-
return
|
|
3032
|
+
const C = !!((g = t.groups) != null && g.rows && t.groups.rows().length > 0), $ = A.showMeans && C ? t.groups.rows().filter((M) => {
|
|
3033
|
+
const N = M.rowName ?? String(M[0]);
|
|
3034
|
+
return Et.size === 0 || Et.has(N);
|
|
3030
3035
|
}) : [];
|
|
3031
3036
|
if (A.showMeans) {
|
|
3032
|
-
const M =
|
|
3033
|
-
if (
|
|
3034
|
-
const
|
|
3035
|
-
this._ciRects.forEach((v,
|
|
3036
|
-
|
|
3037
|
-
}), this._outlierRects.forEach((v,
|
|
3038
|
-
|
|
3039
|
-
}), this._ciCross.forEach((v,
|
|
3040
|
-
|
|
3041
|
-
}),
|
|
3042
|
-
var
|
|
3043
|
-
const
|
|
3044
|
-
ID: `mean-${
|
|
3045
|
-
dimensions: [
|
|
3046
|
-
meta: { kind: "mean", name:
|
|
3037
|
+
const M = k.svg_element, N = this._rangeExtent ? this._rangeExtent / 1.2 : Pt, y = (N > 0 ? N : 1) * 8e-3;
|
|
3038
|
+
if (C) {
|
|
3039
|
+
const P = new Set($.map((v) => v.rowName ?? String(v[0])));
|
|
3040
|
+
this._ciRects.forEach((v, I) => {
|
|
3041
|
+
P.has(I) || (v.remove(), this._ciRects.delete(I));
|
|
3042
|
+
}), this._outlierRects.forEach((v, I) => {
|
|
3043
|
+
P.has(I) || (v.remove(), this._outlierRects.delete(I));
|
|
3044
|
+
}), this._ciCross.forEach((v, I) => {
|
|
3045
|
+
P.has(I.slice(2)) || (v.remove(), this._ciCross.delete(I));
|
|
3046
|
+
}), $.forEach((v) => {
|
|
3047
|
+
var qt, Kt, S;
|
|
3048
|
+
const I = v.rowName ?? String(v[0]), D = B[I] ?? "#888888", X = v.names.indexOf(E[0]), G = E.length > 1 ? v.names.indexOf(E[1]) : -1, V = X >= 0 ? Number(v[X]) * q : 0, mt = G >= 0 ? -Number(v[G]) * q : 0, K = new tt({
|
|
3049
|
+
ID: `mean-${I}`,
|
|
3050
|
+
dimensions: [V, mt],
|
|
3051
|
+
meta: { kind: "mean", name: I, group: I, fixedSize: A.meanFixedSize }
|
|
3047
3052
|
});
|
|
3048
|
-
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3051
|
-
const
|
|
3052
|
-
const
|
|
3053
|
-
return
|
|
3054
|
-
}, "cell"),
|
|
3055
|
-
if (!
|
|
3056
|
-
(
|
|
3053
|
+
K.color = new at(D), K.size = 4;
|
|
3054
|
+
const ct = v.names.indexOf("shape"), F = ct >= 0 ? v[ct] : null;
|
|
3055
|
+
K.shape = F && String(F) !== "NA" ? String(F) : "rect", this.__data__.points.set(K.ID, K), k.__data__.objects.set(K.ID, K);
|
|
3056
|
+
const Vt = /* @__PURE__ */ l((x) => {
|
|
3057
|
+
const z = v.names.indexOf(x), L = z >= 0 ? v[z] : null;
|
|
3058
|
+
return L == null || String(L) === "NA" || String(L) === "" ? null : L;
|
|
3059
|
+
}, "cell"), dt = Vt("intervals"), pt = dt === "box" || dt === "crosshairs" || dt === "both" || dt === "none" ? dt : A.intervals, Zt = pt === "crosshairs" || pt === "both", Yt = pt === "box" || pt === "both", J = Vt("outlier"), It = (J == null ? A.showOutlier : J === !0 || String(J) === "true") ? $e(v, E[0], E[1], "o") : null;
|
|
3060
|
+
if (!It)
|
|
3061
|
+
(qt = this._outlierRects.get(I)) == null || qt.remove(), this._outlierRects.delete(I);
|
|
3057
3062
|
else {
|
|
3058
|
-
let
|
|
3059
|
-
|
|
3063
|
+
let x = this._outlierRects.get(I);
|
|
3064
|
+
x || (x = this.doc.createElementNS("http://www.w3.org/2000/svg", "rect"), x.setAttribute("data-outlier-group", I), this._outlierRects.set(I, x)), x.setAttribute("x", (It.x_low * q).toString()), x.setAttribute("y", (-It.y_high * q).toString()), x.setAttribute("width", ((It.x_high - It.x_low) * q).toString()), x.setAttribute("height", ((It.y_high - It.y_low) * q).toString()), x.setAttribute("fill", "none"), x.setAttribute("stroke", D), x.setAttribute("stroke-width", y.toString()), x.setAttribute("stroke-opacity", "0.5"), x.setAttribute("stroke-dasharray", `${y * 2} ${y * 2}`), this._intervalStroke(x, y, [y * 2, y * 2], !0), M && !x.parentElement && M.insertBefore(x, M.firstChild);
|
|
3060
3065
|
}
|
|
3061
|
-
const
|
|
3062
|
-
if ((!
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
const
|
|
3070
|
-
|
|
3071
|
-
let
|
|
3072
|
-
|
|
3073
|
-
} else {
|
|
3074
|
-
const q = this._ciRects.get(k);
|
|
3075
|
-
q && (q.remove(), this._ciRects.delete(k));
|
|
3066
|
+
const ht = pt !== "none" ? $e(v, E[0], E[1]) : null, Lt = `x:${I}`;
|
|
3067
|
+
if ((!ht || !Zt) && ((Kt = this._ciCross.get(Lt)) == null || Kt.remove(), this._ciCross.delete(Lt)), (!ht || !Yt) && ((S = this._ciRects.get(I)) == null || S.remove(), this._ciRects.delete(I)), ht && Zt) {
|
|
3068
|
+
const x = ht.x_low * q, z = ht.x_high * q, L = -ht.y_high * q, T = -ht.y_low * q;
|
|
3069
|
+
Re(K, (z - x) / 2, (T - L) / 2);
|
|
3070
|
+
let O = this._ciCross.get(Lt);
|
|
3071
|
+
O || (O = this.doc.createElementNS("http://www.w3.org/2000/svg", "path"), O.setAttribute("data-ci-group", I), O.setAttribute("data-ci-kind", "crosshairs"), this._ciCross.set(Lt, O)), O.setAttribute("d", `M${x} ${mt} L${z} ${mt} M${V} ${L} L${V} ${T}`), O.setAttribute("fill", "none"), O.setAttribute("stroke", D), O.setAttribute("stroke-width", (y * 1.25).toString()), this._intervalStroke(O, y * 1.25, null), O.setAttribute("stroke-opacity", "0.8"), M && !O.parentElement && M.insertBefore(O, M.firstChild);
|
|
3072
|
+
}
|
|
3073
|
+
if (ht && Yt) {
|
|
3074
|
+
const x = ht.x_low * q, z = -ht.y_high * q, L = (ht.x_high - ht.x_low) * q, T = (ht.y_high - ht.y_low) * q;
|
|
3075
|
+
Re(K, L / 2, T / 2);
|
|
3076
|
+
let O = this._ciRects.get(I);
|
|
3077
|
+
O || (O = this.doc.createElementNS("http://www.w3.org/2000/svg", "rect"), O.setAttribute("data-ci-group", I), this._ciRects.set(I, O)), O.setAttribute("x", x.toString()), O.setAttribute("y", z.toString()), O.setAttribute("width", L.toString()), O.setAttribute("height", T.toString()), O.setAttribute("fill", "none"), O.setAttribute("stroke", D), O.setAttribute("stroke-width", y.toString()), O.setAttribute("stroke-opacity", "0.8"), O.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(O, y, [y * 4, y * 3]), M && !O.parentElement && M.insertBefore(O, M.firstChild);
|
|
3076
3078
|
}
|
|
3077
3079
|
});
|
|
3078
3080
|
} else
|
|
3079
|
-
this._removeIntervals(this._ciCross), Object.entries(gt).forEach(([v, { x:
|
|
3080
|
-
const
|
|
3081
|
+
this._removeIntervals(this._ciCross), Object.entries(gt).forEach(([v, { x: I, y: D, n: X, color: G }]) => {
|
|
3082
|
+
const V = new tt({
|
|
3081
3083
|
ID: `mean-${v}`,
|
|
3082
|
-
dimensions: [
|
|
3084
|
+
dimensions: [I / X * q, -(D / X) * q],
|
|
3083
3085
|
meta: { kind: "mean", name: v, group: v, fixedSize: A.meanFixedSize }
|
|
3084
3086
|
});
|
|
3085
|
-
|
|
3086
|
-
}), A.showCI ? (this._ciRects.forEach((v,
|
|
3087
|
-
gt[
|
|
3087
|
+
V.color = new at(G), V.size = 4, V.shape = "rect", this.__data__.points.set(V.ID, V), k.__data__.objects.set(V.ID, V);
|
|
3088
|
+
}), A.showCI ? (this._ciRects.forEach((v, I) => {
|
|
3089
|
+
gt[I] || (v.remove(), this._ciRects.delete(I));
|
|
3088
3090
|
}), (f = t.confidence) != null && f.rows ? t.confidence.rows().forEach((v) => {
|
|
3089
|
-
const
|
|
3090
|
-
if (!
|
|
3091
|
-
const
|
|
3091
|
+
const I = v.names.indexOf(Q ?? "group"), D = I >= 0 ? String(v[I]) : v.rowName ?? null;
|
|
3092
|
+
if (!D) return;
|
|
3093
|
+
const X = B[D] ?? "#888888", G = $e(v, E[0], E[1]);
|
|
3092
3094
|
if (!G) return;
|
|
3093
|
-
const
|
|
3094
|
-
|
|
3095
|
-
this.__data__.points.get(`mean-${
|
|
3096
|
-
|
|
3097
|
-
|
|
3095
|
+
const V = G.x_low * q, mt = -G.y_high * q, K = (G.x_high - G.x_low) * q, ct = (G.y_high - G.y_low) * q;
|
|
3096
|
+
Re(
|
|
3097
|
+
this.__data__.points.get(`mean-${D}`),
|
|
3098
|
+
K / 2,
|
|
3099
|
+
ct / 2
|
|
3098
3100
|
);
|
|
3099
|
-
let
|
|
3100
|
-
|
|
3101
|
-
}) : Object.entries(gt).forEach(([v, { x:
|
|
3102
|
-
if (
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3101
|
+
let F = this._ciRects.get(D);
|
|
3102
|
+
F || (F = this.doc.createElementNS("http://www.w3.org/2000/svg", "rect"), F.setAttribute("data-ci-group", D), this._ciRects.set(D, F)), F.setAttribute("x", V.toString()), F.setAttribute("y", mt.toString()), F.setAttribute("width", K.toString()), F.setAttribute("height", ct.toString()), F.setAttribute("fill", "none"), F.setAttribute("stroke", X), F.setAttribute("stroke-width", y.toString()), F.setAttribute("stroke-opacity", "0.8"), F.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(F, y, [y * 4, y * 3]), M && !F.parentElement && M.insertBefore(F, M.firstChild);
|
|
3103
|
+
}) : Object.entries(gt).forEach(([v, { x: I, y: D, x2: X, y2: G, n: V, color: mt }]) => {
|
|
3104
|
+
if (V < 2) return;
|
|
3105
|
+
const K = I / V, ct = D / V, F = X / V - K * K, Vt = G / V - ct * ct, { halfW: dt, halfH: pt } = yn(F, Vt, V, q), Zt = K * q, Yt = -ct * q;
|
|
3106
|
+
Re(
|
|
3105
3107
|
this.__data__.points.get(`mean-${v}`),
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
+
dt,
|
|
3109
|
+
pt
|
|
3108
3110
|
);
|
|
3109
|
-
let
|
|
3110
|
-
|
|
3111
|
-
})) : this._removeIntervals(this._ciRects), (m = t.outlier) != null && m.rows ? (this._outlierRects.forEach((v,
|
|
3112
|
-
B[
|
|
3111
|
+
let J = this._ciRects.get(v);
|
|
3112
|
+
J || (J = this.doc.createElementNS("http://www.w3.org/2000/svg", "rect"), J.setAttribute("data-ci-group", v), this._ciRects.set(v, J)), J.setAttribute("x", (Zt - dt).toString()), J.setAttribute("y", (Yt - pt).toString()), J.setAttribute("width", (dt * 2).toString()), J.setAttribute("height", (pt * 2).toString()), J.setAttribute("fill", "none"), J.setAttribute("stroke", mt), J.setAttribute("stroke-width", y.toString()), J.setAttribute("stroke-opacity", "0.8"), J.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(J, y, [y * 4, y * 3]), M && !J.parentElement && M.insertBefore(J, M.firstChild);
|
|
3113
|
+
})) : this._removeIntervals(this._ciRects), (m = t.outlier) != null && m.rows ? (this._outlierRects.forEach((v, I) => {
|
|
3114
|
+
B[I] || (v.remove(), this._outlierRects.delete(I));
|
|
3113
3115
|
}), t.outlier.rows().forEach((v) => {
|
|
3114
|
-
const
|
|
3115
|
-
if (!
|
|
3116
|
-
const
|
|
3116
|
+
const I = v.names.indexOf(Q ?? "group"), D = I >= 0 ? String(v[I]) : v.rowName ?? null;
|
|
3117
|
+
if (!D) return;
|
|
3118
|
+
const X = B[D] ?? "#888888", G = $e(v, E[0], E[1]);
|
|
3117
3119
|
if (!G) return;
|
|
3118
|
-
const
|
|
3119
|
-
let
|
|
3120
|
-
|
|
3120
|
+
const V = G.x_low * q, mt = -G.y_high * q, K = (G.x_high - G.x_low) * q, ct = (G.y_high - G.y_low) * q;
|
|
3121
|
+
let F = this._outlierRects.get(D);
|
|
3122
|
+
F || (F = this.doc.createElementNS("http://www.w3.org/2000/svg", "rect"), F.setAttribute("data-outlier-group", D), this._outlierRects.set(D, F)), F.setAttribute("x", V.toString()), F.setAttribute("y", mt.toString()), F.setAttribute("width", K.toString()), F.setAttribute("height", ct.toString()), F.setAttribute("fill", "none"), F.setAttribute("stroke", X), F.setAttribute("stroke-width", y.toString()), F.setAttribute("stroke-opacity", "0.5"), F.setAttribute("stroke-dasharray", `${y * 2} ${y * 2}`), this._intervalStroke(F, y, [y * 2, y * 2], !0), M && !F.parentElement && M.insertBefore(F, M.firstChild);
|
|
3121
3123
|
})) : this._removeIntervals(this._outlierRects);
|
|
3122
3124
|
} else
|
|
3123
3125
|
[this._ciRects, this._outlierRects, this._ciCross].forEach((M) => this._removeIntervals(M));
|
|
3124
|
-
if (
|
|
3125
|
-
this._pointLabels.forEach((y,
|
|
3126
|
-
|
|
3127
|
-
}), this._meanLabels.forEach((y,
|
|
3128
|
-
|
|
3129
|
-
}),
|
|
3130
|
-
const
|
|
3126
|
+
if (jt) {
|
|
3127
|
+
this._pointLabels.forEach((y, P) => {
|
|
3128
|
+
k.__data__.objects.get(P) || (y.remove(), this._pointLabels.delete(P));
|
|
3129
|
+
}), this._meanLabels.forEach((y, P) => {
|
|
3130
|
+
k.__data__.objects.get(`mean-${P}`) || (y.remove(), this._meanLabels.delete(P));
|
|
3131
|
+
}), ti !== 0 ? t.points.rows().forEach((y) => {
|
|
3132
|
+
const P = y.names.indexOf(j), v = P >= 0 ? String(y[P]) : null;
|
|
3131
3133
|
if (!v) return;
|
|
3132
|
-
const
|
|
3133
|
-
|
|
3134
|
+
const I = k.__data__.objects.get(v);
|
|
3135
|
+
I && this._syncLabel(
|
|
3134
3136
|
this._pointLabels,
|
|
3135
3137
|
v,
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3138
|
+
Te(null, v),
|
|
3139
|
+
I,
|
|
3140
|
+
jt,
|
|
3141
|
+
ti,
|
|
3140
3142
|
A.labelWeightPoints
|
|
3141
3143
|
);
|
|
3142
3144
|
}) : this._clearLabels(this._pointLabels);
|
|
3143
3145
|
const M = new Map(
|
|
3144
|
-
|
|
3146
|
+
$.map((y) => [y.rowName ?? String(y[0]), y])
|
|
3145
3147
|
);
|
|
3146
|
-
(
|
|
3147
|
-
const
|
|
3148
|
+
(C ? [...M.keys()] : Object.keys(gt)).forEach((y) => {
|
|
3149
|
+
const P = `mean-${y}`, v = k.__data__.objects.get(P);
|
|
3148
3150
|
v && this._syncLabel(
|
|
3149
3151
|
this._meanLabels,
|
|
3150
3152
|
y,
|
|
3151
|
-
|
|
3153
|
+
Te(M.get(y), y),
|
|
3152
3154
|
v,
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
+
jt,
|
|
3156
|
+
Pi,
|
|
3155
3157
|
A.labelWeightMeans
|
|
3156
3158
|
);
|
|
3157
3159
|
});
|
|
3158
3160
|
}
|
|
3159
|
-
|
|
3161
|
+
k.__data__.__state__.setVariable("layer_updated", k.__data__);
|
|
3160
3162
|
}
|
|
3161
3163
|
} else {
|
|
3162
|
-
const
|
|
3163
|
-
|
|
3164
|
+
const k = this.__children__.search("__children__", "points");
|
|
3165
|
+
k == null || k.__data__.__state__.setVariable("layer_updated", k.__data__);
|
|
3164
3166
|
}
|
|
3165
|
-
const
|
|
3166
|
-
if (A.showTrajectories &&
|
|
3167
|
-
|
|
3168
|
-
const
|
|
3169
|
-
if (
|
|
3170
|
-
const
|
|
3171
|
-
|
|
3172
|
-
const y =
|
|
3173
|
-
if (
|
|
3174
|
-
const v =
|
|
3175
|
-
v >= 0 &&
|
|
3176
|
-
x: Number(
|
|
3177
|
-
y: -Number(
|
|
3178
|
-
time:
|
|
3167
|
+
const ue = this.__children__.search("__children__", "trajectories");
|
|
3168
|
+
if (A.showTrajectories && ue) {
|
|
3169
|
+
ue.__data__.objects.clear(), this.__data__.trajectories.clear();
|
|
3170
|
+
const k = (_ = t.trajectories) != null && _.rows ? t.trajectories : t.points;
|
|
3171
|
+
if (k != null && k.rows) {
|
|
3172
|
+
const C = {}, $ = A.trajectoryUnits ? A.trajectoryUnits.split(",").map((N) => N.trim()) : null;
|
|
3173
|
+
k.rows().forEach((N) => {
|
|
3174
|
+
const y = N.names.indexOf(j) >= 0 ? N.names.indexOf(j) : N.names.indexOf("unit") >= 0 ? N.names.indexOf("unit") : N.names.indexOf("ENA_UNIT") >= 0 ? N.names.indexOf("ENA_UNIT") : -1, P = y >= 0 ? String(N[y]) : N.rowName || "unit-1";
|
|
3175
|
+
if ($ && !$.includes(P)) return;
|
|
3176
|
+
const v = N.names.indexOf(E[0]), I = E.length > 1 ? N.names.indexOf(E[1]) : -1, D = N.names.indexOf("time") >= 0 ? N.names.indexOf("time") : N.names.indexOf("ActivityNumber") >= 0 ? N.names.indexOf("ActivityNumber") : N.names.indexOf("RowID") >= 0 ? N.names.indexOf("RowID") : -1, X = D >= 0 ? Number(N[D]) : C[P] ? C[P].length + 1 : 1;
|
|
3177
|
+
v >= 0 && I >= 0 && (C[P] || (C[P] = []), C[P].push({
|
|
3178
|
+
x: Number(N[v]) * q,
|
|
3179
|
+
y: -Number(N[I]) * q,
|
|
3180
|
+
time: X
|
|
3179
3181
|
}));
|
|
3180
|
-
}), Object.keys(
|
|
3181
|
-
const
|
|
3182
|
-
if (
|
|
3183
|
-
const v =
|
|
3184
|
-
ID: `traj-${
|
|
3185
|
-
unitId:
|
|
3186
|
-
color: new
|
|
3182
|
+
}), Object.keys(C).forEach((N, y) => {
|
|
3183
|
+
const P = C[N];
|
|
3184
|
+
if (P.length === 0) return;
|
|
3185
|
+
const v = et[y % et.length], I = new Xe({
|
|
3186
|
+
ID: `traj-${N}`,
|
|
3187
|
+
unitId: N,
|
|
3188
|
+
color: new at(v),
|
|
3187
3189
|
lineStyle: A.trajectoryLineStyle,
|
|
3188
3190
|
strokeWidth: A.trajectoryStrokeWidth,
|
|
3189
3191
|
strokeWidthRange: A.trajectoryStrokeWidthRange,
|
|
@@ -3194,246 +3196,246 @@ const at = class at extends Xe {
|
|
|
3194
3196
|
currentTime: A.trajectoryPlayhead ?? 1 / 0,
|
|
3195
3197
|
showPoints: A.trajectoryShowPoints,
|
|
3196
3198
|
showTips: A.trajectoryShowTips,
|
|
3197
|
-
points:
|
|
3199
|
+
points: P.map((D) => ({ x: D.x, y: D.y, time: D.time }))
|
|
3198
3200
|
});
|
|
3199
|
-
this.__data__.trajectories.set(
|
|
3201
|
+
this.__data__.trajectories.set(N, I), ue.__data__.objects.set(I.ID, I);
|
|
3200
3202
|
});
|
|
3201
3203
|
}
|
|
3202
|
-
|
|
3204
|
+
ue.__data__.__state__.setVariable("layer_updated", ue.__data__);
|
|
3203
3205
|
}
|
|
3204
|
-
const kt = this.__children__.search("__children__", "network"),
|
|
3206
|
+
const kt = this.__children__.search("__children__", "network"), Le = kt == null ? void 0 : kt.__children__.search("__children__", "edges"), lt = kt == null ? void 0 : kt.__children__.search("__children__", "nodes"), ei = kt == null ? void 0 : kt.__children__.search("__children__", "edgenodes"), Ri = A.showEdges;
|
|
3205
3207
|
if ((d = t.nodes) != null && d.rows && lt) {
|
|
3206
|
-
if (t.nodes.rows().forEach((
|
|
3207
|
-
const
|
|
3208
|
+
if (t.nodes.rows().forEach((C) => {
|
|
3209
|
+
const $ = A.nodeColors.get(String(C[C.names.indexOf(Y)])), M = xs(C, Y, $ ?? "#444444");
|
|
3208
3210
|
M.size = 2;
|
|
3209
|
-
const
|
|
3211
|
+
const N = C.names.indexOf("label"), y = N >= 0 ? C[N] : null, P = C.names.indexOf("size"), v = P >= 0 && C[P] != null && C[P] !== "" ? Number(C[P]) : NaN;
|
|
3210
3212
|
M.meta = {
|
|
3211
3213
|
...M.meta ?? {},
|
|
3212
3214
|
kind: "node",
|
|
3213
|
-
labelColor:
|
|
3215
|
+
labelColor: $,
|
|
3214
3216
|
name: y != null && String(y) !== "NA" && String(y) !== "" ? String(y) : M.ID,
|
|
3215
3217
|
sizePx: Number.isFinite(v) && v > 0 ? v : void 0,
|
|
3216
3218
|
// <qe-nodes fixed-size>: constant on-screen size at any zoom.
|
|
3217
3219
|
zoomFixed: A.nodeFixedSize || void 0
|
|
3218
3220
|
}, lt.__data__.objects.set(M.ID, M);
|
|
3219
|
-
}),
|
|
3220
|
-
const
|
|
3221
|
-
|
|
3222
|
-
const
|
|
3223
|
-
|
|
3221
|
+
}), Ri && Le) {
|
|
3222
|
+
const C = {};
|
|
3223
|
+
Q && ((u = t.points) != null && u.rows) && t.points.rows().forEach((S) => {
|
|
3224
|
+
const x = S.names.indexOf(j), z = S.names.indexOf(Q);
|
|
3225
|
+
x >= 0 && z >= 0 && (C[String(S[x])] = String(S[z]));
|
|
3224
3226
|
});
|
|
3225
|
-
const
|
|
3226
|
-
const
|
|
3227
|
-
return
|
|
3228
|
-
}).filter(Boolean), M = /* @__PURE__ */ l((
|
|
3229
|
-
const
|
|
3230
|
-
return
|
|
3231
|
-
const
|
|
3232
|
-
|
|
3233
|
-
}),
|
|
3234
|
-
}, "parsePairs"),
|
|
3235
|
-
const
|
|
3236
|
-
return
|
|
3237
|
-
const
|
|
3238
|
-
|
|
3239
|
-
const
|
|
3240
|
-
|
|
3227
|
+
const $ = t.nodes.rows().map((S) => {
|
|
3228
|
+
const x = S.names.indexOf(Y);
|
|
3229
|
+
return x >= 0 ? String(S[x]) : "";
|
|
3230
|
+
}).filter(Boolean), M = /* @__PURE__ */ l((S) => {
|
|
3231
|
+
const x = [];
|
|
3232
|
+
return S.forEach((z) => {
|
|
3233
|
+
const L = bn(z, $);
|
|
3234
|
+
L && x.push({ col: z, pair: L });
|
|
3235
|
+
}), x;
|
|
3236
|
+
}, "parsePairs"), N = (b = t.edges) != null && b.rows ? t.edges.rows() : [], y = t.networks, P = M(((p = t.edges) == null ? void 0 : p.names) ?? []), v = M((y == null ? void 0 : y.names) ?? []), I = /* @__PURE__ */ l((S) => {
|
|
3237
|
+
const x = {};
|
|
3238
|
+
return N.forEach((z) => {
|
|
3239
|
+
const L = z.names.indexOf(j);
|
|
3240
|
+
L < 0 || String(z[L]) !== S || P.forEach(({ col: T }) => {
|
|
3241
|
+
const O = z.names.indexOf(T);
|
|
3242
|
+
O >= 0 && (x[T] = Number(z[O]) || 0);
|
|
3241
3243
|
});
|
|
3242
|
-
}),
|
|
3243
|
-
}, "getUnitEdges"),
|
|
3244
|
-
const
|
|
3245
|
-
let
|
|
3246
|
-
if (
|
|
3247
|
-
const
|
|
3248
|
-
(
|
|
3249
|
-
const At =
|
|
3244
|
+
}), x;
|
|
3245
|
+
}, "getUnitEdges"), D = /* @__PURE__ */ l((S) => {
|
|
3246
|
+
const x = {};
|
|
3247
|
+
let z = 0;
|
|
3248
|
+
if (N.forEach((T) => {
|
|
3249
|
+
const O = T.names.indexOf(j), st = O >= 0 ? String(T[O]) : null, Bt = Q ? T.names.indexOf(Q) : -1;
|
|
3250
|
+
(Bt >= 0 ? String(T[Bt]) : st ? C[st] : null) === S && (z++, P.forEach(({ col: ft }) => {
|
|
3251
|
+
const At = T.names.indexOf(ft);
|
|
3250
3252
|
if (At >= 0) {
|
|
3251
|
-
const bt = Number(
|
|
3252
|
-
isNaN(bt) || (
|
|
3253
|
+
const bt = Number(T[At]);
|
|
3254
|
+
isNaN(bt) || (x[ft] = (x[ft] ?? 0) + bt);
|
|
3253
3255
|
}
|
|
3254
3256
|
}));
|
|
3255
|
-
}),
|
|
3256
|
-
const N = {};
|
|
3257
|
-
return O.forEach(({ col: F }) => {
|
|
3258
|
-
N[F] = (S[F] ?? 0) / L;
|
|
3259
|
-
}), N;
|
|
3260
|
-
}, "getGroupEdges"), H = /* @__PURE__ */ l((x) => {
|
|
3261
|
-
if (B[x])
|
|
3262
|
-
return { weights: T(x), color: B[x], label: x };
|
|
3263
|
-
const S = z[x] ?? null, L = S ? B[S] ?? "#888888" : "#888888";
|
|
3264
|
-
return { weights: k(x), color: L, label: x };
|
|
3265
|
-
}, "resolve"), G = [], Z = /* @__PURE__ */ l((x) => {
|
|
3266
|
-
var N;
|
|
3267
|
-
const S = (N = y == null ? void 0 : y.rows) == null ? void 0 : N.call(y).find((F) => F.rowName === x);
|
|
3268
|
-
if (!S) return null;
|
|
3257
|
+
}), z === 0) return {};
|
|
3269
3258
|
const L = {};
|
|
3270
|
-
return
|
|
3271
|
-
|
|
3272
|
-
if (Q >= 0) {
|
|
3273
|
-
const it = Number(S[Q]);
|
|
3274
|
-
Number.isFinite(it) && (L[F] = it);
|
|
3275
|
-
}
|
|
3259
|
+
return P.forEach(({ col: T }) => {
|
|
3260
|
+
L[T] = (x[T] ?? 0) / z;
|
|
3276
3261
|
}), L;
|
|
3277
|
-
}, "
|
|
3278
|
-
if (
|
|
3279
|
-
|
|
3280
|
-
|
|
3262
|
+
}, "getGroupEdges"), X = /* @__PURE__ */ l((S) => {
|
|
3263
|
+
if (B[S])
|
|
3264
|
+
return { weights: D(S), color: B[S], label: S };
|
|
3265
|
+
const x = C[S] ?? null, z = x ? B[x] ?? "#888888" : "#888888";
|
|
3266
|
+
return { weights: I(S), color: z, label: S };
|
|
3267
|
+
}, "resolve"), G = [], V = /* @__PURE__ */ l((S) => {
|
|
3268
|
+
var L;
|
|
3269
|
+
const x = (L = y == null ? void 0 : y.rows) == null ? void 0 : L.call(y).find((T) => T.rowName === S);
|
|
3270
|
+
if (!x) return null;
|
|
3271
|
+
const z = {};
|
|
3272
|
+
return v.forEach(({ col: T }) => {
|
|
3273
|
+
const O = x.names.indexOf(T);
|
|
3274
|
+
if (O >= 0) {
|
|
3275
|
+
const st = Number(x[O]);
|
|
3276
|
+
Number.isFinite(st) && (z[T] = st);
|
|
3277
|
+
}
|
|
3278
|
+
}), z;
|
|
3279
|
+
}, "networkRow"), mt = /* @__PURE__ */ l((S, x) => {
|
|
3280
|
+
if (!x) return S;
|
|
3281
|
+
const z = Math.abs(S);
|
|
3282
|
+
return z < x[0] ? 0 : z > x[1] ? Math.sign(S) * x[1] : S;
|
|
3281
3283
|
}, "thresholded");
|
|
3282
|
-
A.edgeLayers.forEach((
|
|
3283
|
-
const
|
|
3284
|
-
var
|
|
3285
|
-
return (
|
|
3286
|
-
}, "ownColor"),
|
|
3287
|
-
if (
|
|
3288
|
-
const _e =
|
|
3284
|
+
A.edgeLayers.forEach((S, x) => {
|
|
3285
|
+
const z = /* @__PURE__ */ l((H) => {
|
|
3286
|
+
var it;
|
|
3287
|
+
return (it = S.edgeColors.find((Z) => Z.source === H[0] && Z.target === H[1] || !t.directed && Z.source === H[1] && Z.target === H[0])) == null ? void 0 : it.color;
|
|
3288
|
+
}, "ownColor"), L = /* @__PURE__ */ l((H, it, Z, St, ut) => {
|
|
3289
|
+
if (Z = mt(Z, S.threshold), Math.abs(Z) < 1e-6) return;
|
|
3290
|
+
const _e = z(it);
|
|
3289
3291
|
G.push({
|
|
3290
|
-
col: `${
|
|
3291
|
-
pair:
|
|
3292
|
-
weight: Math.abs(
|
|
3292
|
+
col: `${x}:${H}`,
|
|
3293
|
+
pair: it,
|
|
3294
|
+
weight: Math.abs(Z),
|
|
3293
3295
|
color: _e ?? St,
|
|
3294
3296
|
exact: _e !== void 0,
|
|
3295
|
-
layer:
|
|
3296
|
-
...
|
|
3297
|
+
layer: x,
|
|
3298
|
+
...ut
|
|
3297
3299
|
});
|
|
3298
|
-
}, "push"),
|
|
3299
|
-
if (
|
|
3300
|
-
const
|
|
3301
|
-
if (!
|
|
3302
|
-
const [
|
|
3303
|
-
v.forEach(({ col:
|
|
3304
|
-
const de =
|
|
3305
|
-
|
|
3300
|
+
}, "push"), T = /* @__PURE__ */ l((H, it) => S.colors ? [S.colors[0], S.colors[1] ?? An(S.colors[0])] : [H, it], "signColors");
|
|
3301
|
+
if (S.network) {
|
|
3302
|
+
const H = V(S.network);
|
|
3303
|
+
if (!H) return;
|
|
3304
|
+
const [it, Z] = T(et[0], et[1]), St = { name: S.name ?? S.network };
|
|
3305
|
+
v.forEach(({ col: ut, pair: _e }) => {
|
|
3306
|
+
const de = H[ut] ?? 0;
|
|
3307
|
+
L(ut, _e, de, de >= 0 ? it : Z, St);
|
|
3306
3308
|
});
|
|
3307
3309
|
return;
|
|
3308
3310
|
}
|
|
3309
|
-
const
|
|
3310
|
-
if (!
|
|
3311
|
-
const
|
|
3312
|
-
vt &&
|
|
3313
|
-
const
|
|
3314
|
-
|
|
3315
|
-
}) : vt &&
|
|
3316
|
-
const
|
|
3317
|
-
|
|
3318
|
-
}) :
|
|
3319
|
-
const
|
|
3320
|
-
|
|
3311
|
+
const O = S.unit ?? S.group ?? null;
|
|
3312
|
+
if (!O) return;
|
|
3313
|
+
const st = X(O), Bt = S.compare ?? S.also ?? null, vt = Bt ? X(Bt) : null, ft = { name: S.name ?? O, group: S.group ?? void 0, unit: S.unit ?? void 0 }, [At, bt] = T(st.color, (vt == null ? void 0 : vt.color) ?? st.color);
|
|
3314
|
+
vt && S.compare ? P.forEach(({ col: H, pair: it }) => {
|
|
3315
|
+
const Z = (st.weights[H] ?? 0) - (vt.weights[H] ?? 0);
|
|
3316
|
+
L(H, it, Z, Z > 0 ? At : bt, ft);
|
|
3317
|
+
}) : vt && S.also ? P.forEach(({ col: H, pair: it }) => {
|
|
3318
|
+
const Z = st.weights[H] ?? 0, St = vt.weights[H] ?? 0;
|
|
3319
|
+
Z > 0 && L(H + "-a", it, Z, At, ft), St > 0 && L(H + "-b", it, St, bt, { ...ft, name: S.also ?? void 0, group: S.also ?? void 0 });
|
|
3320
|
+
}) : P.forEach(({ col: H, pair: it }) => {
|
|
3321
|
+
const Z = st.weights[H] ?? 0;
|
|
3322
|
+
Z > 0 && L(H, it, Z, At, ft);
|
|
3321
3323
|
});
|
|
3322
|
-
}), G.sort((
|
|
3323
|
-
const
|
|
3324
|
-
const
|
|
3325
|
-
return
|
|
3326
|
-
}, "rangeOf"), [
|
|
3327
|
-
const
|
|
3328
|
-
return
|
|
3329
|
-
if (
|
|
3330
|
-
const
|
|
3331
|
-
if (
|
|
3332
|
-
}),
|
|
3333
|
-
}, "modelRange"),
|
|
3334
|
-
if (
|
|
3335
|
-
const
|
|
3336
|
-
return { saturation:
|
|
3324
|
+
}), G.sort((S, x) => x.weight - S.weight);
|
|
3325
|
+
const K = !!t.directed, ct = dn(A.edgeWidth) * (A.edgeMagnify ?? 1), F = /* @__PURE__ */ l((S) => {
|
|
3326
|
+
const x = S.map(Math.abs).filter((z) => z > 0);
|
|
3327
|
+
return x.length ? [Math.min(...x), Math.max(...x)] : [0, 0];
|
|
3328
|
+
}, "rangeOf"), [Vt, dt] = N.length ? [P, t.edges] : [v, y], pt = /* @__PURE__ */ l((S) => {
|
|
3329
|
+
const x = [];
|
|
3330
|
+
return Vt.forEach(({ col: z, pair: L }) => {
|
|
3331
|
+
if (L[0] === L[1] !== S) return;
|
|
3332
|
+
const T = dt == null ? void 0 : dt.col(z);
|
|
3333
|
+
if (T) for (const O of T) x.push(Number(O));
|
|
3334
|
+
}), F(x);
|
|
3335
|
+
}, "modelRange"), Zt = /* @__PURE__ */ l((S) => F(G.filter((x) => x.pair[0] === x.pair[1] === S).map((x) => x.weight)), "plotRange"), Yt = A.edgeColorScale, J = /* @__PURE__ */ l((S) => Yt === "plot" ? Zt(S) : pt(S), "colourRange"), ni = J(!1), It = J(!0), ht = /* @__PURE__ */ l((S, x) => {
|
|
3336
|
+
if (Yt === "absolute") {
|
|
3337
|
+
const T = Math.min(1, Math.abs(S));
|
|
3338
|
+
return { saturation: T, opacity: T };
|
|
3337
3339
|
}
|
|
3338
|
-
const [
|
|
3339
|
-
return { saturation: gi(
|
|
3340
|
-
}, "colourOf"),
|
|
3341
|
-
G.forEach(({ pair:
|
|
3342
|
-
const
|
|
3343
|
-
|
|
3340
|
+
const [z, L] = x ? It : ni;
|
|
3341
|
+
return { saturation: gi(S, z, L, on), opacity: gi(S, z, L, an) };
|
|
3342
|
+
}, "colourOf"), Lt = {};
|
|
3343
|
+
G.forEach(({ pair: S, weight: x }) => {
|
|
3344
|
+
const z = S[0] === S[1], L = /* @__PURE__ */ l((T) => {
|
|
3345
|
+
Lt[T] = (Lt[T] ?? 0) + Math.abs(x);
|
|
3344
3346
|
}, "add");
|
|
3345
|
-
if (
|
|
3346
|
-
|
|
3347
|
+
if (K || z) {
|
|
3348
|
+
L(S[1]);
|
|
3347
3349
|
return;
|
|
3348
3350
|
}
|
|
3349
|
-
|
|
3350
|
-
}), t.nodes.rows().forEach((
|
|
3351
|
-
var
|
|
3352
|
-
const
|
|
3351
|
+
L(S[0]), L(S[1]);
|
|
3352
|
+
}), t.nodes.rows().forEach((S) => {
|
|
3353
|
+
var st;
|
|
3354
|
+
const x = S.names.indexOf(Y), z = x >= 0 ? String(S[x]) : "";
|
|
3355
|
+
if (!z) return;
|
|
3356
|
+
const L = lt.__data__.objects.get(z);
|
|
3353
3357
|
if (!L) return;
|
|
3354
|
-
const
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
hidden: Q && A.hideUnconnectedNodes,
|
|
3360
|
-
sizePx: Q || (it = N.meta) == null ? void 0 : it.sizePx
|
|
3358
|
+
const T = Lt[z] ?? 0, O = !(T > 0);
|
|
3359
|
+
L.size = O ? A.hideUnconnectedNodes ? 0 : _n : gn(T, ct), L.meta = {
|
|
3360
|
+
...L.meta ?? {},
|
|
3361
|
+
hidden: O && A.hideUnconnectedNodes,
|
|
3362
|
+
sizePx: O || (st = L.meta) == null ? void 0 : st.sizePx
|
|
3361
3363
|
};
|
|
3362
3364
|
});
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
}), G.forEach(({ col:
|
|
3365
|
+
const qt = {}, Kt = /* @__PURE__ */ l((S, x, z, L) => `${S}:${x ?? ""}:${z}.${L}`, "pairKey");
|
|
3366
|
+
K && G.forEach(({ pair: S, weight: x, layer: z, name: L }) => {
|
|
3367
|
+
const T = Kt(z, L, S[0], S[1]);
|
|
3368
|
+
qt[T] = (qt[T] ?? 0) + x;
|
|
3369
|
+
}), G.forEach(({ col: S, pair: x, weight: z, color: L, exact: T, layer: O, name: st, group: Bt, unit: vt }) => {
|
|
3368
3370
|
var de, ri;
|
|
3369
|
-
const
|
|
3370
|
-
if (!
|
|
3371
|
-
const bt =
|
|
3372
|
-
let
|
|
3371
|
+
const ft = lt.__data__.objects.get(x[0]), At = lt.__data__.objects.get(x[1]);
|
|
3372
|
+
if (!ft || !At) return;
|
|
3373
|
+
const bt = x[0] === x[1], { saturation: H, opacity: it } = ht(z, bt), Z = new tt({ ID: `${x[0]}-src`, dimensions: [ft.x, ft.y], meta: {} }), St = new tt({ ID: `${x[1]}-dst`, dimensions: [At.x, At.y], meta: {} });
|
|
3374
|
+
let ut;
|
|
3373
3375
|
if (bt)
|
|
3374
|
-
|
|
3375
|
-
else if (
|
|
3376
|
-
const
|
|
3377
|
-
|
|
3378
|
-
{ weight:
|
|
3379
|
-
|
|
3376
|
+
ut = new ie({}, Z, St), ut.weight = 0;
|
|
3377
|
+
else if (K) {
|
|
3378
|
+
const $i = qt[Kt(O, st, x[0], x[1])] ?? z, Ti = qt[Kt(O, st, x[1], x[0])] ?? 0, Fi = $i + Ti;
|
|
3379
|
+
ut = new ks(
|
|
3380
|
+
{ weight: z, totalweight: Fi },
|
|
3381
|
+
Z,
|
|
3380
3382
|
St
|
|
3381
3383
|
);
|
|
3382
3384
|
} else
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
+
ut = new ce({}, Z, St);
|
|
3386
|
+
ut.ID = `edge-${S}`, ut.color = new at(L), ut.meta = {
|
|
3385
3387
|
isMeanEdge: !0,
|
|
3386
|
-
weight:
|
|
3388
|
+
weight: z,
|
|
3387
3389
|
// Width per unit weight (extent units), shared by all marks.
|
|
3388
|
-
widthFrac:
|
|
3389
|
-
saturation:
|
|
3390
|
-
opacity:
|
|
3390
|
+
widthFrac: ct,
|
|
3391
|
+
saturation: H,
|
|
3392
|
+
opacity: it,
|
|
3391
3393
|
// <qe-edge color>: drawn as given, without the ramps.
|
|
3392
|
-
exactColor:
|
|
3393
|
-
isDirected:
|
|
3394
|
+
exactColor: T || void 0,
|
|
3395
|
+
isDirected: K,
|
|
3394
3396
|
isSelf: bt,
|
|
3395
3397
|
// Identity for the qe-edge-* interaction events.
|
|
3396
|
-
source:
|
|
3397
|
-
target:
|
|
3398
|
-
group:
|
|
3398
|
+
source: x[0],
|
|
3399
|
+
target: x[1],
|
|
3400
|
+
group: Bt,
|
|
3399
3401
|
unit: vt,
|
|
3400
|
-
layer:
|
|
3402
|
+
layer: st,
|
|
3401
3403
|
// <qe-edges self-size>: self dot radius as a fraction of its node's.
|
|
3402
|
-
selfSize: bt ? ((de = A.edgeLayers[
|
|
3404
|
+
selfSize: bt ? ((de = A.edgeLayers[O]) == null ? void 0 : de.selfSize) ?? void 0 : void 0,
|
|
3403
3405
|
// <qe-edges fixed-size>: thickness keeps its zoom-1 on-screen size.
|
|
3404
|
-
fixedSize: ((ri = A.edgeLayers[
|
|
3405
|
-
}, (bt ?
|
|
3406
|
+
fixedSize: ((ri = A.edgeLayers[O]) == null ? void 0 : ri.fixedSize) || void 0
|
|
3407
|
+
}, (bt ? ei ?? Le : Le).__data__.objects.set(ut.ID, ut);
|
|
3406
3408
|
});
|
|
3407
3409
|
}
|
|
3408
|
-
const
|
|
3409
|
-
lt.svg_element && (lt.svg_element.style.display =
|
|
3410
|
-
lt.__data__.objects.get(
|
|
3411
|
-
}), t.nodes.rows().forEach((
|
|
3412
|
-
var y,
|
|
3413
|
-
const
|
|
3410
|
+
const k = A.showNodes;
|
|
3411
|
+
lt.svg_element && (lt.svg_element.style.display = k ? "" : "none"), k || this._clearLabels(this._nodeLabels), jt && k && (this._nodeLabels.forEach((C, $) => {
|
|
3412
|
+
lt.__data__.objects.get($) || (C.remove(), this._nodeLabels.delete($));
|
|
3413
|
+
}), t.nodes.rows().forEach((C) => {
|
|
3414
|
+
var y, P, v;
|
|
3415
|
+
const $ = C.names.indexOf(Y), M = $ >= 0 ? String(C[$]) : "";
|
|
3414
3416
|
if (!M) return;
|
|
3415
|
-
const
|
|
3416
|
-
if (
|
|
3417
|
-
if ((y =
|
|
3418
|
-
(
|
|
3417
|
+
const N = lt.__data__.objects.get(M);
|
|
3418
|
+
if (N) {
|
|
3419
|
+
if ((y = N.meta) != null && y.hidden) {
|
|
3420
|
+
(P = this._nodeLabels.get(M)) == null || P.remove(), this._nodeLabels.delete(M);
|
|
3419
3421
|
return;
|
|
3420
3422
|
}
|
|
3421
3423
|
this._syncLabel(
|
|
3422
3424
|
this._nodeLabels,
|
|
3423
3425
|
M,
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3426
|
+
Te(C, String(((v = N.meta) == null ? void 0 : v.name) ?? M)),
|
|
3427
|
+
N,
|
|
3428
|
+
jt,
|
|
3429
|
+
Oi,
|
|
3428
3430
|
A.labelWeightNodes
|
|
3429
3431
|
);
|
|
3430
3432
|
}
|
|
3431
3433
|
})), lt.__data__.__state__.setVariable("layer_updated", lt.__data__);
|
|
3432
3434
|
} else
|
|
3433
3435
|
lt == null || lt.__data__.__state__.setVariable("layer_updated", lt.__data__);
|
|
3434
|
-
[
|
|
3435
|
-
const
|
|
3436
|
-
|
|
3436
|
+
[Le, ei].forEach((k) => k == null ? void 0 : k.__data__.__state__.setVariable("layer_updated", k.__data__));
|
|
3437
|
+
const si = this.__children__.search("__children__", "axis_points"), ii = this.__children__.search("__children__", "axis_lines");
|
|
3438
|
+
si && this.__data__.__state__.setVariable("graph_updated_axis_points", si.__data__.objects), ii && this.__data__.__state__.setVariable("graph_updated_axis_lines", ii.__data__.objects), this.update(), w && this._startTween(w);
|
|
3437
3439
|
}
|
|
3438
3440
|
}
|
|
3439
3441
|
/**
|
|
@@ -3449,7 +3451,7 @@ const at = class at extends Xe {
|
|
|
3449
3451
|
_syncLabel(t, e, s, i, n, r, o) {
|
|
3450
3452
|
let a = t.get(e);
|
|
3451
3453
|
const h = s.text != null && (r !== U.DISPLAY_TYPES.OFF || s.pinned);
|
|
3452
|
-
a && (!h || a.text !== s.text || a.displayMode !== r) && (a.remove(), t.delete(e), a = void 0), h && (a ? (a.setPoint(i), r === U.DISPLAY_TYPES.ON && a.show()) : (a = new
|
|
3454
|
+
a && (!h || a.text !== s.text || a.displayMode !== r) && (a.remove(), t.delete(e), a = void 0), h && (a ? (a.setPoint(i), r === U.DISPLAY_TYPES.ON && a.show()) : (a = new Cs(s.text, i, n, this, r), t.set(e, a)), s.offset && a.setOffset(s.offset.x, s.offset.y), a.fontWeight = o, a.setHostPinned(s.pinned));
|
|
3453
3455
|
}
|
|
3454
3456
|
/** Rendered radius of a code node in graph units (for self-size), or null. */
|
|
3455
3457
|
_nodeRadius(t) {
|
|
@@ -3461,17 +3463,29 @@ const at = class at extends Xe {
|
|
|
3461
3463
|
}
|
|
3462
3464
|
/** Remember an interval mark's zoom-1 stroke width and dashes, and apply
|
|
3463
3465
|
* them for the current zoom (see _applyIntervalStroke). */
|
|
3464
|
-
_intervalStroke(t, e, s) {
|
|
3465
|
-
this._intervalBase.set(t, { w: e, dash: s }), this._applyIntervalStroke(t);
|
|
3466
|
-
}
|
|
3467
|
-
/** With <qe-means
|
|
3468
|
-
*
|
|
3469
|
-
*
|
|
3466
|
+
_intervalStroke(t, e, s, i = !1) {
|
|
3467
|
+
this._intervalBase.set(t, { w: e, dash: s, outlier: i }), this._applyIntervalStroke(t);
|
|
3468
|
+
}
|
|
3469
|
+
/** With <qe-means interval-width>, a fixed on-screen width and dash
|
|
3470
|
+
* pattern (non-scaling-stroke, so zoom leaves them alone): interval-dash
|
|
3471
|
+
* (outlier-dash for outlier boxes), else the mark's own pattern in
|
|
3472
|
+
* proportion to its width. Otherwise, with
|
|
3473
|
+
* <qe-means fixed-size>, divide by the zoom level (the zoom group scales
|
|
3474
|
+
* strokes and dashes by it), else the zoom-1 values. Interval marks are
|
|
3475
|
+
* built once per render, so update() re-applies this on zoom. */
|
|
3470
3476
|
_applyIntervalStroke(t) {
|
|
3471
3477
|
const e = this._intervalBase.get(t);
|
|
3472
3478
|
if (!e) return;
|
|
3473
|
-
const s = this.
|
|
3474
|
-
|
|
3479
|
+
const s = this._intervalPx;
|
|
3480
|
+
if (s != null) {
|
|
3481
|
+
t.setAttribute("vector-effect", "non-scaling-stroke"), t.setAttribute("stroke-width", String(s));
|
|
3482
|
+
const n = (e.outlier ? this._outlierDashPx : this._intervalDashPx) ?? (e.dash ? e.dash.map((r) => r / e.w * s) : null);
|
|
3483
|
+
n ? t.setAttribute("stroke-dasharray", n.join(" ")) : t.removeAttribute("stroke-dasharray");
|
|
3484
|
+
return;
|
|
3485
|
+
}
|
|
3486
|
+
t.removeAttribute("vector-effect"), e.dash || t.removeAttribute("stroke-dasharray");
|
|
3487
|
+
const i = this._meansFixedSize && this.zoom_level || 1;
|
|
3488
|
+
t.setAttribute("stroke-width", String(e.w / i)), e.dash && t.setAttribute("stroke-dasharray", e.dash.map((n) => n / i).join(" "));
|
|
3475
3489
|
}
|
|
3476
3490
|
_removeIntervals(t) {
|
|
3477
3491
|
t.forEach((e) => e.remove()), t.clear();
|
|
@@ -3506,7 +3520,7 @@ const at = class at extends Xe {
|
|
|
3506
3520
|
return {
|
|
3507
3521
|
// Nodes — always placed from the model (they anchor the coordinate
|
|
3508
3522
|
// space); <qe-nodes> presence draws them, like every other layer.
|
|
3509
|
-
labelNodes:
|
|
3523
|
+
labelNodes: Fe(
|
|
3510
3524
|
(t == null ? void 0 : t.getAttribute("label")) ?? this._host.getAttribute("label-nodes") ?? f,
|
|
3511
3525
|
U.DISPLAY_TYPES.ON
|
|
3512
3526
|
),
|
|
@@ -3514,7 +3528,7 @@ const at = class at extends Xe {
|
|
|
3514
3528
|
labelWeightNodes: (t == null ? void 0 : t.getAttribute("label-font-weight")) || null,
|
|
3515
3529
|
nodeFixedSize: !!t && t.hasAttribute("fixed-size"),
|
|
3516
3530
|
showNodes: !!t,
|
|
3517
|
-
nodeColors: new Map(
|
|
3531
|
+
nodeColors: new Map(Ci(t, "qe-node", ["node"]).map((_) => [_.node, _.color])),
|
|
3518
3532
|
range: (() => {
|
|
3519
3533
|
const _ = this._host.getAttribute("range");
|
|
3520
3534
|
if (_ === "network" || _ === "points") return _;
|
|
@@ -3532,7 +3546,7 @@ const at = class at extends Xe {
|
|
|
3532
3546
|
},
|
|
3533
3547
|
edgeWidth: (() => {
|
|
3534
3548
|
const _ = Number(this._host.getAttribute("edge-width"));
|
|
3535
|
-
return Number.isFinite(_) && _ > 0 && _ <= 1 ? _ :
|
|
3549
|
+
return Number.isFinite(_) && _ > 0 && _ <= 1 ? _ : rn;
|
|
3536
3550
|
})(),
|
|
3537
3551
|
hideUnconnectedNodes: ((m = t == null ? void 0 : t.getAttribute("unconnected")) == null ? void 0 : m.toLowerCase()) === "hide",
|
|
3538
3552
|
scalePoints: this._host.getAttribute("scale-points") !== "false",
|
|
@@ -3545,13 +3559,22 @@ const at = class at extends Xe {
|
|
|
3545
3559
|
showMeans: !!e,
|
|
3546
3560
|
activeMeanGroups: (e == null ? void 0 : e.getAttribute("groups")) ?? null,
|
|
3547
3561
|
showCI: !!e && e.hasAttribute("confidence"),
|
|
3548
|
-
// intervals="box|crosshairs|none"; absent → the legacy `confidence` flag.
|
|
3562
|
+
// intervals="box|crosshairs|both|none"; absent → the legacy `confidence` flag.
|
|
3549
3563
|
intervals: (() => {
|
|
3550
3564
|
const _ = e == null ? void 0 : e.getAttribute("intervals");
|
|
3551
|
-
return _ === "box" || _ === "crosshairs" || _ === "none" ? _ : e != null && e.hasAttribute("confidence") ? "box" : "none";
|
|
3565
|
+
return _ === "box" || _ === "crosshairs" || _ === "both" || _ === "none" ? _ : e != null && e.hasAttribute("confidence") ? "box" : "none";
|
|
3552
3566
|
})(),
|
|
3567
|
+
// interval-width="1" (px) / interval-dash="10 10 5 10" (px) /
|
|
3568
|
+
// outlier-dash="5 1" (px): fixed on-screen interval lines; absent →
|
|
3569
|
+
// width scales with the plot.
|
|
3570
|
+
intervalWidth: (() => {
|
|
3571
|
+
const _ = parseFloat((e == null ? void 0 : e.getAttribute("interval-width")) ?? "");
|
|
3572
|
+
return Number.isFinite(_) && _ > 0 ? _ : null;
|
|
3573
|
+
})(),
|
|
3574
|
+
intervalDash: pi(e == null ? void 0 : e.getAttribute("interval-dash")),
|
|
3575
|
+
outlierDash: pi(e == null ? void 0 : e.getAttribute("outlier-dash")),
|
|
3553
3576
|
showOutlier: !!e && e.hasAttribute("outlier"),
|
|
3554
|
-
labelMeans:
|
|
3577
|
+
labelMeans: Fe(
|
|
3555
3578
|
(e == null ? void 0 : e.getAttribute("label")) ?? this._host.getAttribute("label-means") ?? f,
|
|
3556
3579
|
U.DISPLAY_TYPES.ON
|
|
3557
3580
|
),
|
|
@@ -3565,13 +3588,13 @@ const at = class at extends Xe {
|
|
|
3565
3588
|
size: _.getAttribute("size") ? parseFloat(_.getAttribute("size")) : null,
|
|
3566
3589
|
fixedSize: _.hasAttribute("fixed-size"),
|
|
3567
3590
|
// Label mode: this set's `label`, else <qe-graph label-points>.
|
|
3568
|
-
labelMode:
|
|
3591
|
+
labelMode: Fe(
|
|
3569
3592
|
_.getAttribute("label") ?? this._host.getAttribute("label-points") ?? f,
|
|
3570
3593
|
U.DISPLAY_TYPES.OFF
|
|
3571
3594
|
),
|
|
3572
3595
|
labelWeight: _.getAttribute("label-font-weight") || null
|
|
3573
3596
|
})),
|
|
3574
|
-
labelPoints:
|
|
3597
|
+
labelPoints: Fe(
|
|
3575
3598
|
(i == null ? void 0 : i.getAttribute("label")) ?? this._host.getAttribute("label-points") ?? f,
|
|
3576
3599
|
U.DISPLAY_TYPES.OFF
|
|
3577
3600
|
),
|
|
@@ -3581,9 +3604,9 @@ const at = class at extends Xe {
|
|
|
3581
3604
|
pointFixedSize: !!i && i.hasAttribute("fixed-size"),
|
|
3582
3605
|
// Edges — presence of <qe-edges> = draw a network.
|
|
3583
3606
|
showEdges: r.length > 0,
|
|
3584
|
-
edgeLayers: r.map(
|
|
3607
|
+
edgeLayers: r.map(vn),
|
|
3585
3608
|
// Plot-wide edge settings: the first <qe-edges> that sets them.
|
|
3586
|
-
edgeColorScale:
|
|
3609
|
+
edgeColorScale: Sn(o("color-scale")),
|
|
3587
3610
|
edgeMagnify: a ? (() => {
|
|
3588
3611
|
const _ = Number(a.getAttribute("magnify"));
|
|
3589
3612
|
return Number.isFinite(_) && _ > 0 ? _ : 1;
|
|
@@ -3622,7 +3645,7 @@ const at = class at extends Xe {
|
|
|
3622
3645
|
connectedCallback() {
|
|
3623
3646
|
var i;
|
|
3624
3647
|
const t = this._host.getAttribute("width"), e = this._host.getAttribute("height");
|
|
3625
|
-
this.style.display = "block", t && (this.style.width = isNaN(Number(t)) ? t : `${t}px`), e && (this.style.height = isNaN(Number(e)) ? e : `${e}px`), this.appendChild(this.svg_element),
|
|
3648
|
+
this.style.display = "block", t && (this.style.width = isNaN(Number(t)) ? t : `${t}px`), e && (this.style.height = isNaN(Number(e)) ? e : `${e}px`), this.appendChild(this.svg_element), ot._instances.add(this), this._childObserver = new MutationObserver(() => this._scheduleRerender()), this._childObserver.observe(this, {
|
|
3626
3649
|
childList: !0,
|
|
3627
3650
|
attributes: !0,
|
|
3628
3651
|
subtree: !0,
|
|
@@ -3645,6 +3668,9 @@ const at = class at extends Xe {
|
|
|
3645
3668
|
"confidence",
|
|
3646
3669
|
"label",
|
|
3647
3670
|
"intervals",
|
|
3671
|
+
"interval-width",
|
|
3672
|
+
"interval-dash",
|
|
3673
|
+
"outlier-dash",
|
|
3648
3674
|
"outlier",
|
|
3649
3675
|
"set",
|
|
3650
3676
|
"unconnected",
|
|
@@ -3700,15 +3726,15 @@ const at = class at extends Xe {
|
|
|
3700
3726
|
}
|
|
3701
3727
|
disconnectedCallback() {
|
|
3702
3728
|
var t, e, s;
|
|
3703
|
-
this._stopTween(), (t = this._childObserver) == null || t.disconnect(), this._childObserver = null, (e = this._resizeObs) == null || e.disconnect(), this._resizeObs = null,
|
|
3729
|
+
this._stopTween(), (t = this._childObserver) == null || t.disconnect(), this._childObserver = null, (e = this._resizeObs) == null || e.disconnect(), this._resizeObs = null, ot._instances.delete(this), (s = this._tooltipEl) == null || s.remove(), this._tooltipEl = null;
|
|
3704
3730
|
}
|
|
3705
3731
|
/** All connected <qe-graph> instances (newest membership order). */
|
|
3706
3732
|
static instances() {
|
|
3707
|
-
return [...
|
|
3733
|
+
return [...ot._instances];
|
|
3708
3734
|
}
|
|
3709
3735
|
/** Look up a graph by its `id` or `plot-group` attribute. */
|
|
3710
3736
|
static getGraph(t) {
|
|
3711
|
-
for (const e of
|
|
3737
|
+
for (const e of ot._instances)
|
|
3712
3738
|
if (e.id === t || e.getAttribute("plot-group") === t) return e;
|
|
3713
3739
|
return null;
|
|
3714
3740
|
}
|
|
@@ -3829,7 +3855,7 @@ const at = class at extends Xe {
|
|
|
3829
3855
|
}
|
|
3830
3856
|
/** A box's x, y, width, height, or a crosshair path's numbers. */
|
|
3831
3857
|
_boxGeom(t) {
|
|
3832
|
-
return t.tagName.toLowerCase() === "rect" ? ["x", "y", "width", "height"].map((e) => parseFloat(t.getAttribute(e) || "0")) : ((t.getAttribute("d") || "").match(
|
|
3858
|
+
return t.tagName.toLowerCase() === "rect" ? ["x", "y", "width", "height"].map((e) => parseFloat(t.getAttribute(e) || "0")) : ((t.getAttribute("d") || "").match(ot._PATH_NUM_RE) || []).map(Number);
|
|
3833
3859
|
}
|
|
3834
3860
|
/** The plot as drawn now — mid-tween, the in-between state — with the
|
|
3835
3861
|
* running tween's clock and targets, so a new render can continue it. */
|
|
@@ -3865,16 +3891,16 @@ const at = class at extends Xe {
|
|
|
3865
3891
|
*/
|
|
3866
3892
|
_startTween(t) {
|
|
3867
3893
|
var b;
|
|
3868
|
-
const e = performance.now(), s = /* @__PURE__ */ l((p, w) => !!w && p.length === w.length && p.every((
|
|
3894
|
+
const e = performance.now(), s = /* @__PURE__ */ l((p, w) => !!w && p.length === w.length && p.every((E, j) => E === w[j]), "same"), i = [];
|
|
3869
3895
|
for (const p of ["points", "nodes"])
|
|
3870
|
-
(b = this._layerObjects(p)) == null || b.forEach((w,
|
|
3871
|
-
const
|
|
3872
|
-
|
|
3896
|
+
(b = this._layerObjects(p)) == null || b.forEach((w, E) => {
|
|
3897
|
+
const j = `${p}:${E}`, Y = t.marks.get(j);
|
|
3898
|
+
Y && i.push({ key: j, o: w, tx: w.x, ty: w.y, cx: Y[0], cy: Y[1] });
|
|
3873
3899
|
});
|
|
3874
3900
|
const n = this._intervalMarks().map((p) => ({ el: p, to: this._boxGeom(p), cur: t.boxes.get(p) })).filter((p) => p.cur && p.cur.length === p.to.length), r = this.__data__.extremes, o = [r.x_max, r.y_max, r.cx, r.cy], a = t.running, h = !!a && a.k < 0.95 && s(o, a.view) && i.every((p) => s([p.tx, p.ty], a.marks.get(p.key) ?? [p.cx, p.cy])) && n.every((p) => s(p.to, a.boxes.get(p.el) ?? p.cur)), g = h ? a.k : 0, f = /* @__PURE__ */ l((p, w) => g > 0 ? (p - g * w) / (1 - g) : p, "from"), m = i.map((p) => ({ key: p.key, o: p.o, tx: p.tx, ty: p.ty, fx: f(p.cx, p.tx), fy: f(p.cy, p.ty) })).filter((p) => p.fx !== p.tx || p.fy !== p.ty), _ = n.map((p) => ({
|
|
3875
3901
|
el: p.el,
|
|
3876
3902
|
to: p.to,
|
|
3877
|
-
from: p.cur.map((w,
|
|
3903
|
+
from: p.cur.map((w, E) => f(w, p.to[E])),
|
|
3878
3904
|
attrs: Object.fromEntries(["x", "y", "width", "height", "d"].filter((w) => p.el.hasAttribute(w)).map((w) => [w, p.el.getAttribute(w)]))
|
|
3879
3905
|
})).filter((p) => !s(p.from, p.to)), d = t.view.map((p, w) => f(p, o[w]));
|
|
3880
3906
|
if (!m.length && !_.length && s(d, o)) return;
|
|
@@ -3889,12 +3915,12 @@ const at = class at extends Xe {
|
|
|
3889
3915
|
const u = /* @__PURE__ */ l((p) => {
|
|
3890
3916
|
const w = this._tween;
|
|
3891
3917
|
if (!w) return;
|
|
3892
|
-
const
|
|
3893
|
-
if (
|
|
3918
|
+
const E = (p - w.t0) / w.dur;
|
|
3919
|
+
if (E >= 1) {
|
|
3894
3920
|
this._endTween();
|
|
3895
3921
|
return;
|
|
3896
3922
|
}
|
|
3897
|
-
this._tweenFrame(Math.max(w.k,
|
|
3923
|
+
this._tweenFrame(Math.max(w.k, ot._ease(Math.max(0, E)))), this._tweenRaf = requestAnimationFrame(u);
|
|
3898
3924
|
}, "step");
|
|
3899
3925
|
this._tweenRaf = requestAnimationFrame(u);
|
|
3900
3926
|
}
|
|
@@ -3904,11 +3930,11 @@ const at = class at extends Xe {
|
|
|
3904
3930
|
if (!e) return;
|
|
3905
3931
|
e.k = t;
|
|
3906
3932
|
const s = /* @__PURE__ */ l((i, n) => i + (n - i) * t, "lerp");
|
|
3907
|
-
e.marks.forEach((i) =>
|
|
3933
|
+
e.marks.forEach((i) => ot._setXY(i.o, s(i.fx, i.tx), s(i.fy, i.ty))), this._attachEdges(), e.boxes.forEach((i) => {
|
|
3908
3934
|
const n = i.from.map((r, o) => s(r, i.to[o]));
|
|
3909
3935
|
if ("d" in i.attrs) {
|
|
3910
3936
|
let r = 0;
|
|
3911
|
-
i.el.setAttribute("d", i.attrs.d.replace(
|
|
3937
|
+
i.el.setAttribute("d", i.attrs.d.replace(ot._PATH_NUM_RE, () => String(n[r++])));
|
|
3912
3938
|
} else
|
|
3913
3939
|
["x", "y", "width", "height"].forEach((r, o) => i.el.setAttribute(r, String(n[o])));
|
|
3914
3940
|
}), this._tweenView = e.view.from.map((i, n) => s(i, e.view.to[n])), this.update();
|
|
@@ -3916,7 +3942,7 @@ const at = class at extends Xe {
|
|
|
3916
3942
|
/** Land exactly on the rendered plot and stop. */
|
|
3917
3943
|
_endTween() {
|
|
3918
3944
|
const t = this._tween;
|
|
3919
|
-
t && (t.marks.forEach((e) =>
|
|
3945
|
+
t && (t.marks.forEach((e) => ot._setXY(e.o, e.tx, e.ty)), this._attachEdges(), t.boxes.forEach((e) => Object.entries(e.attrs).forEach(([s, i]) => e.el.setAttribute(s, i))), this._stopTween(), this.update());
|
|
3920
3946
|
}
|
|
3921
3947
|
/** Put each edge's ends on its nodes' current positions. */
|
|
3922
3948
|
_attachEdges() {
|
|
@@ -3927,7 +3953,7 @@ const at = class at extends Xe {
|
|
|
3927
3953
|
(e = this._layerObjects(s)) == null || e.forEach((i) => {
|
|
3928
3954
|
var o, a;
|
|
3929
3955
|
const n = t.get((o = i.meta) == null ? void 0 : o.source), r = t.get((a = i.meta) == null ? void 0 : a.target);
|
|
3930
|
-
n && i.from &&
|
|
3956
|
+
n && i.from && ot._setXY(i.from, n.x, n.y), r && i.to && ot._setXY(i.to, r.x, r.y);
|
|
3931
3957
|
});
|
|
3932
3958
|
}
|
|
3933
3959
|
/** Serialize the current plot as a standalone SVG string (webENA P2.3). */
|
|
@@ -3935,7 +3961,7 @@ const at = class at extends Xe {
|
|
|
3935
3961
|
const t = this.svg_element.cloneNode(!0);
|
|
3936
3962
|
t.setAttribute("xmlns", "http://www.w3.org/2000/svg"), t.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
3937
3963
|
const e = this.svg_element.getBoundingClientRect();
|
|
3938
|
-
return e.width && t.setAttribute("width", String(Math.round(e.width))), e.height && t.setAttribute("height", String(Math.round(e.height))), typeof XMLSerializer < "u" && !this._headless ? new XMLSerializer().serializeToString(t) :
|
|
3964
|
+
return e.width && t.setAttribute("width", String(Math.round(e.width))), e.height && t.setAttribute("height", String(Math.round(e.height))), typeof XMLSerializer < "u" && !this._headless ? new XMLSerializer().serializeToString(t) : zs(t);
|
|
3939
3965
|
}
|
|
3940
3966
|
/** Rasterize the current plot to a PNG data URL (webENA P2.3). `scale`
|
|
3941
3967
|
* multiplies the pixel dimensions for a higher-resolution image. */
|
|
@@ -4063,7 +4089,7 @@ const at = class at extends Xe {
|
|
|
4063
4089
|
h.setAttribute("d", `M0,0 L0,${i} L${s},${i / 2} z`), h.setAttribute("fill", o), a.appendChild(h), e.appendChild(a);
|
|
4064
4090
|
}, "makeArrow");
|
|
4065
4091
|
return mi.forEach((r) => n(`qe-arrow-${r.slice(1)}`, r)), t.appendChild(e), this.__data__.layers.forEach((r) => {
|
|
4066
|
-
const o = new
|
|
4092
|
+
const o = new Is(r, this.svg_element, this);
|
|
4067
4093
|
this.__children__.push(o);
|
|
4068
4094
|
}), this.__data__.__state__.setVariable("graph_updated", this.__data__), this.attach_events(), t;
|
|
4069
4095
|
}
|
|
@@ -4313,14 +4339,14 @@ const at = class at extends Xe {
|
|
|
4313
4339
|
const t = this.__data__;
|
|
4314
4340
|
if (this._tweenView) {
|
|
4315
4341
|
const [i, n, r, o] = this._tweenView;
|
|
4316
|
-
t.extremes = new
|
|
4342
|
+
t.extremes = new Tt(i, n, r, o);
|
|
4317
4343
|
} else if (t.update_extremes(this._centerContent), this._rangeExtent && this._rangeExtent > 0) {
|
|
4318
4344
|
const { cx: i, cy: n } = t.extremes, r = this._centerContent && this._rangeMode === "network" ? t.nodeExtentFrom(i, n) * 1.2 : this._rangeExtent;
|
|
4319
|
-
t.extremes = new
|
|
4345
|
+
t.extremes = new Tt(r, r, i, n);
|
|
4320
4346
|
}
|
|
4321
4347
|
const e = (s = this.svg_element) == null ? void 0 : s.getBoundingClientRect();
|
|
4322
4348
|
if (this.svg_element && e) {
|
|
4323
|
-
|
|
4349
|
+
he("SVG rect: ", e);
|
|
4324
4350
|
let i, n;
|
|
4325
4351
|
e.width === 0 || e.height === 0 ? (i = 1, n = 1) : (i = e.width, n = e.height), this.__data__.scale_x = 1 / (i / (4 * this.__data__.extremes.x_max)), this.__data__.scale_y = 1 / (n / (4 * this.__data__.extremes.y_max)), this.__children__[0].svg_element.setAttribute("transform", this.__data__.transform.toString()), this.svg_element.setAttribute("viewBox", this.__data__.extremes.as_viewBox(this._viewPadding()));
|
|
4326
4352
|
let r = this.__data__.layers.search("layers", "axis_lines");
|
|
@@ -4328,7 +4354,7 @@ const at = class at extends Xe {
|
|
|
4328
4354
|
let o = r.objects.get("axis-x"), a = r.objects.get("axis-y");
|
|
4329
4355
|
if (o && a) {
|
|
4330
4356
|
const h = this.__data__.extremes;
|
|
4331
|
-
o.from = new
|
|
4357
|
+
o.from = new tt({ ID: "axis-x-start", dimensions: [h.cx - h.x_max, 0], classes: ["ena.dimension", "ena.dimension"] }), o.to = new tt({ ID: "axis-x-end", dimensions: [h.cx + h.x_max, 0], classes: ["ena.dimension", "ena.dimension"] }), a.from = new tt({ ID: "axis-y-start", dimensions: [0, h.cy - h.y_max], classes: ["ena.dimension", "ena.dimension"] }), a.to = new tt({ ID: "axis-y-end", dimensions: [0, h.cy + h.y_max], classes: ["ena.dimension", "ena.dimension"] });
|
|
4332
4358
|
}
|
|
4333
4359
|
}
|
|
4334
4360
|
}
|
|
@@ -4339,8 +4365,8 @@ const at = class at extends Xe {
|
|
|
4339
4365
|
});
|
|
4340
4366
|
}
|
|
4341
4367
|
};
|
|
4342
|
-
l(
|
|
4343
|
-
${
|
|
4368
|
+
l(ot, "QEGraphElement"), ot.tagName = "qe-graph", ot.style = `
|
|
4369
|
+
${Ue.style}
|
|
4344
4370
|
|
|
4345
4371
|
:host {
|
|
4346
4372
|
display: block;
|
|
@@ -4377,73 +4403,73 @@ l(at, "QEGraphElement"), at.tagName = "qe-graph", at.style = `
|
|
|
4377
4403
|
svg [data-layer-name="edges"] path:not([data-edge-source]) {
|
|
4378
4404
|
pointer-events: none;
|
|
4379
4405
|
}
|
|
4380
|
-
`,
|
|
4381
|
-
let Xt =
|
|
4382
|
-
|
|
4383
|
-
function
|
|
4406
|
+
`, ot._instances = /* @__PURE__ */ new Set(), ot._PATH_NUM_RE = /-?\d*\.?\d+(?:e[-+]?\d+)?/gi;
|
|
4407
|
+
let Xt = ot;
|
|
4408
|
+
Mt(Xt.tagName, Xt);
|
|
4409
|
+
function bi(c, t) {
|
|
4384
4410
|
if (t)
|
|
4385
4411
|
for (const [e, s] of Object.entries(t))
|
|
4386
4412
|
s === !1 || s == null || c.setAttribute(e, s === !0 ? "" : String(s));
|
|
4387
4413
|
}
|
|
4388
|
-
l(
|
|
4389
|
-
function
|
|
4414
|
+
l(bi, "setAttrs");
|
|
4415
|
+
function Nn(c, t = {}) {
|
|
4390
4416
|
const e = t.width ?? 600, s = t.height ?? e;
|
|
4391
4417
|
if (!(e > 0) || !(s > 0)) throw new Error(`renderSVG: width and height must be positive (got ${e} × ${s})`);
|
|
4392
|
-
const i =
|
|
4393
|
-
|
|
4418
|
+
const i = De.createElement("qe-graph");
|
|
4419
|
+
bi(i, { width: e, height: s, ...t.graph });
|
|
4394
4420
|
for (const r of t.layers ?? []) {
|
|
4395
|
-
const [o, a] = typeof r == "string" ? [r, void 0] : r, h =
|
|
4396
|
-
|
|
4421
|
+
const [o, a] = typeof r == "string" ? [r, void 0] : r, h = De.createElement(o);
|
|
4422
|
+
bi(h, a), i.appendChild(h);
|
|
4397
4423
|
}
|
|
4398
|
-
const n = new Xt(
|
|
4399
|
-
return n.svg_element.setAttribute("width", String(e)), n.svg_element.setAttribute("height", String(s)), n.mount(), n.renderModel(
|
|
4424
|
+
const n = new Xt(De, i);
|
|
4425
|
+
return n.svg_element.setAttribute("width", String(e)), n.svg_element.setAttribute("height", String(s)), n.mount(), n.renderModel(qi(c)), n;
|
|
4400
4426
|
}
|
|
4401
|
-
l(
|
|
4402
|
-
function
|
|
4403
|
-
const e =
|
|
4404
|
-
return
|
|
4427
|
+
l(Nn, "renderHeadless");
|
|
4428
|
+
function Cn(c, t = {}) {
|
|
4429
|
+
const e = Nn(c, t);
|
|
4430
|
+
return zs(e.svg_element);
|
|
4405
4431
|
}
|
|
4406
|
-
l(
|
|
4407
|
-
const
|
|
4432
|
+
l(Cn, "renderSVG");
|
|
4433
|
+
const zn = /* @__PURE__ */ l((c) => Xt.getGraph(c), "getGraph"), On = /* @__PURE__ */ l(() => Xt.instances(), "getGraphs");
|
|
4408
4434
|
export {
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4435
|
+
at as Color,
|
|
4436
|
+
ee as DataFrame,
|
|
4437
|
+
je as DataFrameColumn,
|
|
4438
|
+
ji as DataFrameColumnType,
|
|
4439
|
+
ae as DataFrameRow,
|
|
4440
|
+
He as Edge,
|
|
4441
|
+
Ns as Graph,
|
|
4442
|
+
vs as HeadlessDocument,
|
|
4417
4443
|
ye as HeadlessElement,
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4444
|
+
ns as QEAxesElement,
|
|
4445
|
+
ss as QEEdgeElement,
|
|
4446
|
+
es as QEEdgesElement,
|
|
4421
4447
|
Xt as QEGraphElement,
|
|
4422
|
-
|
|
4448
|
+
Is as QELayer,
|
|
4423
4449
|
Ct as QELine,
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4450
|
+
Qe as QEMeansElement,
|
|
4451
|
+
Je as QENodeElement,
|
|
4452
|
+
Ke as QENodesElement,
|
|
4427
4453
|
Ae as QEPoint,
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4454
|
+
ts as QEPointsElement,
|
|
4455
|
+
is as QETrajectoriesElement,
|
|
4456
|
+
Ze as QETrajectory,
|
|
4457
|
+
qe as QEVisualElement,
|
|
4458
|
+
Qi as TRAJECTORY_ZERO_EPS,
|
|
4459
|
+
Xe as Trajectory,
|
|
4460
|
+
Be as WeightedColor,
|
|
4461
|
+
nn as fitTrajectory,
|
|
4462
|
+
zn as getGraph,
|
|
4463
|
+
On as getGraphs,
|
|
4464
|
+
De as headlessDocument,
|
|
4465
|
+
yi as ingestModelData,
|
|
4466
|
+
qi as modelFromData,
|
|
4441
4467
|
ci as nearOriginFilter,
|
|
4442
|
-
|
|
4443
|
-
|
|
4468
|
+
Nn as renderHeadless,
|
|
4469
|
+
Cn as renderSVG,
|
|
4444
4470
|
_i as sampleCurve,
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4471
|
+
sn as selectDegree,
|
|
4472
|
+
zs as serializeElement,
|
|
4473
|
+
In as vizENA
|
|
4448
4474
|
};
|
|
4449
4475
|
//# sourceMappingURL=qeviz.es.js.map
|