@graphty/graphty-element 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/AGENTS.md +4 -3
  2. package/dist/ai.js +3 -3
  3. package/dist/catalog.js +28 -27
  4. package/dist/chunks/{AiManager-BBmGJbH4.js → AiManager-BD9XK30e.js} +5 -5
  5. package/dist/chunks/{DataSource-OeN3NeyD.js → DataSource-B8vf2uhW.js} +3 -3
  6. package/dist/chunks/{GraphSession-Bef1AYw9.js → GraphSession-dcwOjGJh.js} +2821 -2743
  7. package/dist/chunks/{GraphtyError-BwcnblTH.js → GraphtyError-B93WRH3e.js} +8 -6
  8. package/dist/chunks/{GraphtyLogger-5KEttFUo.js → GraphtyLogger-CqOVV13Y.js} +2 -2
  9. package/dist/chunks/{NodeStyle-DKj7HjMJ.js → NodeStyle-CtmA7dXi.js} +16 -14
  10. package/dist/chunks/{VoiceInputAdapter-Dr9Gcmds.js → VoiceInputAdapter-D0tHHi9G.js} +1 -1
  11. package/dist/chunks/{XRPivotCameraController-BbfgZWpS.js → XRPivotCameraController-DTfhvhHz.js} +2 -2
  12. package/dist/chunks/{algorithms-CpX56sUB.js → algorithms-BF0X6RPw.js} +780 -635
  13. package/dist/chunks/{capability-check-Blhb2aBB.js → capability-check-BJzlK4oL.js} +1 -1
  14. package/dist/chunks/{detect-Cqwshr9a.js → detect-vJxK7n0D.js} +2 -2
  15. package/dist/chunks/{format-detection-BXGO1lSn.js → format-detection-C80TLQ2e.js} +1 -1
  16. package/dist/chunks/{index-C0mIoumR.js → index-2xkq7wyD.js} +2623 -2241
  17. package/dist/chunks/{optionsFromZod-17lkrAJs.js → optionsFromZod-BuTOFgVM.js} +146 -139
  18. package/dist/chunks/{paletteRegistry-x7WOEKZY.js → paletteRegistry-A63C71Gn.js} +8 -6
  19. package/dist/chunks/{registry-CSba5QGJ.js → registry-jB46Gmeb.js} +1 -1
  20. package/dist/chunks/{scales-BRwl51k8.js → scales-B2d-7Bf0.js} +572 -399
  21. package/dist/chunks/{types-B7bX5c0K.js → types-C_c53VgR.js} +31 -26
  22. package/dist/commands.d.ts +4 -0
  23. package/dist/custom-elements.json +1 -1
  24. package/dist/extend.js +8 -8
  25. package/dist/graphty-catalog.json +245 -12
  26. package/dist/graphty.bundle.js +37836 -36835
  27. package/dist/graphty.js +11 -11
  28. package/dist/logging.js +2 -2
  29. package/dist/schema.d.ts +1 -1
  30. package/dist/schema.js +42 -40
  31. package/dist/session.js +6 -6
  32. package/dist/src/Graph.d.ts +79 -7
  33. package/dist/src/acceleration/AccelerationController.d.ts +14 -3
  34. package/dist/src/acceleration/types.d.ts +78 -0
  35. package/dist/src/algorithms/KCoreAlgorithm.d.ts +26 -0
  36. package/dist/src/algorithms/LinkPredictionAlgorithm.d.ts +41 -0
  37. package/dist/src/catalog/algorithms.d.ts +5 -5
  38. package/dist/src/catalog/index.d.ts +2 -2
  39. package/dist/src/catalog/layouts.d.ts +7 -6
  40. package/dist/src/catalog/types.d.ts +77 -6
  41. package/dist/src/config/EdgeStyle.d.ts +35 -0
  42. package/dist/src/config/index.d.ts +1 -1
  43. package/dist/src/data/GEXFDataSource.d.ts +23 -0
  44. package/dist/src/errors/codes.d.ts +14 -0
  45. package/dist/src/events.d.ts +30 -0
  46. package/dist/src/graphty-element.d.ts +66 -26
  47. package/dist/src/layout/GridLayoutEngine.d.ts +37 -0
  48. package/dist/src/layout/LayoutEngine.d.ts +7 -7
  49. package/dist/src/layout/NGraphLayoutEngine.d.ts +2 -0
  50. package/dist/src/layout/RadialLayoutEngine.d.ts +37 -0
  51. package/dist/src/layout/SimulationLayoutEngine.d.ts +12 -0
  52. package/dist/src/managers/DataManager.d.ts +69 -2
  53. package/dist/src/managers/EventManager.d.ts +10 -4
  54. package/dist/src/managers/GraphContext.d.ts +2 -1
  55. package/dist/src/managers/LayoutManager.d.ts +30 -3
  56. package/dist/src/meshes/MeshCache.d.ts +18 -0
  57. package/dist/src/meshes/NodeEffects.d.ts +16 -11
  58. package/dist/src/meshes/NodeMesh.d.ts +2 -2
  59. package/dist/src/meshes/RichTextParser.d.ts +26 -0
  60. package/dist/src/meshes/RichTextRenderer.d.ts +0 -1
  61. package/dist/src/session/cost/estimate.d.ts +1 -1
  62. package/dist/src/session/layout.d.ts +3 -3
  63. package/dist/src/session/runs/RunsApi.d.ts +1 -1
  64. package/dist/src/session/styles/StylesApi.d.ts +6 -0
  65. package/dist/src/session/styles/intern.d.ts +26 -5
  66. package/dist/src/session/styles/repaint.d.ts +2 -1
  67. package/dist/src/session/types.d.ts +6 -6
  68. package/dist/webgpu.js +2 -2
  69. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
- import { q as he, b as Ie } from "./GraphtyLogger-5KEttFUo.js";
2
- import { K as Me, f as Te } from "./types-B7bX5c0K.js";
3
- import { G as y } from "./GraphtyError-BwcnblTH.js";
1
+ import { q as he, b as Ie } from "./GraphtyLogger-CqOVV13Y.js";
2
+ import { K as Te, f as Me } from "./types-C_c53VgR.js";
3
+ import { G as y } from "./GraphtyError-B93WRH3e.js";
4
4
  import { Graph as _e, accelerated as X } from "@graphty/algorithms";
5
5
  import { INVALID_INDEX as L } from "@graphty/graph-format";
6
6
  import { z as me } from "zod/v4";
@@ -9,7 +9,7 @@ const _ = he({
9
9
  idOf: (e) => e.descriptor.id,
10
10
  descriptorOf: (e) => e.descriptor,
11
11
  implementationOf: (e) => e.compute,
12
- builtInIds: () => Me
12
+ builtInIds: () => Te
13
13
  });
14
14
  function yn(e, t) {
15
15
  const n = e.descriptor;
@@ -52,7 +52,7 @@ function wn(e) {
52
52
  function vn() {
53
53
  _.clearForTesting();
54
54
  }
55
- const ze = ["forceAtlas2", "fruchtermanReingold", "springElectrical", "release"], xe = [
55
+ const ze = ["forceAtlas2", "fruchtermanReingold", "springElectrical", "release"], Ce = [
56
56
  "pageRank",
57
57
  "sssp",
58
58
  "breadthFirstSearch",
@@ -70,11 +70,11 @@ function On(e) {
70
70
  }
71
71
  return t;
72
72
  }
73
- function Ce(e) {
73
+ function xe(e) {
74
74
  const t = {
75
75
  kind: e.backend
76
76
  };
77
- for (const n of xe) {
77
+ for (const n of Ce) {
78
78
  const r = e[n];
79
79
  typeof r == "function" && (t[n] = r.bind(e));
80
80
  }
@@ -84,12 +84,17 @@ const je = ["auto", "off", "required"], kn = "auto";
84
84
  function Nn(e) {
85
85
  return typeof e == "string" && je.includes(e);
86
86
  }
87
- const Pe = "f64", Sn = "f32", An = "acceleration.minNodes", $n = 0, z = he({
87
+ const Pe = "f64", Sn = "f32", An = "acceleration.minNodes", $n = 0, Rn = "RTX 4070 SUPER, headless Chromium, 2026-09-25", En = Object.freeze({
88
+ breadthFirstSearch: 3e5,
89
+ sssp: 3e5,
90
+ pageRank: 5e3,
91
+ connectedComponents: 5e4
92
+ }), z = he({
88
93
  kind: "algorithm",
89
94
  idOf: (e) => e.descriptor.key,
90
95
  descriptorOf: (e) => e.descriptor,
91
96
  implementationOf: (e) => e.descriptor,
92
- builtInIds: () => Te
97
+ builtInIds: () => Me
93
98
  });
94
99
  function Le(e, t) {
95
100
  if (e.descriptor.key !== e.type)
@@ -107,13 +112,13 @@ function Le(e, t) {
107
112
  });
108
113
  z.register(e, t);
109
114
  }
110
- function Rn() {
115
+ function Fn() {
111
116
  return z.descriptors();
112
117
  }
113
- function Fn(e) {
118
+ function In(e) {
114
119
  return z.byId(e);
115
120
  }
116
- function En() {
121
+ function Tn() {
117
122
  z.clearForTesting();
118
123
  }
119
124
  class b extends Error {
@@ -180,7 +185,7 @@ function Ge(e, t, n) {
180
185
  throw new b(e, `must be one of [${i}], got '${String(t)}'`);
181
186
  }
182
187
  }
183
- function He(e, t) {
188
+ function Ue(e, t) {
184
189
  const n = {};
185
190
  for (const [r, i] of Object.entries(e)) {
186
191
  const o = t?.[r] ?? i.default;
@@ -188,14 +193,14 @@ function He(e, t) {
188
193
  }
189
194
  return n;
190
195
  }
191
- function In(e) {
196
+ function Mn(e) {
192
197
  return e;
193
198
  }
194
- function Ue(e, t) {
199
+ function He(e, t) {
195
200
  const n = e.getSnapshot(), r = t === "directed" ? n : e.undirected(n).snapshot, i = r.flags.multigraph ? r.simplified({ weights: "sum" }).snapshot : r;
196
201
  return Be(i, t);
197
202
  }
198
- function Mn(e) {
203
+ function _n(e) {
199
204
  const t = e.getSnapshot();
200
205
  return t.flags.multigraph ? t.edgeCount - t.simplified({ weights: "sum" }).snapshot.edgeCount : 0;
201
206
  }
@@ -212,7 +217,7 @@ function Be(e, t) {
212
217
  }
213
218
  return n;
214
219
  }
215
- const F = /* @__PURE__ */ new Map();
220
+ const E = /* @__PURE__ */ new Map();
216
221
  function Ve(e, t) {
217
222
  if (t === null)
218
223
  return e;
@@ -255,7 +260,7 @@ const Z = class Z {
255
260
  * @returns a freshly built Graph for the algorithm package
256
261
  */
257
262
  algorithmGraph(t) {
258
- return Ue(this.graph.getDataManager(), t);
263
+ return He(this.graph.getDataManager(), t);
259
264
  }
260
265
  /**
261
266
  * The route an algorithm with an accelerated implementation takes.
@@ -291,7 +296,7 @@ const Z = class Z {
291
296
  run: async (p) => {
292
297
  const l = await c.run(
293
298
  h,
294
- (d) => p(X(Ce(d)), u)
299
+ (d) => p(X(xe(d)), u)
295
300
  );
296
301
  return l.accelerated ? { value: l.value, precision: l.precision } : { value: await p(X(null), u), precision: Pe };
297
302
  }
@@ -328,7 +333,7 @@ const Z = class Z {
328
333
  */
329
334
  resolveOptions(t) {
330
335
  const n = this.constructor.optionsSchema;
331
- return Object.keys(n).length === 0 ? {} : He(n, t);
336
+ return Object.keys(n).length === 0 ? {} : Ue(n, t);
332
337
  }
333
338
  /**
334
339
  * Gets the algorithm type
@@ -388,7 +393,7 @@ const Z = class Z {
388
393
  type: r,
389
394
  ...o === void 0 ? {} : { cost: o },
390
395
  ...a === void 0 ? {} : { version: a }
391
- }), F.set(`${i}:${r}`, t), t;
396
+ }), E.set(`${i}:${r}`, t), t;
392
397
  }
393
398
  /**
394
399
  * Gets an algorithm instance from the registry
@@ -399,7 +404,7 @@ const Z = class Z {
399
404
  * @returns A new instance of the algorithm, or null if not found
400
405
  */
401
406
  static get(t, n, r, i) {
402
- const s = F.get(`${n}:${r}`);
407
+ const s = E.get(`${n}:${r}`);
403
408
  return s ? new s(t, i) : null;
404
409
  }
405
410
  /**
@@ -409,7 +414,7 @@ const Z = class Z {
409
414
  * @returns The algorithm class, or null if not found
410
415
  */
411
416
  static getClass(t, n) {
412
- return F.get(`${t}:${n}`) ?? null;
417
+ return E.get(`${t}:${n}`) ?? null;
413
418
  }
414
419
  /**
415
420
  * Get the options schema for this algorithm
@@ -448,7 +453,7 @@ const Z = class Z {
448
453
  */
449
454
  static getRegisteredAlgorithms(t) {
450
455
  const n = [];
451
- for (const r of F.keys())
456
+ for (const r of E.keys())
452
457
  (!t || r.startsWith(`${t}:`)) && n.push(r);
453
458
  return n.sort();
454
459
  }
@@ -478,7 +483,7 @@ function Je(e, t, n) {
478
483
  const r = e.fields.find((i) => i.name === t);
479
484
  return r === void 0 ? t : n === "technical" ? r.technicalName : r.plainName.toLowerCase();
480
485
  }
481
- function x(e, t, n) {
486
+ function C(e, t, n) {
482
487
  const r = e.fields.find((i) => i.name === t)?.unit;
483
488
  return r === void 0 ? "" : n === 1 && r.endsWith("s") ? ` ${r.slice(0, -1)}` : ` ${r}`;
484
489
  }
@@ -486,19 +491,19 @@ function R(e, t) {
486
491
  const n = e.graph[t];
487
492
  return typeof n == "number" && Number.isFinite(n) ? n : void 0;
488
493
  }
489
- function We(e) {
494
+ function Ye(e) {
490
495
  return e[0];
491
496
  }
492
- function Ye(e, t, n) {
493
- const { locale: r, audience: i } = n, s = Je(e, "value", i), o = We(t.top);
497
+ function We(e, t, n) {
498
+ const { locale: r, audience: i } = n, s = Je(e, "value", i), o = Ye(t.top);
494
499
  if (o === void 0 || t.median === null)
495
500
  return `Nothing was measured, so there is no ${s} to report.`;
496
501
  const a = [
497
- `${o.label} has the highest ${s}, at ${m(o.value, r)}${x(e, "value", o.value)}.`,
498
- `The typical element sits at ${m(t.median, r)}${x(e, "value", t.median)}.`
502
+ `${o.label} has the highest ${s}, at ${m(o.value, r)}${C(e, "value", o.value)}.`,
503
+ `The typical element sits at ${m(t.median, r)}${C(e, "value", t.median)}.`
499
504
  ];
500
505
  return t.measured > 0 && t.tiedAtMin / t.measured >= qe && t.min !== null && a.push(
501
- `${m(t.tiedAtMin, r)} of ${m(t.measured, r)} sit at the lowest value, ${m(t.min, r)}${x(e, "value", t.min)}.`
506
+ `${m(t.tiedAtMin, r)} of ${m(t.measured, r)} sit at the lowest value, ${m(t.min, r)}${C(e, "value", t.min)}.`
502
507
  ), t.count > t.measured && a.push(`${m(t.count - t.measured, r)} were not measured.`), a.join(" ");
503
508
  }
504
509
  function Ke(e, t, n) {
@@ -538,7 +543,7 @@ function tt(e, t) {
538
543
  switch (r) {
539
544
  case "node-metric":
540
545
  case "edge-metric":
541
- return Ye(e, n, t);
546
+ return We(e, n, t);
542
547
  case "community":
543
548
  case "layered-grouping":
544
549
  case "category-table":
@@ -558,7 +563,7 @@ function tt(e, t) {
558
563
  return te(n, t);
559
564
  }
560
565
  }
561
- function Tn(e, t) {
566
+ function zn(e, t) {
562
567
  const n = t === "node", r = n ? e.nodeValue : e.edgeValue, i = n ? e.nodeHas : e.edgeHas, s = n ? e.nodeIdOf : e.edgeIdOf;
563
568
  return {
564
569
  value: r,
@@ -610,7 +615,7 @@ function fe(e) {
610
615
  function ge(e) {
611
616
  return /[A-Za-z0-9_]/.test(e);
612
617
  }
613
- function C(e, t, n) {
618
+ function x(e, t, n) {
614
619
  for (let r = t + 1; r < e.length; r++) {
615
620
  if (e[r] === "\\") {
616
621
  r++;
@@ -683,17 +688,17 @@ function ct(e) {
683
688
  continue;
684
689
  }
685
690
  if (r === "`") {
686
- const o = C(e, n, "`");
691
+ const o = x(e, n, "`");
687
692
  t.push({ kind: "literal", text: "", value: ot(e, n, e.slice(n + 1, o)), at: n }), n = o + 1;
688
693
  continue;
689
694
  }
690
695
  if (r === "'") {
691
- const o = C(e, n, "'");
696
+ const o = x(e, n, "'");
692
697
  t.push({ kind: "literal", text: "", value: st(e.slice(n + 1, o)), at: n }), n = o + 1;
693
698
  continue;
694
699
  }
695
700
  if (r === '"') {
696
- const o = C(e, n, '"');
701
+ const o = x(e, n, '"');
697
702
  t.push({ kind: "identifier", text: at(e, n, e.slice(n, o + 1)), at: n }), n = o + 1;
698
703
  continue;
699
704
  }
@@ -774,12 +779,12 @@ function dt(e) {
774
779
  t.at
775
780
  );
776
781
  }
777
- function H(e) {
782
+ function U(e) {
778
783
  if (!S(e, "!"))
779
784
  return dt(e);
780
785
  const t = N(e);
781
786
  e.index++;
782
- const n = H(e);
787
+ const n = U(e);
783
788
  if (n.kind === "path" && n.path.includes("."))
784
789
  throw f(
785
790
  `In JMESPath \`!\` binds tighter than \`.\`, so !${n.path} means (!${n.path.split(".")[0]})${n.path.slice(n.path.indexOf("."))} rather than the opposite of ${n.path}. Write !(${n.path}) for that`,
@@ -790,8 +795,8 @@ function H(e) {
790
795
  return { kind: "not", operand: n };
791
796
  }
792
797
  function re(e) {
793
- const t = H(e), n = N(e), r = n.kind === "operator" ? ut[n.text] : void 0;
794
- return r === void 0 ? t : (e.index++, { kind: "compare", operator: r, left: t, right: H(e) });
798
+ const t = U(e), n = N(e), r = n.kind === "operator" ? ut[n.text] : void 0;
799
+ return r === void 0 ? t : (e.index++, { kind: "compare", operator: r, left: t, right: U(e) });
795
800
  }
796
801
  function ie(e) {
797
802
  let t = re(e);
@@ -935,11 +940,11 @@ function yt(e) {
935
940
  return !1;
936
941
  return !0;
937
942
  }
938
- function _n(e, t) {
943
+ function Cn(e, t) {
939
944
  const { has: n } = e;
940
945
  return (r) => n(r, t);
941
946
  }
942
- function zn(e, t) {
947
+ function xn(e, t) {
943
948
  const { idOf: n } = e;
944
949
  if (n === null)
945
950
  throw new y({
@@ -950,7 +955,7 @@ function zn(e, t) {
950
955
  });
951
956
  return (r) => t.has(n(r));
952
957
  }
953
- function xn(e, t, n) {
958
+ function jn(e, t, n) {
954
959
  const { value: r } = e;
955
960
  return (i) => {
956
961
  const s = n();
@@ -960,7 +965,7 @@ function xn(e, t, n) {
960
965
  return typeof o == "number" && Number.isFinite(o) && o >= s;
961
966
  };
962
967
  }
963
- function Cn(e, t) {
968
+ function Pn(e, t) {
964
969
  const n = pt(e), r = [];
965
970
  if ($(n, r), r.length === 0) {
966
971
  let i = n;
@@ -976,9 +981,9 @@ function Cn(e, t) {
976
981
  }
977
982
  return { paths: Object.freeze(r), test: A(n, t) };
978
983
  }
979
- const U = "results", bt = "$";
980
- function M(e, t) {
981
- return t === void 0 ? `${U}.${e}` : `${U}.${e}.${t}`;
984
+ const H = "results", bt = "$";
985
+ function T(e, t) {
986
+ return t === void 0 ? `${H}.${e}` : `${H}.${e}.${t}`;
982
987
  }
983
988
  const be = {
984
989
  // -- per element ---------------------------------------------------------------------
@@ -1148,7 +1153,7 @@ const be = {
1148
1153
  scope: "graph",
1149
1154
  types: ["number"]
1150
1155
  }
1151
- }, jn = Object.keys(be), q = {
1156
+ }, Ln = Object.keys(be), q = {
1152
1157
  "node-metric": {
1153
1158
  shape: "node-metric",
1154
1159
  primaryField: "value",
@@ -1268,10 +1273,10 @@ const be = {
1268
1273
  function B(e) {
1269
1274
  return q[e];
1270
1275
  }
1271
- function Pn(e) {
1276
+ function Dn(e) {
1272
1277
  return q[e].layer === "highlight";
1273
1278
  }
1274
- function Ln(e, t) {
1279
+ function Gn(e, t) {
1275
1280
  const n = q[e], r = [], i = [
1276
1281
  { names: n.nodeFields, kind: "node" },
1277
1282
  { names: n.edgeFields, kind: "edge" },
@@ -1361,9 +1366,9 @@ class At {
1361
1366
  path(t, n) {
1362
1367
  const r = se(t);
1363
1368
  if (n !== void 0)
1364
- return M(r, n);
1369
+ return T(r, n);
1365
1370
  const i = Nt(t) ?? this.#e.entry(r)?.shape, s = i === void 0 ? null : B(i).primaryField;
1366
- return s === null ? M(r) : M(r, s);
1371
+ return s === null ? T(r) : T(r, s);
1367
1372
  }
1368
1373
  /**
1369
1374
  * The same field, written so a selector expression can read it.
@@ -1413,14 +1418,14 @@ class At {
1413
1418
  return Object.freeze(t);
1414
1419
  }
1415
1420
  }
1416
- function Dn(e) {
1421
+ function Un(e) {
1417
1422
  return new At(e);
1418
1423
  }
1419
- const $t = 20, j = 100, Rt = 100, Ft = Object.freeze([]), Et = Object.freeze(["max", "min-max", "none"]);
1424
+ const $t = 20, j = 100, Rt = 100, Et = Object.freeze([]), Ft = Object.freeze(["max", "min-max", "none"]);
1420
1425
  function we(e) {
1421
- return typeof e == "string" && Et.includes(e);
1426
+ return typeof e == "string" && Ft.includes(e);
1422
1427
  }
1423
- function Gn(e) {
1428
+ function Hn(e) {
1424
1429
  return {
1425
1430
  length: e.length,
1426
1431
  get: (t) => e[t]
@@ -1495,7 +1500,7 @@ function J(e) {
1495
1500
  }
1496
1501
  return Object.freeze(r);
1497
1502
  }
1498
- function Mt(e, t) {
1503
+ function Tt(e, t) {
1499
1504
  let n = Math.min(t, e.length);
1500
1505
  for (; n > 0 && n < e.length && e[n].rank === e[n - 1].rank; )
1501
1506
  n--;
@@ -1512,7 +1517,7 @@ function Mt(e, t) {
1512
1517
  reason: o
1513
1518
  });
1514
1519
  }
1515
- function Tt(e) {
1520
+ function Mt(e) {
1516
1521
  const { smallestPositive: t } = e;
1517
1522
  if (e.measured === 0 || !(e.max > 0) || t === null)
1518
1523
  return !1;
@@ -1520,7 +1525,7 @@ function Tt(e) {
1520
1525
  return Math.log10(e.max) > Math.log10(n);
1521
1526
  }
1522
1527
  function _t(e) {
1523
- return e.measured === 0 || !(e.median > 0) || e.max / e.median <= Rt ? "linear" : Tt(e) ? "log" : "linear";
1528
+ return e.measured === 0 || !(e.median > 0) || e.max / e.median <= Rt ? "linear" : Mt(e) ? "log" : "linear";
1524
1529
  }
1525
1530
  function zt(e, t, n, r) {
1526
1531
  if (!(t > e))
@@ -1546,7 +1551,7 @@ function zt(e, t, n, r) {
1546
1551
  ]
1547
1552
  };
1548
1553
  }
1549
- function xt(e, t, n, r, i) {
1554
+ function Ct(e, t, n, r, i) {
1550
1555
  const s = e > 0 ? 0 : 1, o = s === 0 ? e : n;
1551
1556
  if (!(t > 0) || o === null || !(o > 0))
1552
1557
  return null;
@@ -1576,7 +1581,7 @@ function xt(e, t, n, r, i) {
1576
1581
  }
1577
1582
  };
1578
1583
  }
1579
- function Ct(e) {
1584
+ function xt(e) {
1580
1585
  if (e === void 0)
1581
1586
  return $t;
1582
1587
  if (!Number.isInteger(e) || e < 1 || e > j)
@@ -1606,11 +1611,11 @@ function jt(e, t) {
1606
1611
  return n;
1607
1612
  }
1608
1613
  function Pt(e, t) {
1609
- const n = Ct(t?.bins), r = t?.integerValued ?? !1, i = ve(e), s = _t(i), o = jt(e, n);
1614
+ const n = xt(t?.bins), r = t?.integerValued ?? !1, i = ve(e), s = _t(i), o = jt(e, n);
1610
1615
  if (o !== null) {
1611
1616
  if (o.size === 0)
1612
1617
  return Object.freeze({
1613
- bins: Ft,
1618
+ bins: Et,
1614
1619
  // Nothing was measured, so nothing is on any axis. Reported as linear rather
1615
1620
  // than as the request, because "log scale" over an empty chart is the same false
1616
1621
  // caption this whole return type exists to prevent.
@@ -1629,7 +1634,7 @@ function Pt(e, t) {
1629
1634
  binning: "per-value"
1630
1635
  });
1631
1636
  }
1632
- const u = t?.scale === "log" || t?.scale === "auto" && s === "log" ? xt(i.min, i.max, i.smallestPositive, n, r) : null, c = u ?? zt(i.min, i.max, n, r), h = new Array(c.binCount).fill(0);
1637
+ const u = t?.scale === "log" || t?.scale === "auto" && s === "log" ? Ct(i.min, i.max, i.smallestPositive, n, r) : null, c = u ?? zt(i.min, i.max, n, r), h = new Array(c.binCount).fill(0);
1633
1638
  for (let p = 0; p < e.length; p++) {
1634
1639
  const l = e.get(p);
1635
1640
  Number.isFinite(l) && (h[c.indexOf(l)] += 1);
@@ -1670,13 +1675,13 @@ function V(e, t) {
1670
1675
  get: (r) => ke(n[r][t])
1671
1676
  };
1672
1677
  }
1673
- function W(e, t) {
1678
+ function Y(e, t) {
1674
1679
  return e.ids.map((n, r) => ({ id: n, value: ke(e.records[r][t]) }));
1675
1680
  }
1676
1681
  function ke(e) {
1677
1682
  return typeof e == "number" ? e : Number.NaN;
1678
1683
  }
1679
- function Y(e) {
1684
+ function W(e) {
1680
1685
  return typeof e == "string" || typeof e == "number";
1681
1686
  }
1682
1687
  function P(e) {
@@ -1685,14 +1690,14 @@ function P(e) {
1685
1690
  function g(e, t, n) {
1686
1691
  e[t] === void 0 && (e[t] = n);
1687
1692
  }
1688
- function T(e, t, n) {
1693
+ function M(e, t, n) {
1689
1694
  e[t] === void 0 && (e[t] = n);
1690
1695
  }
1691
1696
  function Ne(e, t) {
1692
1697
  const n = /* @__PURE__ */ new Map();
1693
1698
  for (const r of e.records) {
1694
1699
  const i = r[t];
1695
- Y(i) && n.set(i, (n.get(i) ?? 0) + 1);
1700
+ W(i) && n.set(i, (n.get(i) ?? 0) + 1);
1696
1701
  }
1697
1702
  return n;
1698
1703
  }
@@ -1710,9 +1715,9 @@ function Ae(e, t) {
1710
1715
  }
1711
1716
  function ae(e, t, n) {
1712
1717
  const { statistics: r } = Oe(V(e, "value"));
1713
- for (const i of J(W(e, "value"))) {
1718
+ for (const i of J(Y(e, "value"))) {
1714
1719
  const s = e.index.get(i.id);
1715
- s !== void 0 && (T(e.records[s], "rank", i.rank), T(e.records[s], "percentile", i.percentile));
1720
+ s !== void 0 && (M(e.records[s], "rank", i.rank), M(e.records[s], "percentile", i.percentile));
1716
1721
  }
1717
1722
  r.measured > 0 && (g(t, "min", r.min), g(t, "max", r.max), g(t, "median", r.median), g(t, "mean", r.mean)), g(t, "measured", r.measured), g(t, "tiedAtMin", r.tiedAtMin), g(t, "normalization", Ae(n, "value"));
1718
1723
  }
@@ -1720,14 +1725,14 @@ function ce(e, t, n, r, i) {
1720
1725
  const s = Ne(e, n);
1721
1726
  for (const o of e.records) {
1722
1727
  const a = o[n];
1723
- Y(a) && T(o, r, s.get(a));
1728
+ W(a) && M(o, r, s.get(a));
1724
1729
  }
1725
1730
  g(t, i, s.size), g(t, "sizes", Gt(s));
1726
1731
  }
1727
- function Ht(e, t) {
1728
- for (const r of J(W(e, "score"))) {
1732
+ function Ut(e, t) {
1733
+ for (const r of J(Y(e, "score"))) {
1729
1734
  const i = e.index.get(r.id);
1730
- i !== void 0 && T(e.records[i], "rank", r.rank);
1735
+ i !== void 0 && M(e.records[i], "rank", r.rank);
1731
1736
  }
1732
1737
  const n = [...Ne(e, "category").entries()].map(([r, i]) => ({
1733
1738
  category: String(r),
@@ -1735,7 +1740,7 @@ function Ht(e, t) {
1735
1740
  }));
1736
1741
  n.sort((r, i) => i.count - r.count || Se(r.category, i.category)), g(t, "categories", Object.freeze(n.map((r) => Object.freeze(r))));
1737
1742
  }
1738
- function E(e, t) {
1743
+ function F(e, t) {
1739
1744
  let n = 0;
1740
1745
  for (const r of e.records)
1741
1746
  r[t] === !0 && n++;
@@ -1747,7 +1752,7 @@ function ue(e, t) {
1747
1752
  r[t] !== void 0 && n++;
1748
1753
  return n;
1749
1754
  }
1750
- function Ut(e, t, n, r, i) {
1755
+ function Ht(e, t, n, r, i) {
1751
1756
  switch (e) {
1752
1757
  case "node-metric":
1753
1758
  ae(t, r, i);
@@ -1762,16 +1767,16 @@ function Ut(e, t, n, r, i) {
1762
1767
  ce(t, r, "level", "levelSize", "levelCount");
1763
1768
  break;
1764
1769
  case "category-table":
1765
- Ht(t, r);
1770
+ Ut(t, r);
1766
1771
  break;
1767
1772
  case "path":
1768
- g(r, "length", E(t, "onPath")), g(r, "hops", E(n, "onPath"));
1773
+ g(r, "length", F(t, "onPath")), g(r, "hops", F(n, "onPath"));
1769
1774
  break;
1770
1775
  case "node-set":
1771
- g(r, "count", E(t, "in"));
1776
+ g(r, "count", F(t, "in"));
1772
1777
  break;
1773
1778
  case "edge-set":
1774
- g(r, "count", E(n, "in"));
1779
+ g(r, "count", F(n, "in"));
1775
1780
  break;
1776
1781
  }
1777
1782
  }
@@ -1796,7 +1801,7 @@ function Vt(e, t) {
1796
1801
  if (typeof r != "object" || r === null)
1797
1802
  continue;
1798
1803
  const i = r, s = i.group ?? i.category, o = i.size ?? i.count;
1799
- if (Y(s) && typeof o == "number" && n.push(Object.freeze({ group: s, size: o })), n.length === t)
1804
+ if (W(s) && typeof o == "number" && n.push(Object.freeze({ group: s, size: o })), n.length === t)
1800
1805
  break;
1801
1806
  }
1802
1807
  return Object.freeze(n);
@@ -1887,7 +1892,7 @@ class qt {
1887
1892
  const r = `${String(n)}:${t}`, i = this.#c.get(r);
1888
1893
  if (i !== void 0)
1889
1894
  return i;
1890
- const s = Mt(this.ranking(t), this.#l(n, "n"));
1895
+ const s = Tt(this.ranking(t), this.#l(n, "n"));
1891
1896
  return this.#c.set(r, s), s;
1892
1897
  }
1893
1898
  /**
@@ -2020,7 +2025,7 @@ class qt {
2020
2025
  * @throws A GraphtyError naming what went wrong.
2021
2026
  */
2022
2027
  #f(t) {
2023
- const n = J(W(this.#p(t), t));
2028
+ const n = J(Y(this.#p(t), t));
2024
2029
  return this.#a.set(t, n), n;
2025
2030
  }
2026
2031
  /**
@@ -2087,14 +2092,14 @@ class qt {
2087
2092
  }
2088
2093
  function Jt(e) {
2089
2094
  const t = oe(e.nodes), n = oe(e.edges), r = { ...e.graph };
2090
- Ut(e.shape, t, n, r, e.fields);
2095
+ Ht(e.shape, t, n, r, e.fields);
2091
2096
  for (const i of t.records)
2092
2097
  Object.freeze(i);
2093
2098
  for (const i of n.records)
2094
2099
  Object.freeze(i);
2095
2100
  return new qt(e, t, n, Object.freeze(r));
2096
2101
  }
2097
- function Wt(e) {
2102
+ function Yt(e) {
2098
2103
  const t = e.styles?.config.data.knownFields.nodeLabelPath ?? null;
2099
2104
  if (t === null)
2100
2105
  return;
@@ -2104,10 +2109,10 @@ function Wt(e) {
2104
2109
  return typeof i == "string" || typeof i == "number" ? String(i) : void 0;
2105
2110
  };
2106
2111
  }
2107
- function Hn(e) {
2112
+ function Bn(e) {
2108
2113
  return { exact: !0, precision: "f64", notes: [], ...e };
2109
2114
  }
2110
- const Yt = 1024, Kt = 16;
2115
+ const Wt = 1024, Kt = 16;
2111
2116
  function Zt() {
2112
2117
  return {
2113
2118
  signal: new AbortController().signal,
@@ -2118,12 +2123,12 @@ function Zt() {
2118
2123
  })
2119
2124
  };
2120
2125
  }
2121
- async function Un(e, t, n, r) {
2126
+ async function Vn(e, t, n, r) {
2122
2127
  const i = n.length;
2123
2128
  e.report({ phase: t, completed: 0, total: i });
2124
2129
  let s = performance.now();
2125
2130
  for (let o = 0; o < i; o++)
2126
- o > 0 && o % Yt === 0 && (e.signal.throwIfAborted(), e.report({ phase: t, completed: o, total: i }), performance.now() - s >= Kt && (await e.yieldNow(), s = performance.now())), r(n[o], o);
2131
+ o > 0 && o % Wt === 0 && (e.signal.throwIfAborted(), e.report({ phase: t, completed: o, total: i }), performance.now() - s >= Kt && (await e.yieldNow(), s = performance.now())), r(n[o], o);
2127
2132
  e.signal.throwIfAborted(), e.report({ phase: t, completed: i, total: i });
2128
2133
  }
2129
2134
  function Xt(e, t, n) {
@@ -2133,12 +2138,12 @@ function Xt(e, t, n) {
2133
2138
  technicalName: r?.technicalName ?? e.name,
2134
2139
  kind: e.kind,
2135
2140
  type: e.type,
2136
- path: M(t, e.name),
2141
+ path: T(t, e.name),
2137
2142
  ...r?.unit === void 0 ? {} : { unit: r.unit }
2138
2143
  };
2139
2144
  return e.normalization === void 0 ? i : { ...i, normalization: e.normalization };
2140
2145
  }
2141
- class Bn extends D {
2146
+ class qn extends D {
2142
2147
  /** What the last run published, kept so a caller holding the algorithm can read the result. */
2143
2148
  #e;
2144
2149
  /**
@@ -2224,7 +2229,7 @@ class Bn extends D {
2224
2229
  const i = Date.now(), s = await this.compute(t);
2225
2230
  if (s === null)
2226
2231
  return;
2227
- const o = this.graph.getDataManager(), a = Wt(this.graph), u = Jt({
2232
+ const o = this.graph.getDataManager(), a = Yt(this.graph), u = Jt({
2228
2233
  ...a === void 0 ? {} : { labelOf: a },
2229
2234
  runId: n,
2230
2235
  shape: s.shape,
@@ -2239,7 +2244,7 @@ class Bn extends D {
2239
2244
  return this.#e = u, u;
2240
2245
  }
2241
2246
  }
2242
- function Vn(e, t = "number") {
2247
+ function Jn(e, t = "number") {
2243
2248
  return [
2244
2249
  { name: "value", kind: e, type: t },
2245
2250
  { name: "rank", kind: e, type: "integer" },
@@ -2259,15 +2264,15 @@ const le = [
2259
2264
  { name: "groupCount", kind: "graph", type: "integer" },
2260
2265
  { name: "sizes", kind: "graph", type: "table" }
2261
2266
  ];
2262
- function qn(e) {
2267
+ function Yn(e) {
2263
2268
  return e ? [...le, { name: "modularity", kind: "graph", type: "number" }] : le;
2264
2269
  }
2265
- const Jn = [
2270
+ const Wn = [
2266
2271
  { name: "level", kind: "node", type: "integer" },
2267
2272
  { name: "levelSize", kind: "node", type: "integer" },
2268
2273
  { name: "levelCount", kind: "graph", type: "integer" },
2269
2274
  { name: "sizes", kind: "graph", type: "table" }
2270
- ], Wn = [
2275
+ ], Kn = [
2271
2276
  { name: "onPath", kind: "node", type: "boolean" },
2272
2277
  { name: "order", kind: "node", type: "integer" },
2273
2278
  { name: "onPath", kind: "edge", type: "boolean" },
@@ -2275,18 +2280,18 @@ const Jn = [
2275
2280
  { name: "cost", kind: "graph", type: "number" },
2276
2281
  { name: "hops", kind: "graph", type: "integer" }
2277
2282
  ];
2278
- function Yn(e, t) {
2283
+ function Zn(e, t) {
2279
2284
  return [
2280
2285
  { name: "in", kind: e, type: "boolean" },
2281
2286
  { name: "count", kind: "graph", type: "integer" },
2282
2287
  { ...t, kind: "graph" }
2283
2288
  ];
2284
2289
  }
2285
- const Qt = `${U}.${bt}`;
2290
+ const Qt = `${H}.${bt}`;
2286
2291
  function O(e) {
2287
2292
  return { ...e, path: `${Qt}.${e.name}` };
2288
2293
  }
2289
- function Kn(e) {
2294
+ function Xn(e) {
2290
2295
  return [
2291
2296
  O({
2292
2297
  name: "value",
@@ -2332,7 +2337,7 @@ function Kn(e) {
2332
2337
  ];
2333
2338
  }
2334
2339
  const en = 12;
2335
- function Zn(e, t = {}) {
2340
+ function Qn(e, t = {}) {
2336
2341
  return (tn(e) ? nn(e) : rn(e)).map((r) => {
2337
2342
  const i = { ...r.meta, ...t.meta?.[r.name] }, s = r.node === null ? an(r.name, i, r.failure ?? "the schema could not be converted") : on(r.name, r.node, i), o = t.overrides?.[r.name];
2338
2343
  return o === void 0 ? s : { ...s, ...o };
@@ -2386,7 +2391,7 @@ function Re(e, t) {
2386
2391
  return t.$defs?.[r] ?? e;
2387
2392
  }
2388
2393
  function on(e, t, n) {
2389
- const r = Fe(t, 0), i = cn(r), s = {
2394
+ const r = Ee(t, 0), i = cn(r), s = {
2390
2395
  name: e,
2391
2396
  plainName: n.label ?? K(e),
2392
2397
  technicalName: e,
@@ -2411,7 +2416,7 @@ function an(e, t, n) {
2411
2416
  };
2412
2417
  return t.description !== void 0 && (r.description = t.description), t.step !== void 0 && (r.step = t.step), t.group !== void 0 && (r.group = t.group), t.advanced !== void 0 && (r.advanced = t.advanced), r;
2413
2418
  }
2414
- function Fe(e, t) {
2419
+ function Ee(e, t) {
2415
2420
  if (t >= en)
2416
2421
  return { arms: [], nullable: !1, unresolvedRef: !0 };
2417
2422
  if (e.$ref !== void 0)
@@ -2421,7 +2426,7 @@ function Fe(e, t) {
2421
2426
  return e.type === "null" ? { arms: [], nullable: !0, unresolvedRef: !1 } : { arms: [e], nullable: !1, unresolvedRef: !1 };
2422
2427
  const r = { arms: [], nullable: !1, unresolvedRef: !1 };
2423
2428
  for (const i of n) {
2424
- const s = Fe(i, t + 1);
2429
+ const s = Ee(i, t + 1);
2425
2430
  r.arms.push(...s.arms), r.nullable = r.nullable || s.nullable, r.unresolvedRef = r.unresolvedRef || s.unresolvedRef;
2426
2431
  }
2427
2432
  return r;
@@ -2440,14 +2445,14 @@ function cn(e) {
2440
2445
  return { type: "enum", node: e.arms[0], values: t };
2441
2446
  if (e.arms.length === 1)
2442
2447
  return un(e.arms[0]);
2443
- const n = e.arms.map((r) => Ee(r));
2448
+ const n = e.arms.map((r) => Fe(r));
2444
2449
  return n.length === 2 && n.includes("string") && n.includes("number") ? { type: "node-id" } : {
2445
2450
  type: "unknown",
2446
2451
  unsupportedReason: `the schema is a union of ${n.join(" and ")}, which has no single control`
2447
2452
  };
2448
2453
  }
2449
2454
  function un(e) {
2450
- switch (Ee(e)) {
2455
+ switch (Fe(e)) {
2451
2456
  case "integer":
2452
2457
  return { type: "integer", node: e };
2453
2458
  case "number":
@@ -2496,7 +2501,7 @@ function ln(e) {
2496
2501
  }
2497
2502
  return n;
2498
2503
  }
2499
- function Ee(e) {
2504
+ function Fe(e) {
2500
2505
  const { type: t } = e;
2501
2506
  return typeof t == "string" ? t : Array.isArray(t) && t.length > 0 ? t[0] : "none";
2502
2507
  }
@@ -2509,57 +2514,59 @@ function K(e) {
2509
2514
  return t === "" ? e : t.split(/\s+/u).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ");
2510
2515
  }
2511
2516
  export {
2517
+ Un as $,
2512
2518
  D as A,
2513
- Fn as B,
2519
+ In as B,
2514
2520
  Pe as C,
2515
2521
  Sn as D,
2516
2522
  On as E,
2517
2523
  wn as F,
2518
- Wt as G,
2524
+ Yt as G,
2519
2525
  Jt as H,
2520
2526
  $n as I,
2521
2527
  An as J,
2522
- ve as K,
2523
- Jn as L,
2524
- Gn as M,
2525
- Cn as N,
2528
+ En as K,
2529
+ Wn as L,
2530
+ Rn as M,
2531
+ ve as N,
2526
2532
  b as O,
2527
- Wn as P,
2528
- Tn as Q,
2529
- jn as R,
2530
- B as S,
2531
- kt as T,
2532
- xn as U,
2533
- zn as V,
2534
- _n as W,
2535
- Pn as X,
2533
+ Kn as P,
2534
+ Hn as Q,
2535
+ Ln as R,
2536
+ Pn as S,
2537
+ zn as T,
2538
+ B as U,
2539
+ kt as V,
2540
+ jn as W,
2541
+ xn as X,
2536
2542
  Kt as Y,
2537
- Dn as Z,
2538
- Mn as _,
2539
- Bn as a,
2540
- En as b,
2541
- Ln as c,
2543
+ Cn as Z,
2544
+ Dn as _,
2545
+ qn as a,
2546
+ _n as a0,
2547
+ Tn as b,
2548
+ Gn as c,
2542
2549
  vn as d,
2543
- qn as e,
2544
- Hn as f,
2545
- In as g,
2546
- Un as h,
2547
- Vn as i,
2548
- Rn as j,
2550
+ Yn as e,
2551
+ Bn as f,
2552
+ Mn as g,
2553
+ Vn as h,
2554
+ Jn as i,
2555
+ Fn as j,
2549
2556
  bn as k,
2550
- He as l,
2557
+ Ue as l,
2551
2558
  O as m,
2552
- Kn as n,
2553
- Zn as o,
2559
+ Xn as n,
2560
+ Qn as o,
2554
2561
  je as p,
2555
2562
  kn as q,
2556
2563
  yn as r,
2557
- Yn as s,
2558
- U as t,
2564
+ Zn as s,
2565
+ H as t,
2559
2566
  q as u,
2560
2567
  De as v,
2561
2568
  tt as w,
2562
2569
  Nn as x,
2563
2570
  gt as y,
2564
- M as z
2571
+ T as z
2565
2572
  };