@reposkein/mcp 0.2.3 → 0.2.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "reposkein-indexer-darwin-arm64": "dada57808bf5134a12d785fe0da6bdd00dc9a2e345d6ab5eb2cacd45dd2d589a",
3
- "reposkein-indexer-linux-arm64": "1ebabcfc1aac83e21309087ffb9f346a239483ee49406ceed62c9cfc155bc840",
4
- "reposkein-indexer-linux-x64": "89de24d9dd63dffb1fbf7d0331eefdd7a6b2257a9df7b9f980e2c27d29ebae65",
5
- "reposkein-indexer-win32-x64.exe": "8b2d436a6260e0b522995c16fcf7d7d9c8227e2c3ef0d52ec1ff1c0130c9978d"
2
+ "reposkein-indexer-darwin-arm64": "90ca237575087afd2c1f0e7d03f5847acd38ff325a0163dbed5a6f67a1a670cb",
3
+ "reposkein-indexer-linux-arm64": "a87aa938930b6b30b43285d5a4c425f74392bff4d839e0f449c96133507a9880",
4
+ "reposkein-indexer-linux-x64": "f0dd189fdb889e8fdbdc6b8cf5d9fd0b2b1a63608c0683560014a1e73742b4c2",
5
+ "reposkein-indexer-win32-x64.exe": "c7603da80bf9632f6c9d6dd5c95bfebfe0080ed3807d50b000df967f44fe38d8"
6
6
  }
package/dist/index.js CHANGED
@@ -216,7 +216,11 @@ if (invokedAsBin()) {
216
216
  }
217
217
  else if (sub === "view") {
218
218
  const { repoPath, opts, exportDir } = parseViewArgs(process.argv.slice(3));
219
- const vRepoId = resolveRepoId(repoPath, process.env.REPOSKEIN_REPO_ID) ?? "repo";
219
+ const resolvedViewRepoId = resolveRepoId(repoPath, process.env.REPOSKEIN_REPO_ID);
220
+ if (!resolvedViewRepoId) {
221
+ console.error(`reposkein view: could not resolve repo id (no meta.json / REPOSKEIN_REPO_ID); falling back to placeholder "repo"`);
222
+ }
223
+ const vRepoId = resolvedViewRepoId ?? "repo";
220
224
  const run = exportDir
221
225
  ? runExport(repoPath, vRepoId, exportDir)
222
226
  : runView(repoPath, vRepoId, opts);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;uDA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AG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;SAAM,CAAC;QACN,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -3,10 +3,6 @@ export interface SpawnResult {
3
3
  stdout: string;
4
4
  stderr: string;
5
5
  }
6
- /** Path to the indexer binary: REPOSKEIN_INDEXER_BIN or `reposkein-indexer`.
7
- * @deprecated Superseded by ensureIndexerBinary() in fetchBinary.ts (M4-D1).
8
- * Kept for back-compat; prefer ensureIndexerBinary() in new code. */
9
- export declare function indexerBinPath(): string;
10
6
  /** Repo root the indexer operates on: REPOSKEIN_REPO_PATH or cwd. */
11
7
  export declare function repoPath(): string;
12
8
  export declare function spawnIndexer(bin: string, args: string[]): Promise<SpawnResult>;
@@ -13,12 +13,6 @@ function buildChildEnv() {
13
13
  }
14
14
  return env;
15
15
  }
16
- /** Path to the indexer binary: REPOSKEIN_INDEXER_BIN or `reposkein-indexer`.
17
- * @deprecated Superseded by ensureIndexerBinary() in fetchBinary.ts (M4-D1).
18
- * Kept for back-compat; prefer ensureIndexerBinary() in new code. */
19
- export function indexerBinPath() {
20
- return process.env.REPOSKEIN_INDEXER_BIN ?? "reposkein-indexer";
21
- }
22
16
  /** Repo root the indexer operates on: REPOSKEIN_REPO_PATH or cwd. */
23
17
  export function repoPath() {
24
18
  return process.env.REPOSKEIN_REPO_PATH ?? process.cwd();
@@ -1 +1 @@
1
- {"version":3,"file":"runIndexer.js","sourceRoot":"","sources":["../../src/indexer/runIndexer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB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AK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,KAAK,CAAC,2BAA2B,kBAAkB,IAAI,CAAC,CAAC,CAAC;QACvE,CAAC,EAAE,kBAAkB,CAAC,CAAC;QAEvB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAWD,sFAAsF;AACtF,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,OAAO,MAAwB,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;yDAEyD;AACzD,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IACnE,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AACtC,CAAC"}
@@ -40,6 +40,14 @@ export interface ImpactResult {
40
40
  * BFS over callers to bounded depth with a maxNodes cap.
41
41
  * NeighborRow does not carry file_path, so we fetch it via store.getNode().
42
42
  * Deterministic ordering: depth asc, then node_id asc.
43
+ *
44
+ * Edge scope (recorded decision): the neighborhood is CALLS-only — store.callers()
45
+ * walks reverse CALLS edges and nothing else. INSTANTIATES edges exist in the
46
+ * committed graph (for read_cypher / visualization) but are DELIBERATELY excluded
47
+ * from impact/profile traversal in both backends. Instantiation is a weaker
48
+ * "who-might-break" signal than a call edge, and including it would inflate
49
+ * neighborhoods with constructor sites that aren't true callers. This is
50
+ * intentional parity, not an oversight; do not add INSTANTIATES here.
43
51
  */
44
52
  export declare function computeImpact(store: GraphStore, repoIds: string[], targetId: string, targetQN: string, targetFile: string, opts: {
45
53
  depth: number;
@@ -46,6 +46,14 @@ export function isTestPath(filePath) {
46
46
  * BFS over callers to bounded depth with a maxNodes cap.
47
47
  * NeighborRow does not carry file_path, so we fetch it via store.getNode().
48
48
  * Deterministic ordering: depth asc, then node_id asc.
49
+ *
50
+ * Edge scope (recorded decision): the neighborhood is CALLS-only — store.callers()
51
+ * walks reverse CALLS edges and nothing else. INSTANTIATES edges exist in the
52
+ * committed graph (for read_cypher / visualization) but are DELIBERATELY excluded
53
+ * from impact/profile traversal in both backends. Instantiation is a weaker
54
+ * "who-might-break" signal than a call edge, and including it would inflate
55
+ * neighborhoods with constructor sites that aren't true callers. This is
56
+ * intentional parity, not an oversight; do not add INSTANTIATES here.
49
57
  */
50
58
  export async function computeImpact(store, repoIds, targetId, targetQN, targetFile, opts) {
51
59
  const { depth: maxDepth, maxNodes } = opts;
@@ -1 +1 @@
1
- {"version":3,"file":"impact.js","sourceRoot":"","sources":["../../src/profile/impact.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,MAAM,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QACzC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAA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CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC;YACX,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;IACL,CAAC;IAED,sDAAsD;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAEhF,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAExD,OAAO;QACL,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE;QAC9E,KAAK,EAAE,QAAQ;QACf,QAAQ;QACR,cAAc;QACd,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAC,MAAM;YACzB,cAAc,EAAE,cAAc,CAAC,MAAM;YACrC,SAAS;SACV;KACF,CAAC;AACJ,CAAC"}
@@ -124,8 +124,17 @@ export function buildFederatedGraph(repos) {
124
124
  }
125
125
  }
126
126
  // M3: cross-repo IMPORTS edges (File -> child File) from external_import_targets,
127
- // for backend parity with Neo4j's stitch_cross_repo_imports. Added to `edges`
128
- // (no dedicated reader yet — the committed property already carries the data).
127
+ // for backend parity with Neo4j's stitch_cross_repo_imports. Added to `edges`.
128
+ //
129
+ // Read-tool scope (intentional parity): these stitched cross-repo IMPORTS — and
130
+ // the INHERITS/IMPLEMENTS heritage edges injected in step 4 below — are computed
131
+ // into the merged graph but are NOT walked by any read tool's traversal. impact /
132
+ // get_context_profile neighborhoods are CALLS-only (see profile/impact.ts), so
133
+ // the only consumers of these edges today are read_cypher and the visualization
134
+ // exporter. This deliberately mirrors the Neo4j tool surface: that backend also
135
+ // stitches these edges (stitch_cross_repo_imports / stitch_cross_repo_heritage)
136
+ // without exposing a dedicated traversal reader. The edges exist for
137
+ // read_cypher / visualization + future traversal, and both backends agree.
129
138
  for (const n of nodes) {
130
139
  const targets = n.props.external_import_targets;
131
140
  if (!Array.isArray(targets))
@@ -1 +1 @@
1
- {"version":3,"file":"jsonlGraph.js","sourceRoot":"","sources":["../../src/store/jsonlGraph.ts"],"names":[],"mappings":"AAAA;;oFAEoF;AA0BpF,SAAS,aAAa,CAAC,IAAY,EAAE,MAAc;IACjD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA4B,CAAC;IACxD,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;IAClB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAClE,MAAM,KAAK,GAA4B,EAAE,GAAG,GAAG,EAAE,CAAC;IAClD,OAAO,KAAK,CAAC,EAAE,CAAC;IAChB,OAAO,KAAK,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;AACjG,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAA4B,CAAC;IACxD,MAAM,IAAI,GAAG,GAAG,CAA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,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS,CAAC,uBAAuB;YACvD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAE,CAAC;YAClB,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;YACrG,KAAK,CAAC,IAAI,CAAC;gBACT,IAAI,EAAE,CAAC,CAAC,EAAE;gBACV,IAAI;gBACJ,EAAE,EAAE,CAAC,CAAC,EAAE;gBACR,KAAK,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;aACvF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AACpD,CAAC"}
@@ -7,5 +7,10 @@ export interface ImpactArgs {
7
7
  depth?: number;
8
8
  federated?: boolean;
9
9
  }
10
- /** Builds the impact tool handler bound to a store and repo. */
10
+ /** Builds the impact tool handler bound to a store and repo.
11
+ *
12
+ * Impact neighborhoods are CALLS-based only (see computeImpact). INSTANTIATES
13
+ * edges are captured in the committed graph for read_cypher/visualization but are
14
+ * intentionally NOT traversed here (recorded decision, matched across both
15
+ * backends) — instantiation sites are not treated as impact-bearing callers. */
11
16
  export declare function makeImpact(store: GraphStore, repoId: string): (args: ImpactArgs) => Promise<ToolResult>;
@@ -4,7 +4,12 @@ import { federationIds } from "../store/federation.js";
4
4
  function clamp(val, min, max) {
5
5
  return Math.min(Math.max(val, min), max);
6
6
  }
7
- /** Builds the impact tool handler bound to a store and repo. */
7
+ /** Builds the impact tool handler bound to a store and repo.
8
+ *
9
+ * Impact neighborhoods are CALLS-based only (see computeImpact). INSTANTIATES
10
+ * edges are captured in the committed graph for read_cypher/visualization but are
11
+ * intentionally NOT traversed here (recorded decision, matched across both
12
+ * backends) — instantiation sites are not treated as impact-bearing callers. */
8
13
  export function makeImpact(store, repoId) {
9
14
  return async (args) => {
10
15
  const sel = {
@@ -1 +1 @@
1
- {"version":3,"file":"impact.js","sourceRoot":"","sources":["../../src/tools/impact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAWvD,SAAS,KAAK,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW;IAClD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,UAAU,CAAC,KAAiB,EAAE,MAAc;IAC1D,OAAO,KAAK,EAAE,IAAgB,EAAuB,EAAE;QACrD,MAAM,GAAG,GAAa;YACpB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;YAChD,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,kDAAkD,EAAE,CAAC;gBACrF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,C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AC,EAAE,EACT,MAAM,CAAC,cAAc,EACrB,MAAM,CAAC,SAAS,EAChB,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CACzB,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;aAC1D,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAG,CAAW,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import{a as _,j as y,u as Bn,f as vt,c as Dn,d as On,e as $n,R as qn,h as Hn,i as Gn,Q as Wn,k as Un,l as Yn,m as Xn,n as Vn,o as Zn,p as Qn,O as Jn}from"./tanstack-DyXcNRWk.js";import{u as ht,H as eo,a as rn,C as to,b as no,S as oo,E as so,B as ro,c as io}from"./r3f-Cku1OhB-.js";import{a1 as co,_ as we,$ as ge,n as Ne,a2 as ao,a3 as Ee,a4 as lo,a5 as cn,m as uo,c as wt,j as fo,l as po,a6 as ho}from"./three-Z8XaLGmf.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function go(e){return new Worker(""+new URL("graph.worker-CC7BeE-8.js",import.meta.url).href,{type:"module",name:e?.name})}function St(e){const t=new Map;for(const h of e.clusters)t.set(h.key,h);const n=new Map;e.keys.forEach((h,S)=>n.set(h,S));const o=new Map(e.records),s=new Map;for(const h of t.values())h.nodeId&&s.set(h.nodeId,h.key);const r=new Map,i=h=>{const S=r.get(h);if(S)return S;const w=t.get(h);if(!w)return[h];const m=w.parent?[...i(w.parent),h]:[h];return r.set(h,m),m};for(const h of t.keys())i(h);let c=1/0,l=1/0,a=1/0,u=-1/0,f=-1/0,g=-1/0;for(let h=0;h<e.positions.length;h+=3){const S=e.positions[h],w=e.positions[h+1],m=e.positions[h+2];S<c&&(c=S),w<l&&(l=w),m<a&&(a=m),S>u&&(u=S),w>f&&(f=w),m>g&&(g=m)}const p=e.positions.length===0?1:Math.hypot(u-c,f-l,g-a)||1,d=new Map;for(const[h,S]of s){const w=r.get(S);if(w){for(let m=w.length-1;m>=0;m--)if(t.get(w[m])?.kind==="file"){d.set(h,w[m]);break}}}const b=new Map,x=(h,S)=>{let w=b.get(h);w||(w=new Set,b.set(h,w)),w.add(S)};for(const h of e.drawEdges)x(h.from,h.to),x(h.to,h.from);return{repoId:e.repoId,repoRoot:e.repoRoot,rootKey:e.rootKey,byKey:t,keys:e.keys,positions:e.positions,indexByKey:n,drawEdges:e.drawEdges,records:o,fingerprint:e.fingerprint,counts:e.counts,clusterOfNode:s,ancestors:r,sceneDiag:p,fileByNode:d,neighborsByNode:b}}function de(e,t){const n=new Set,o=s=>{const r=e.byKey.get(s);if(!r)return;const i=t.has(s);if(r.children.length===0||!i){n.add(s);return}for(const c of r.children)o(c)};return o(e.rootKey),n}function ue(e,t,n){const o=e.clusterOfNode.get(t)??t,s=e.ancestors.get(o);if(!s)return n.has(o)?o:null;for(let r=s.length-1;r>=0;r--){const i=s[r];if(n.has(i))return i}return null}function ot(e,t,n){return ue(e,t,n)}function yo(e,t,n){return ue(e,t,n)}function an(e,t,n){if(!t)return null;const o=new Set;for(const s of t.nodes){const r=ue(e,s,n);r&&o.add(r)}return o}function ln(e,t){return e.fileByNode.get(t)??null}function xo(e,t,n){if(!t)return null;const o=new Set,s=ue(e,t,n);s&&o.add(s);const r=e.neighborsByNode.get(t);if(r)for(const i of r){const c=ue(e,i,n);c&&o.add(c)}return o}function Pe(e,t){const n=e.clusterOfNode.get(t)??t,o=e.ancestors.get(n);if(!o)return[];const s=[];for(const r of o){const i=e.byKey.get(r);i&&i.children.length>0&&s.push(r)}return s}function Xe(e,t,n){const o=new Set(t);for(const s of n)for(const r of Pe(e,s))o.add(r);return o}function mo(e,t){const n=t.audit==="ambiguous"?new Set(["ambiguous"]):t.audit==="ambiguous+name"?new Set(["ambiguous","name_match"]):null;return n!==null||t.edgeTypes.size>0||t.minConfidence>0?{...e,drawEdges:e.drawEdges.filter(s=>n?n.has(s.resolution):(t.edgeTypes.size===0||!t.edgeTypes.has(s.type))&&s.confidence>=t.minConfidence)}:e}const _t={exact:3,name_match:2,ambiguous:1},bo="symbol",kt=2500;function Et(e,t,n,o){const s=ue(e,t,n);if(!s)return null;if(e.byKey.get(s)?.kind!==bo)return s;const r=ln(e,t);return r&&o.has(r)?s:r&&n.has(r)?r:s}function un(e,t){const n=de(e,t.expanded),o=mo(e,t.filters),s=new Set;for(const b of t.activeNodes){const x=ln(e,b);x&&s.add(x)}for(const b of t.expanded)e.byKey.get(b)?.kind==="file"&&s.add(b);const r=new Map,i=new Map;for(const b of o.drawEdges){const x=Et(e,b.from,n,s),h=Et(e,b.to,n,s);if(!x||!h||x===h)continue;const S=`${x} ${h}`;let w=r.get(S);w||(w={srcKey:x,dstKey:h,count:0,dominantType:b.type,bestResolution:b.resolution,srcNodes:new Set,dstNodes:new Set,lengthAtten:1},r.set(S,w),i.set(S,new Map)),w.count++,w.srcNodes.add(b.from),w.dstNodes.add(b.to),_t[b.resolution]>_t[w.bestResolution]&&(w.bestResolution=b.resolution);const m=i.get(S);m.set(b.type,(m.get(b.type)??0)+1)}for(const[b,x]of r){const h=i.get(b);let S=x.dominantType,w=-1;for(const[m,v]of[...h.entries()].sort((k,E)=>k[0]<E[0]?-1:1))v>w&&(w=v,S=m);x.dominantType=S}const c=.35*e.sceneDiag,l=.9*e.sceneDiag,a=.12,u=e.positions,f=e.indexByKey;for(const b of r.values()){const x=f.get(b.srcKey),h=f.get(b.dstKey);if(x===void 0||h===void 0)continue;const S=u[x*3]-u[h*3],w=u[x*3+1]-u[h*3+1],m=u[x*3+2]-u[h*3+2],v=Math.sqrt(S*S+w*w+m*m);b.lengthAtten=v<=c?1:v>=l?a:1-(1-a)*((v-c)/(l-c))}const g=r.size,p=[...r.values()].sort((b,x)=>b.count!==x.count?x.count-b.count:b.srcKey!==x.srcKey?b.srcKey<x.srcKey?-1:1:b.dstKey<x.dstKey?-1:1),d=p.length>kt?p.slice(0,kt):p;return d.sort((b,x)=>b.srcKey===x.srcKey?b.dstKey<x.dstKey?-1:1:b.srcKey<x.srcKey?-1:1),{bundles:d,visible:n,activeFiles:s,total:g}}const st=["CALLS","IMPORTS","INHERITS","IMPLEMENTS","INSTANTIATES"],vo=["INHERITS","IMPLEMENTS","INSTANTIATES"];function Ve(e){const t=new Set(e);return st.filter(n=>!t.has(n))}const fn={all:{id:"all",label:"All",hint:"Show everything (default)",kinds:[],edgeTypes:[],minConfidence:0,emphasis:"none"},calls:{id:"calls",label:"Call graph",hint:"Only CALLS edges",kinds:[],edgeTypes:Ve(["CALLS"]),minConfidence:0,emphasis:"none"},types:{id:"types",label:"Type hierarchy",hint:"Only INHERITS / IMPLEMENTS / INSTANTIATES; emphasize Class / Interface / Enum",kinds:[],edgeTypes:Ve(vo),minConfidence:0,emphasis:"types"},imports:{id:"imports",label:"Imports",hint:"Only IMPORTS edges",kinds:[],edgeTypes:Ve(["IMPORTS"]),minConfidence:0,emphasis:"none"},tests:{id:"tests",label:"Tests ↔ code",hint:"Highlight test nodes and the edges between tests and non-tests",kinds:[],edgeTypes:[],minConfidence:0,emphasis:"tests"}},wo=["all","calls","types","imports","tests"],So=new Set(["class","interface","enum"]);function _o(e){const t=fn[e];return{kinds:new Set(t.kinds),edgeTypes:new Set(t.edgeTypes),minConfidence:t.minConfidence,emphasis:t.emphasis}}const ko=[/(^|[/\\])test_[^/\\]*\.[^/\\]+$/i,/_tests?\.[^/\\]+$/i,/\.(test|spec)\.[^/\\]+$/i,/[^/\\]+Tests?\.(java|cs|kt|scala)$/i],Eo=new Set(["test","tests","__tests__","spec","specs","testing"]);function Mo(e){if(!e)return!1;for(const n of ko)if(n.test(e))return!0;const t=e.split(/[/\\]/);for(const n of t)if(Eo.has(n.toLowerCase()))return!0;return!1}function dn(e){return e.role==="testing"?!0:Mo(e.filePath)}function No(e,t){const n=new Map;for(const i of e.drawEdges){if(i.type!=="CALLS")continue;const c=n.get(i.to);c?c.push(i.from):n.set(i.to,[i.from])}const o=new Set,s=[t];for(;s.length>0;){const i=s.shift(),c=n.get(i);if(c)for(const l of c)l===t||o.has(l)||(o.add(l),s.push(l))}const r=new Set;for(const i of o){const c=e.records.get(i);c&&dn(c)&&r.add(i)}return{sourceId:t,impacted:o,coveringTests:r}}const rt=1,pn=3,jo=2;function hn(e){return Math.max(rt,Math.min(pn,Math.round(e)))}function Mt(e,t,n,o){const s=hn(n),r=new Map,i=(a,u)=>{const f=r.get(a);f?f.push(u):r.set(a,[u])};for(const a of e)o&&o.size>0&&!o.has(a.type)||(i(a.from,a.to),i(a.to,a.from));const c=new Set([t]);let l=[t];for(let a=0;a<s&&l.length>0;a++){const u=[];for(const f of l){const g=r.get(f);if(g)for(const p of g)c.has(p)||(c.add(p),u.push(p))}l=u}return{sourceId:t,depth:s,nodes:c}}function To(e){let t;try{t=JSON.parse(e)}catch{return null}const n=t.id,o=t.labels;if(typeof n!="string"||!Array.isArray(o))return null;const s={...t};return delete s.id,delete s.labels,{id:n,labels:o.filter(r=>typeof r=="string"),props:s}}function Ao(e){let t;try{t=JSON.parse(e)}catch{return null}const n=t.from,o=t.type,s=t.to;if(typeof n!="string"||typeof o!="string"||typeof s!="string")return null;const r={...t};return delete r.from,delete r.type,delete r.to,{from:n,type:o,to:s,props:r}}function Io(e){const t=[];for(const n of e.split(`
2
+ `)){if(n.trim()==="")continue;const o=To(n);o&&t.push(o)}return t}function zo(e){const t=[];for(const n of e.split(`
3
+ `)){if(n.trim()==="")continue;const o=Ao(n);o&&t.push(o)}return t}function Co(e,t){return{nodes:Io(e),edges:zo(t)}}const Ro=new Set(["CALLS","IMPORTS","INSTANTIATES","IMPLEMENTS","INHERITS"]);function Ko(e){const t=e.resolution;if(t==="exact"||t==="name_match"||t==="ambiguous")return t;const n=typeof e.confidence=="number"?e.confidence:1;return n>=.95?"exact":n>=.5?"name_match":"ambiguous"}function te(e){return typeof e=="string"?e:null}function it(e,t=0){return typeof e=="number"?e:t}const Lo=new Set(["Function","Class","Interface","Enum","Variable"]);function ke(e){return e.labels[0]??""}function Ze(e){const t=e.lastIndexOf("/");if(t<0)return".";const n=e.slice(0,t);return n===""?".":n}function Qe(e){if(e==="."||e==="")return".";const t=e.lastIndexOf("/");return t<0?e:e.slice(t+1)}function Fo(e){for(const t of e.nodes)if(ke(t)==="Repository"){const n=te(t.props.name);if(n)return n}for(const t of e.nodes){const n=t.id.split(":");if(n.length>=2&&n[0]==="rs1"&&n[1])return n[1]}return"repo"}function Po(e){const t=Fo(e),n=`galaxy:${t}`,o=new Map,s=p=>{const d=o.get(p.key);return d||(o.set(p.key,p),p)};s({key:n,kind:"galaxy",name:t,parent:null,children:[],nodeId:null});const r=p=>`dir:${t}:${p}`,i=p=>`file:${t}:${p}`,c=p=>{const d=r(p),b=o.get(d);if(b)return b;const x=p===".",h=x?null:Ze(p),S=x?n:c(h).key;return s({key:d,kind:"dir",name:x?t:Qe(p),parent:S,children:[],nodeId:null})};for(const p of e.nodes){if(ke(p)!=="Directory")continue;const d=te(p.props.path)??".",b=c(d);b.nodeId=p.id}const l=new Map;for(const p of e.nodes){if(ke(p)!=="File")continue;const d=te(p.props.path)??te(p.props.file_path);if(d===null)continue;const b=c(Ze(d)),x=i(d);s({key:x,kind:"file",name:Qe(d),parent:b.key,children:[],nodeId:p.id}),l.set(d,x)}const a=new Map;for(const p of e.nodes)Lo.has(ke(p))&&a.set(p.id,p);const u=new Map;for(const p of e.nodes)if(ke(p)==="File"){const d=te(p.props.path)??te(p.props.file_path);d!==null&&u.set(p.id,i(d))}const f=new Set,g=(p,d)=>{f.has(p.id)||(f.add(p.id),s({key:p.id,kind:"symbol",name:te(p.props.name)??te(p.props.qualified_name)??p.id,parent:d,children:[],nodeId:p.id,symbolKind:ke(p)}))};for(const p of e.edges){if(p.type!=="DEFINES")continue;const d=a.get(p.to);if(!d)continue;const b=u.get(p.from);b&&o.has(b)&&g(d,b)}for(const p of a.values()){if(f.has(p.id))continue;const d=te(p.props.file_path);if(d===null)continue;let b=l.get(d);if(!b){const x=c(Ze(d));b=i(d),s({key:b,kind:"file",name:Qe(d),parent:x.key,children:[],nodeId:null}),l.set(d,b)}g(p,b)}for(const p of o.values())if(p.parent){const d=o.get(p.parent);d&&d.children.push(p.key)}for(const p of o.values())p.children.sort();return{rootKey:n,byKey:o,repoId:t}}function Bo(e){const t=[],n=o=>{const s=e.byKey.get(o);if(s){t.push(s);for(const r of s.children)n(r)}};return n(e.rootKey),t}function Do(e,t,n){var o,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function r(){var i,c=o.length,l,a=0,u=0,f=0;for(i=0;i<c;++i)l=o[i],a+=l.x||0,u+=l.y||0,f+=l.z||0;for(a=(a/c-e)*s,u=(u/c-t)*s,f=(f/c-n)*s,i=0;i<c;++i)l=o[i],a&&(l.x-=a),u&&(l.y-=u),f&&(l.z-=f)}return r.initialize=function(i){o=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r.z=function(i){return arguments.length?(n=+i,r):n},r.strength=function(i){return arguments.length?(s=+i,r):s},r}function Oo(e){const t=+this._x.call(null,e);return gn(this.cover(t),t,e)}function gn(e,t,n){if(isNaN(t))return e;var o,s=e._root,r={data:n},i=e._x0,c=e._x1,l,a,u,f,g;if(!s)return e._root=r,e;for(;s.length;)if((u=t>=(l=(i+c)/2))?i=l:c=l,o=s,!(s=s[f=+u]))return o[f]=r,e;if(a=+e._x.call(null,s.data),t===a)return r.next=s,o?o[f]=r:e._root=r,e;do o=o?o[f]=new Array(2):e._root=new Array(2),(u=t>=(l=(i+c)/2))?i=l:c=l;while((f=+u)==(g=+(a>=l)));return o[g]=s,o[f]=r,e}function $o(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let o=1/0,s=-1/0;for(let r=0,i;r<t;++r)isNaN(i=+this._x.call(null,e[r]))||(n[r]=i,i<o&&(o=i),i>s&&(s=i));if(o>s)return this;this.cover(o).cover(s);for(let r=0;r<t;++r)gn(this,n[r],e[r]);return this}function qo(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var o=n-t||1,s=this._root,r,i;t>e||e>=n;)switch(i=+(e<t),r=new Array(2),r[i]=s,s=r,o*=2,i){case 0:n=t+o;break;case 1:t=n-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=t,this._x1=n,this}function Ho(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Go(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function ye(e,t,n){this.node=e,this.x0=t,this.x1=n}function Wo(e,t){var n,o=this._x0,s,r,i=this._x1,c=[],l=this._root,a,u;for(l&&c.push(new ye(l,o,i)),t==null?t=1/0:(o=e-t,i=e+t);a=c.pop();)if(!(!(l=a.node)||(s=a.x0)>i||(r=a.x1)<o))if(l.length){var f=(s+r)/2;c.push(new ye(l[1],f,r),new ye(l[0],s,f)),(u=+(e>=f))&&(a=c[c.length-1],c[c.length-1]=c[c.length-1-u],c[c.length-1-u]=a)}else{var g=Math.abs(e-+this._x.call(null,l.data));g<t&&(t=g,o=e-g,i=e+g,n=l.data)}return n}function Uo(e){if(isNaN(l=+this._x.call(null,e)))return this;var t,n=this._root,o,s,r,i=this._x0,c=this._x1,l,a,u,f,g;if(!n)return this;if(n.length)for(;;){if((u=l>=(a=(i+c)/2))?i=a:c=a,t=n,!(n=n[f=+u]))return this;if(!n.length)break;t[f+1&1]&&(o=t,g=f)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[f]=r:delete t[f],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(o?o[g]=n:this._root=n),this):(this._root=r,this)}function Yo(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Xo(){return this._root}function Vo(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Zo(e){var t=[],n,o=this._root,s,r,i;for(o&&t.push(new ye(o,this._x0,this._x1));n=t.pop();)if(!e(o=n.node,r=n.x0,i=n.x1)&&o.length){var c=(r+i)/2;(s=o[1])&&t.push(new ye(s,c,i)),(s=o[0])&&t.push(new ye(s,r,c))}return this}function Qo(e){var t=[],n=[],o;for(this._root&&t.push(new ye(this._root,this._x0,this._x1));o=t.pop();){var s=o.node;if(s.length){var r,i=o.x0,c=o.x1,l=(i+c)/2;(r=s[0])&&t.push(new ye(r,i,l)),(r=s[1])&&t.push(new ye(r,l,c))}n.push(o)}for(;o=n.pop();)e(o.node,o.x0,o.x1);return this}function Jo(e){return e[0]}function es(e){return arguments.length?(this._x=e,this):this._x}function yn(e,t){var n=new gt(t??Jo,NaN,NaN);return e==null?n:n.addAll(e)}function gt(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function Nt(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var ce=yn.prototype=gt.prototype;ce.copy=function(){var e=new gt(this._x,this._x0,this._x1),t=this._root,n,o;if(!t)return e;if(!t.length)return e._root=Nt(t),e;for(n=[{source:t,target:e._root=new Array(2)}];t=n.pop();)for(var s=0;s<2;++s)(o=t.source[s])&&(o.length?n.push({source:o,target:t.target[s]=new Array(2)}):t.target[s]=Nt(o));return e};ce.add=Oo;ce.addAll=$o;ce.cover=qo;ce.data=Ho;ce.extent=Go;ce.find=Wo;ce.remove=Uo;ce.removeAll=Yo;ce.root=Xo;ce.size=Vo;ce.visit=Zo;ce.visitAfter=Qo;ce.x=es;function ts(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return xn(this.cover(t,n),t,n,e)}function xn(e,t,n,o){if(isNaN(t)||isNaN(n))return e;var s,r=e._root,i={data:o},c=e._x0,l=e._y0,a=e._x1,u=e._y1,f,g,p,d,b,x,h,S;if(!r)return e._root=i,e;for(;r.length;)if((b=t>=(f=(c+a)/2))?c=f:a=f,(x=n>=(g=(l+u)/2))?l=g:u=g,s=r,!(r=r[h=x<<1|b]))return s[h]=i,e;if(p=+e._x.call(null,r.data),d=+e._y.call(null,r.data),t===p&&n===d)return i.next=r,s?s[h]=i:e._root=i,e;do s=s?s[h]=new Array(4):e._root=new Array(4),(b=t>=(f=(c+a)/2))?c=f:a=f,(x=n>=(g=(l+u)/2))?l=g:u=g;while((h=x<<1|b)===(S=(d>=g)<<1|p>=f));return s[S]=r,s[h]=i,e}function ns(e){var t,n,o=e.length,s,r,i=new Array(o),c=new Array(o),l=1/0,a=1/0,u=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(s=+this._x.call(null,t=e[n]))||isNaN(r=+this._y.call(null,t))||(i[n]=s,c[n]=r,s<l&&(l=s),s>u&&(u=s),r<a&&(a=r),r>f&&(f=r));if(l>u||a>f)return this;for(this.cover(l,a).cover(u,f),n=0;n<o;++n)xn(this,i[n],c[n],e[n]);return this}function os(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,o=this._y0,s=this._x1,r=this._y1;if(isNaN(n))s=(n=Math.floor(e))+1,r=(o=Math.floor(t))+1;else{for(var i=s-n||1,c=this._root,l,a;n>e||e>=s||o>t||t>=r;)switch(a=(t<o)<<1|e<n,l=new Array(4),l[a]=c,c=l,i*=2,a){case 0:s=n+i,r=o+i;break;case 1:n=s-i,r=o+i;break;case 2:s=n+i,o=r-i;break;case 3:n=s-i,o=r-i;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=o,this._x1=s,this._y1=r,this}function ss(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function rs(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function oe(e,t,n,o,s){this.node=e,this.x0=t,this.y0=n,this.x1=o,this.y1=s}function is(e,t,n){var o,s=this._x0,r=this._y0,i,c,l,a,u=this._x1,f=this._y1,g=[],p=this._root,d,b;for(p&&g.push(new oe(p,s,r,u,f)),n==null?n=1/0:(s=e-n,r=t-n,u=e+n,f=t+n,n*=n);d=g.pop();)if(!(!(p=d.node)||(i=d.x0)>u||(c=d.y0)>f||(l=d.x1)<s||(a=d.y1)<r))if(p.length){var x=(i+l)/2,h=(c+a)/2;g.push(new oe(p[3],x,h,l,a),new oe(p[2],i,h,x,a),new oe(p[1],x,c,l,h),new oe(p[0],i,c,x,h)),(b=(t>=h)<<1|e>=x)&&(d=g[g.length-1],g[g.length-1]=g[g.length-1-b],g[g.length-1-b]=d)}else{var S=e-+this._x.call(null,p.data),w=t-+this._y.call(null,p.data),m=S*S+w*w;if(m<n){var v=Math.sqrt(n=m);s=e-v,r=t-v,u=e+v,f=t+v,o=p.data}}return o}function cs(e){if(isNaN(u=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,o,s,r,i=this._x0,c=this._y0,l=this._x1,a=this._y1,u,f,g,p,d,b,x,h;if(!n)return this;if(n.length)for(;;){if((d=u>=(g=(i+l)/2))?i=g:l=g,(b=f>=(p=(c+a)/2))?c=p:a=p,t=n,!(n=n[x=b<<1|d]))return this;if(!n.length)break;(t[x+1&3]||t[x+2&3]||t[x+3&3])&&(o=t,h=x)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[x]=r:delete t[x],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(o?o[h]=n:this._root=n),this):(this._root=r,this)}function as(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function ls(){return this._root}function us(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function fs(e){var t=[],n,o=this._root,s,r,i,c,l;for(o&&t.push(new oe(o,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(o=n.node,r=n.x0,i=n.y0,c=n.x1,l=n.y1)&&o.length){var a=(r+c)/2,u=(i+l)/2;(s=o[3])&&t.push(new oe(s,a,u,c,l)),(s=o[2])&&t.push(new oe(s,r,u,a,l)),(s=o[1])&&t.push(new oe(s,a,i,c,u)),(s=o[0])&&t.push(new oe(s,r,i,a,u))}return this}function ds(e){var t=[],n=[],o;for(this._root&&t.push(new oe(this._root,this._x0,this._y0,this._x1,this._y1));o=t.pop();){var s=o.node;if(s.length){var r,i=o.x0,c=o.y0,l=o.x1,a=o.y1,u=(i+l)/2,f=(c+a)/2;(r=s[0])&&t.push(new oe(r,i,c,u,f)),(r=s[1])&&t.push(new oe(r,u,c,l,f)),(r=s[2])&&t.push(new oe(r,i,f,u,a)),(r=s[3])&&t.push(new oe(r,u,f,l,a))}n.push(o)}for(;o=n.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function ps(e){return e[0]}function hs(e){return arguments.length?(this._x=e,this):this._x}function gs(e){return e[1]}function ys(e){return arguments.length?(this._y=e,this):this._y}function mn(e,t,n){var o=new yt(t??ps,n??gs,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function yt(e,t,n,o,s,r){this._x=e,this._y=t,this._x0=n,this._y0=o,this._x1=s,this._y1=r,this._root=void 0}function jt(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var se=mn.prototype=yt.prototype;se.copy=function(){var e=new yt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,o;if(!t)return e;if(!t.length)return e._root=jt(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var s=0;s<4;++s)(o=t.source[s])&&(o.length?n.push({source:o,target:t.target[s]=new Array(4)}):t.target[s]=jt(o));return e};se.add=ts;se.addAll=ns;se.cover=os;se.data=ss;se.extent=rs;se.find=is;se.remove=cs;se.removeAll=as;se.root=ls;se.size=us;se.visit=fs;se.visitAfter=ds;se.x=hs;se.y=ys;function xs(e){const t=+this._x.call(null,e),n=+this._y.call(null,e),o=+this._z.call(null,e);return bn(this.cover(t,n,o),t,n,o,e)}function bn(e,t,n,o,s){if(isNaN(t)||isNaN(n)||isNaN(o))return e;var r,i=e._root,c={data:s},l=e._x0,a=e._y0,u=e._z0,f=e._x1,g=e._y1,p=e._z1,d,b,x,h,S,w,m,v,k,E,M;if(!i)return e._root=c,e;for(;i.length;)if((m=t>=(d=(l+f)/2))?l=d:f=d,(v=n>=(b=(a+g)/2))?a=b:g=b,(k=o>=(x=(u+p)/2))?u=x:p=x,r=i,!(i=i[E=k<<2|v<<1|m]))return r[E]=c,e;if(h=+e._x.call(null,i.data),S=+e._y.call(null,i.data),w=+e._z.call(null,i.data),t===h&&n===S&&o===w)return c.next=i,r?r[E]=c:e._root=c,e;do r=r?r[E]=new Array(8):e._root=new Array(8),(m=t>=(d=(l+f)/2))?l=d:f=d,(v=n>=(b=(a+g)/2))?a=b:g=b,(k=o>=(x=(u+p)/2))?u=x:p=x;while((E=k<<2|v<<1|m)===(M=(w>=x)<<2|(S>=b)<<1|h>=d));return r[M]=i,r[E]=c,e}function ms(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),o=new Float64Array(t),s=new Float64Array(t);let r=1/0,i=1/0,c=1/0,l=-1/0,a=-1/0,u=-1/0;for(let f=0,g,p,d,b;f<t;++f)isNaN(p=+this._x.call(null,g=e[f]))||isNaN(d=+this._y.call(null,g))||isNaN(b=+this._z.call(null,g))||(n[f]=p,o[f]=d,s[f]=b,p<r&&(r=p),p>l&&(l=p),d<i&&(i=d),d>a&&(a=d),b<c&&(c=b),b>u&&(u=b));if(r>l||i>a||c>u)return this;this.cover(r,i,c).cover(l,a,u);for(let f=0;f<t;++f)bn(this,n[f],o[f],s[f],e[f]);return this}function bs(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var o=this._x0,s=this._y0,r=this._z0,i=this._x1,c=this._y1,l=this._z1;if(isNaN(o))i=(o=Math.floor(e))+1,c=(s=Math.floor(t))+1,l=(r=Math.floor(n))+1;else{for(var a=i-o||1,u=this._root,f,g;o>e||e>=i||s>t||t>=c||r>n||n>=l;)switch(g=(n<r)<<2|(t<s)<<1|e<o,f=new Array(8),f[g]=u,u=f,a*=2,g){case 0:i=o+a,c=s+a,l=r+a;break;case 1:o=i-a,c=s+a,l=r+a;break;case 2:i=o+a,s=c-a,l=r+a;break;case 3:o=i-a,s=c-a,l=r+a;break;case 4:i=o+a,c=s+a,r=l-a;break;case 5:o=i-a,c=s+a,r=l-a;break;case 6:i=o+a,s=c-a,r=l-a;break;case 7:o=i-a,s=c-a,r=l-a;break}this._root&&this._root.length&&(this._root=u)}return this._x0=o,this._y0=s,this._z0=r,this._x1=i,this._y1=c,this._z1=l,this}function vs(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function ws(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function q(e,t,n,o,s,r,i){this.node=e,this.x0=t,this.y0=n,this.z0=o,this.x1=s,this.y1=r,this.z1=i}function Ss(e,t,n,o){var s,r=this._x0,i=this._y0,c=this._z0,l,a,u,f,g,p,d=this._x1,b=this._y1,x=this._z1,h=[],S=this._root,w,m;for(S&&h.push(new q(S,r,i,c,d,b,x)),o==null?o=1/0:(r=e-o,i=t-o,c=n-o,d=e+o,b=t+o,x=n+o,o*=o);w=h.pop();)if(!(!(S=w.node)||(l=w.x0)>d||(a=w.y0)>b||(u=w.z0)>x||(f=w.x1)<r||(g=w.y1)<i||(p=w.z1)<c))if(S.length){var v=(l+f)/2,k=(a+g)/2,E=(u+p)/2;h.push(new q(S[7],v,k,E,f,g,p),new q(S[6],l,k,E,v,g,p),new q(S[5],v,a,E,f,k,p),new q(S[4],l,a,E,v,k,p),new q(S[3],v,k,u,f,g,E),new q(S[2],l,k,u,v,g,E),new q(S[1],v,a,u,f,k,E),new q(S[0],l,a,u,v,k,E)),(m=(n>=E)<<2|(t>=k)<<1|e>=v)&&(w=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=w)}else{var M=e-+this._x.call(null,S.data),I=t-+this._y.call(null,S.data),R=n-+this._z.call(null,S.data),K=M*M+I*I+R*R;if(K<o){var L=Math.sqrt(o=K);r=e-L,i=t-L,c=n-L,d=e+L,b=t+L,x=n+L,s=S.data}}return s}const _s=(e,t,n,o,s,r)=>Math.sqrt((e-o)**2+(t-s)**2+(n-r)**2);function ks(e,t,n,o){const s=[],r=e-o,i=t-o,c=n-o,l=e+o,a=t+o,u=n+o;return this.visit((f,g,p,d,b,x,h)=>{if(!f.length)do{const S=f.data;_s(e,t,n,this._x(S),this._y(S),this._z(S))<=o&&s.push(S)}while(f=f.next);return g>l||p>a||d>u||b<r||x<i||h<c}),s}function Es(e){if(isNaN(g=+this._x.call(null,e))||isNaN(p=+this._y.call(null,e))||isNaN(d=+this._z.call(null,e)))return this;var t,n=this._root,o,s,r,i=this._x0,c=this._y0,l=this._z0,a=this._x1,u=this._y1,f=this._z1,g,p,d,b,x,h,S,w,m,v,k;if(!n)return this;if(n.length)for(;;){if((S=g>=(b=(i+a)/2))?i=b:a=b,(w=p>=(x=(c+u)/2))?c=x:u=x,(m=d>=(h=(l+f)/2))?l=h:f=h,t=n,!(n=n[v=m<<2|w<<1|S]))return this;if(!n.length)break;(t[v+1&7]||t[v+2&7]||t[v+3&7]||t[v+4&7]||t[v+5&7]||t[v+6&7]||t[v+7&7])&&(o=t,k=v)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(r=n.next)&&delete n.next,s?(r?s.next=r:delete s.next,this):t?(r?t[v]=r:delete t[v],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(o?o[k]=n:this._root=n),this):(this._root=r,this)}function Ms(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Ns(){return this._root}function js(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ts(e){var t=[],n,o=this._root,s,r,i,c,l,a,u;for(o&&t.push(new q(o,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=t.pop();)if(!e(o=n.node,r=n.x0,i=n.y0,c=n.z0,l=n.x1,a=n.y1,u=n.z1)&&o.length){var f=(r+l)/2,g=(i+a)/2,p=(c+u)/2;(s=o[7])&&t.push(new q(s,f,g,p,l,a,u)),(s=o[6])&&t.push(new q(s,r,g,p,f,a,u)),(s=o[5])&&t.push(new q(s,f,i,p,l,g,u)),(s=o[4])&&t.push(new q(s,r,i,p,f,g,u)),(s=o[3])&&t.push(new q(s,f,g,c,l,a,p)),(s=o[2])&&t.push(new q(s,r,g,c,f,a,p)),(s=o[1])&&t.push(new q(s,f,i,c,l,g,p)),(s=o[0])&&t.push(new q(s,r,i,c,f,g,p))}return this}function As(e){var t=[],n=[],o;for(this._root&&t.push(new q(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));o=t.pop();){var s=o.node;if(s.length){var r,i=o.x0,c=o.y0,l=o.z0,a=o.x1,u=o.y1,f=o.z1,g=(i+a)/2,p=(c+u)/2,d=(l+f)/2;(r=s[0])&&t.push(new q(r,i,c,l,g,p,d)),(r=s[1])&&t.push(new q(r,g,c,l,a,p,d)),(r=s[2])&&t.push(new q(r,i,p,l,g,u,d)),(r=s[3])&&t.push(new q(r,g,p,l,a,u,d)),(r=s[4])&&t.push(new q(r,i,c,d,g,p,f)),(r=s[5])&&t.push(new q(r,g,c,d,a,p,f)),(r=s[6])&&t.push(new q(r,i,p,d,g,u,f)),(r=s[7])&&t.push(new q(r,g,p,d,a,u,f))}n.push(o)}for(;o=n.pop();)e(o.node,o.x0,o.y0,o.z0,o.x1,o.y1,o.z1);return this}function Is(e){return e[0]}function zs(e){return arguments.length?(this._x=e,this):this._x}function Cs(e){return e[1]}function Rs(e){return arguments.length?(this._y=e,this):this._y}function Ks(e){return e[2]}function Ls(e){return arguments.length?(this._z=e,this):this._z}function vn(e,t,n,o){var s=new xt(t??Is,n??Cs,o??Ks,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?s:s.addAll(e)}function xt(e,t,n,o,s,r,i,c,l){this._x=e,this._y=t,this._z=n,this._x0=o,this._y0=s,this._z0=r,this._x1=i,this._y1=c,this._z1=l,this._root=void 0}function Tt(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var ne=vn.prototype=xt.prototype;ne.copy=function(){var e=new xt(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),t=this._root,n,o;if(!t)return e;if(!t.length)return e._root=Tt(t),e;for(n=[{source:t,target:e._root=new Array(8)}];t=n.pop();)for(var s=0;s<8;++s)(o=t.source[s])&&(o.length?n.push({source:o,target:t.target[s]=new Array(8)}):t.target[s]=Tt(o));return e};ne.add=xs;ne.addAll=ms;ne.cover=bs;ne.data=vs;ne.extent=ws;ne.find=Ss;ne.findAllWithinRadius=ks;ne.remove=Es;ne.removeAll=Ms;ne.root=Ns;ne.size=js;ne.visit=Ts;ne.visitAfter=As;ne.x=zs;ne.y=Rs;ne.z=Ls;function Fe(e){return function(){return e}}function he(e){return(e()-.5)*1e-6}function Fs(e){return e.index}function At(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Ps(e){var t=Fs,n=g,o,s=Fe(30),r,i,c,l,a,u,f=1;e==null&&(e=[]);function g(h){return 1/Math.min(l[h.source.index],l[h.target.index])}function p(h){for(var S=0,w=e.length;S<f;++S)for(var m=0,v,k,E,M=0,I=0,R=0,K,L;m<w;++m)v=e[m],k=v.source,E=v.target,M=E.x+E.vx-k.x-k.vx||he(u),c>1&&(I=E.y+E.vy-k.y-k.vy||he(u)),c>2&&(R=E.z+E.vz-k.z-k.vz||he(u)),K=Math.sqrt(M*M+I*I+R*R),K=(K-r[m])/K*h*o[m],M*=K,I*=K,R*=K,E.vx-=M*(L=a[m]),c>1&&(E.vy-=I*L),c>2&&(E.vz-=R*L),k.vx+=M*(L=1-L),c>1&&(k.vy+=I*L),c>2&&(k.vz+=R*L)}function d(){if(i){var h,S=i.length,w=e.length,m=new Map(i.map((k,E)=>[t(k,E,i),k])),v;for(h=0,l=new Array(S);h<w;++h)v=e[h],v.index=h,typeof v.source!="object"&&(v.source=At(m,v.source)),typeof v.target!="object"&&(v.target=At(m,v.target)),l[v.source.index]=(l[v.source.index]||0)+1,l[v.target.index]=(l[v.target.index]||0)+1;for(h=0,a=new Array(w);h<w;++h)v=e[h],a[h]=l[v.source.index]/(l[v.source.index]+l[v.target.index]);o=new Array(w),b(),r=new Array(w),x()}}function b(){if(i)for(var h=0,S=e.length;h<S;++h)o[h]=+n(e[h],h,e)}function x(){if(i)for(var h=0,S=e.length;h<S;++h)r[h]=+s(e[h],h,e)}return p.initialize=function(h,...S){i=h,u=S.find(w=>typeof w=="function")||Math.random,c=S.find(w=>[1,2,3].includes(w))||2,d()},p.links=function(h){return arguments.length?(e=h,d(),p):e},p.id=function(h){return arguments.length?(t=h,p):t},p.iterations=function(h){return arguments.length?(f=+h,p):f},p.strength=function(h){return arguments.length?(n=typeof h=="function"?h:Fe(+h),b(),p):n},p.distance=function(h){return arguments.length?(s=typeof h=="function"?h:Fe(+h),x(),p):s},p}var Bs={value:()=>{}};function wn(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new qe(n)}function qe(e){this._=e}function Ds(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",s=n.indexOf(".");if(s>=0&&(o=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}qe.prototype=wn.prototype={constructor:qe,on:function(e,t){var n=this._,o=Ds(e+"",n),s,r=-1,i=o.length;if(arguments.length<2){for(;++r<i;)if((s=(e=o[r]).type)&&(s=Os(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<i;)if(s=(e=o[r]).type)n[s]=It(n[s],e.name,t);else if(t==null)for(s in n)n[s]=It(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new qe(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),o=0,s,r;o<s;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],o=0,s=r.length;o<s;++o)r[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],s=0,r=o.length;s<r;++s)o[s].value.apply(t,n)}};function Os(e,t){for(var n=0,o=e.length,s;n<o;++n)if((s=e[n]).name===t)return s.value}function It(e,t,n){for(var o=0,s=e.length;o<s;++o)if(e[o].name===t){e[o]=Bs,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var je=0,Ke=0,Ie=0,Sn=1e3,He,Le,Ge=0,Se=0,We=0,Be=typeof performance=="object"&&performance.now?performance:Date,_n=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function kn(){return Se||(_n($s),Se=Be.now()+We)}function $s(){Se=0}function ct(){this._call=this._time=this._next=null}ct.prototype=En.prototype={constructor:ct,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?kn():+n)+(t==null?0:+t),!this._next&&Le!==this&&(Le?Le._next=this:He=this,Le=this),this._call=e,this._time=n,at()},stop:function(){this._call&&(this._call=null,this._time=1/0,at())}};function En(e,t,n){var o=new ct;return o.restart(e,t,n),o}function qs(){kn(),++je;for(var e=He,t;e;)(t=Se-e._time)>=0&&e._call.call(void 0,t),e=e._next;--je}function zt(){Se=(Ge=Be.now())+We,je=Ke=0;try{qs()}finally{je=0,Gs(),Se=0}}function Hs(){var e=Be.now(),t=e-Ge;t>Sn&&(We-=t,Ge=e)}function Gs(){for(var e,t=He,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:He=n);Le=e,at(o)}function at(e){if(!je){Ke&&(Ke=clearTimeout(Ke));var t=e-Se;t>24?(e<1/0&&(Ke=setTimeout(zt,e-Be.now()-We)),Ie&&(Ie=clearInterval(Ie))):(Ie||(Ge=Be.now(),Ie=setInterval(Hs,Sn)),je=1,_n(zt))}}const Ws=1664525,Us=1013904223,Ct=4294967296;function Ys(){let e=1;return()=>(e=(Ws*e+Us)%Ct)/Ct}var Rt=3;function Je(e){return e.x}function Kt(e){return e.y}function Xs(e){return e.z}var Vs=10,Zs=Math.PI*(3-Math.sqrt(5)),Qs=Math.PI*20/(9+Math.sqrt(221));function Js(e,t){t=t||2;var n=Math.min(Rt,Math.max(1,Math.round(t))),o,s=1,r=.001,i=1-Math.pow(r,1/300),c=0,l=.6,a=new Map,u=En(p),f=wn("tick","end"),g=Ys();e==null&&(e=[]);function p(){d(),f.call("tick",o),s<r&&(u.stop(),f.call("end",o))}function d(h){var S,w=e.length,m;h===void 0&&(h=1);for(var v=0;v<h;++v)for(s+=(c-s)*i,a.forEach(function(k){k(s)}),S=0;S<w;++S)m=e[S],m.fx==null?m.x+=m.vx*=l:(m.x=m.fx,m.vx=0),n>1&&(m.fy==null?m.y+=m.vy*=l:(m.y=m.fy,m.vy=0)),n>2&&(m.fz==null?m.z+=m.vz*=l:(m.z=m.fz,m.vz=0));return o}function b(){for(var h=0,S=e.length,w;h<S;++h){if(w=e[h],w.index=h,w.fx!=null&&(w.x=w.fx),w.fy!=null&&(w.y=w.fy),w.fz!=null&&(w.z=w.fz),isNaN(w.x)||n>1&&isNaN(w.y)||n>2&&isNaN(w.z)){var m=Vs*(n>2?Math.cbrt(.5+h):n>1?Math.sqrt(.5+h):h),v=h*Zs,k=h*Qs;n===1?w.x=m:n===2?(w.x=m*Math.cos(v),w.y=m*Math.sin(v)):(w.x=m*Math.sin(v)*Math.cos(k),w.y=m*Math.cos(v),w.z=m*Math.sin(v)*Math.sin(k))}(isNaN(w.vx)||n>1&&isNaN(w.vy)||n>2&&isNaN(w.vz))&&(w.vx=0,n>1&&(w.vy=0),n>2&&(w.vz=0))}}function x(h){return h.initialize&&h.initialize(e,g,n),h}return b(),o={tick:d,restart:function(){return u.restart(p),o},stop:function(){return u.stop(),o},numDimensions:function(h){return arguments.length?(n=Math.min(Rt,Math.max(1,Math.round(h))),a.forEach(x),o):n},nodes:function(h){return arguments.length?(e=h,b(),a.forEach(x),o):e},alpha:function(h){return arguments.length?(s=+h,o):s},alphaMin:function(h){return arguments.length?(r=+h,o):r},alphaDecay:function(h){return arguments.length?(i=+h,o):+i},alphaTarget:function(h){return arguments.length?(c=+h,o):c},velocityDecay:function(h){return arguments.length?(l=1-h,o):1-l},randomSource:function(h){return arguments.length?(g=h,a.forEach(x),o):g},force:function(h,S){return arguments.length>1?(S==null?a.delete(h):a.set(h,x(S)),o):a.get(h)},find:function(){var h=Array.prototype.slice.call(arguments),S=h.shift()||0,w=(n>1?h.shift():null)||0,m=(n>2?h.shift():null)||0,v=h.shift()||1/0,k=0,E=e.length,M,I,R,K,L,re;for(v*=v,k=0;k<E;++k)L=e[k],M=S-L.x,I=w-(L.y||0),R=m-(L.z||0),K=M*M+I*I+R*R,K<v&&(re=L,v=K);return re},on:function(h,S){return arguments.length>1?(f.on(h,S),o):f.on(h)}}}function er(){var e,t,n,o,s,r=Fe(-30),i,c=1,l=1/0,a=.81;function u(d){var b,x=e.length,h=(t===1?yn(e,Je):t===2?mn(e,Je,Kt):t===3?vn(e,Je,Kt,Xs):null).visitAfter(g);for(s=d,b=0;b<x;++b)n=e[b],h.visit(p)}function f(){if(e){var d,b=e.length,x;for(i=new Array(b),d=0;d<b;++d)x=e[d],i[x.index]=+r(x,d,e)}}function g(d){var b=0,x,h,S=0,w,m,v,k,E=d.length;if(E){for(w=m=v=k=0;k<E;++k)(x=d[k])&&(h=Math.abs(x.value))&&(b+=x.value,S+=h,w+=h*(x.x||0),m+=h*(x.y||0),v+=h*(x.z||0));b*=Math.sqrt(4/E),d.x=w/S,t>1&&(d.y=m/S),t>2&&(d.z=v/S)}else{x=d,x.x=x.data.x,t>1&&(x.y=x.data.y),t>2&&(x.z=x.data.z);do b+=i[x.data.index];while(x=x.next)}d.value=b}function p(d,b,x,h,S){if(!d.value)return!0;var w=[x,h,S][t-1],m=d.x-n.x,v=t>1?d.y-n.y:0,k=t>2?d.z-n.z:0,E=w-b,M=m*m+v*v+k*k;if(E*E/a<M)return M<l&&(m===0&&(m=he(o),M+=m*m),t>1&&v===0&&(v=he(o),M+=v*v),t>2&&k===0&&(k=he(o),M+=k*k),M<c&&(M=Math.sqrt(c*M)),n.vx+=m*d.value*s/M,t>1&&(n.vy+=v*d.value*s/M),t>2&&(n.vz+=k*d.value*s/M)),!0;if(d.length||M>=l)return;(d.data!==n||d.next)&&(m===0&&(m=he(o),M+=m*m),t>1&&v===0&&(v=he(o),M+=v*v),t>2&&k===0&&(k=he(o),M+=k*k),M<c&&(M=Math.sqrt(c*M)));do d.data!==n&&(E=i[d.data.index]*s/M,n.vx+=m*E,t>1&&(n.vy+=v*E),t>2&&(n.vz+=k*E));while(d=d.next)}return u.initialize=function(d,...b){e=d,o=b.find(x=>typeof x=="function")||Math.random,t=b.find(x=>[1,2,3].includes(x))||2,f()},u.strength=function(d){return arguments.length?(r=typeof d=="function"?d:Fe(+d),f(),u):r},u.distanceMin=function(d){return arguments.length?(c=d*d,u):Math.sqrt(c)},u.distanceMax=function(d){return arguments.length?(l=d*d,u):Math.sqrt(l)},u.theta=function(d){return arguments.length?(a=d*d,u):Math.sqrt(a)},u}function Mn(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Nn(e){let t=e>>>0;return function(){t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function tr(e,t=42){const n=Nn(Mn(e)),o=n(),s=n(),r=2*Math.PI*o,i=Math.acos(2*s-1),c=t*Math.cbrt(n()),l=c*Math.sin(i)*Math.cos(r),a=c*Math.sin(i)*Math.sin(r),u=c*Math.cos(i);return[l,a,u]}function jn(e){let t=2166136261;for(const n of e){for(let o=0;o<n.length;o++)t^=n.charCodeAt(o),t=Math.imul(t,16777619);t^=10,t=Math.imul(t,16777619)}return(t>>>0).toString(16)}const nr=1592594996,or=1;function sr(e){const t=[...e].sort();return jn([`v${or}`,`n${t.length}`,...t])}function rr(e){return e<=2e3?200:e<=5e3?150:e<=1e4?100:70}function ir(e,t){const n=Bo(e),o=n.map(f=>f.key),s=new Map;if(o.forEach((f,g)=>s.set(f,g)),t&&t.length===o.length*3)return{keys:o,positions:t.slice(),indexByKey:s};const r=n.map(f=>{const[g,p,d]=tr(f.key);return{key:f.key,x:g,y:p,z:d}}),i=n.filter(f=>f.parent!==null).map(f=>({source:f.parent,target:f.key})),c=Nn(Mn("randomSource")^nr),l=Js(r,3).force("charge",er().strength(-7)).force("link",Ps(i).id(f=>f.key).distance(5).strength(.85)).force("center",Do(0,0,0)).stop(),a=l;typeof a.randomSource=="function"&&a.randomSource(c),l.tick(rr(r.length));const u=new Float32Array(r.length*3);for(let f=0;f<r.length;f++){const g=r[f];u[f*3]=g.x??0,u[f*3+1]=g.y??0,u[f*3+2]=g.z??0}return{keys:o,positions:u,indexByKey:s}}function cr(e,t){const n=te(e.props.name)??"";return{id:e.id,name:n,qualifiedName:te(e.props.qualified_name)??n,kind:e.labels[0]??"",filePath:te(e.props.file_path)??te(e.props.path)??"",startLine:it(e.props.start_line),endLine:it(e.props.end_line),language:te(e.props.language)??"",role:te(e.props.role)??"",semanticSummary:te(e.props.semantic_summary),summaryOfHash:te(e.props.summary_of_hash),contentHash:te(e.props.content_hash),degree:t}}function ar(e,t){const n=Po(e),o=ir(n,t?.cachedPositions),s=[],r=new Map,i=u=>r.set(u,(r.get(u)??0)+1);for(const u of e.edges){if(!Ro.has(u.type))continue;const f=u.from.split(":"),g=u.to.split(":"),p=f[0]==="rs1"&&g[0]==="rs1"&&f[1]!==g[1];s.push({from:u.from,to:u.to,type:u.type,resolution:Ko(u.props),confidence:it(u.props.confidence,1),crossRepo:p}),i(u.from),i(u.to)}const c=new Map;for(const u of e.nodes)c.set(u.id,cr(u,r.get(u.id)??0));const l=[];for(const u of e.nodes)l.push(u.id,te(u.props.content_hash)??"");const a=jn(l);return{tree:n,layout:o,drawEdges:s,records:c,degree:r,fingerprint:a}}const lr="reposkein-layout-cache",Te="positions",ur=1;function fr(){try{if(typeof indexedDB<"u")return indexedDB}catch{}return null}function Tn(){const e=fr();return e?new Promise(t=>{let n;try{n=e.open(lr,ur)}catch{t(null);return}n.onupgradeneeded=()=>{const o=n.result;o.objectStoreNames.contains(Te)||o.createObjectStore(Te)},n.onsuccess=()=>t(n.result),n.onerror=()=>t(null),n.onblocked=()=>t(null)}):Promise.resolve(null)}async function dr(e){const t=await Tn();return t?new Promise(n=>{let o=!1;const s=r=>{o||(o=!0,t.close(),n(r))};try{const r=t.transaction(Te,"readonly"),i=r.objectStore(Te).get(e);i.onsuccess=()=>{const c=i.result;c&&c.byteLength>0&&c.byteLength%12===0?s(new Float32Array(c)):s(null)},i.onerror=()=>s(null),r.onerror=()=>s(null),r.onabort=()=>s(null)}catch{s(null)}}):null}async function pr(e,t){const n=await Tn();if(n)return new Promise(o=>{let s=!1;const r=()=>{s||(s=!0,n.close(),o())};try{const i=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength),c=n.transaction(Te,"readwrite");c.objectStore(Te).put(i,e),c.oncomplete=r,c.onerror=r,c.onabort=r}catch{r()}})}function An(){return typeof window>"u"?null:window.__REPOSKEIN_GRAPH__??null}function Ue(){return An()!==null}async function hr(e){const t=Co(e.nodesText,e.edgesText),n=sr(t.nodes.map(r=>r.id)),o=await dr(n),s=ar(t,{cachedPositions:o??void 0});return o||pr(n,s.layout.positions.slice()),{type:"result",repoId:s.tree.repoId,rootKey:s.tree.rootKey,clusters:[...s.tree.byKey.values()],keys:s.layout.keys,positions:s.layout.positions,drawEdges:s.drawEdges,records:[...s.records.entries()],fingerprint:s.fingerprint,counts:{nodes:t.nodes.length,edges:t.edges.length},repoRoot:e.manifest.root.repoRoot??null}}function gr(e,t){return(e.ancestors.get(t)?.length??1)-1}function Lt(e){return e.size===0?new Set(st):new Set(st.filter(t=>!e.has(t)))}function et(e,t={}){return{...e,expanded:new Set([e.model.rootKey]),selected:null,focusTarget:null,impact:null,focus:null,fitNonce:e.fitNonce+1,...t}}function Ft(){return{lens:"all",emphasis:"none",audit:"off",filters:{kinds:new Set,edgeTypes:new Set,minConfidence:0}}}function yr(e,t){switch(t.t){case"progress":return{...e,status:{kind:"loading",phase:t.phase}};case"ready":{const n=new Set([t.model.rootKey]);return{...e,status:{kind:"ready"},model:t.model,expanded:n,fitNonce:e.fitNonce+1}}case"error":return{...e,status:{kind:"error",message:t.message}};case"toggleExpand":{const n=new Set(e.expanded);return n.has(t.key)?n.delete(t.key):n.add(t.key),{...e,expanded:n,fitNonce:e.fitNonce+1}}case"collapseLevel":{if(!e.model||e.expanded.size===0)return e;let n=null,o=-1;for(const r of e.expanded){if(r===e.model.rootKey)continue;const i=gr(e.model,r);i>o&&(o=i,n=r)}if(n===null)return e.selected===null?e:{...e,selected:null,fitNonce:e.fitNonce+1};const s=new Set(e.expanded);return s.delete(n),{...e,expanded:s,selected:null,fitNonce:e.fitNonce+1}}case"select":return{...e,selected:t.id,fitNonce:e.fitNonce+1,impact:t.id===e.selected?e.impact:null,focus:t.id===e.selected?e.focus:null};case"hover":return{...e,hovered:t.id};case"requestFit":return{...e,fitNonce:e.fitNonce+1};case"setKindFilter":{const n=new Set(e.filters.kinds);return t.hidden?n.add(t.kind):n.delete(t.kind),{...e,filters:{...e.filters,kinds:n},lens:"all",emphasis:"none"}}case"setEdgeTypeFilter":{const n=new Set(e.filters.edgeTypes);return t.hidden?n.add(t.type):n.delete(t.type),{...e,filters:{...e.filters,edgeTypes:n},lens:"all",emphasis:"none"}}case"setMinConfidence":return{...e,filters:{...e.filters,minConfidence:t.value},lens:"all",emphasis:"none"};case"clearFilters":return{...e,filters:{kinds:new Set,edgeTypes:new Set,minConfidence:0},lens:"all",emphasis:"none",audit:"off"};case"setLens":{const n=_o(t.lens);return{...e,lens:t.lens,emphasis:n.emphasis,filters:{kinds:n.kinds,edgeTypes:n.edgeTypes,minConfidence:n.minConfidence},audit:"off"}}case"setAudit":return{...e,audit:t.mode};case"toggleCoupling":return{...e,coupling:!e.coupling};case"setCochange":return{...e,cochange:t.map};case"toggleImpact":{if(e.impact)return{...e,impact:null};if(!e.model||!e.selected)return e;const n=No(e.model,e.selected),o=Xe(e.model,e.expanded,[...n.impacted,...n.coveringTests,e.selected]);return{...e,impact:n,expanded:o,fitNonce:e.fitNonce+1}}case"toggleFocus":{if(e.focus)return{...e,focus:null,fitNonce:e.fitNonce+1};if(!e.model||!e.selected)return e;const n=Mt(e.model.drawEdges,e.selected,e.focusDepth,Lt(e.filters.edgeTypes)),o=Xe(e.model,e.expanded,n.nodes);return{...e,focus:n,impact:null,expanded:o,fitNonce:e.fitNonce+1}}case"setFocusDepth":{const n=hn(t.depth);if(n===e.focusDepth)return e;if(e.focus&&e.model&&e.selected){const o=Mt(e.model.drawEdges,e.selected,n,Lt(e.filters.edgeTypes)),s=Xe(e.model,e.expanded,o.nodes);return{...e,focusDepth:n,focus:o,expanded:s,fitNonce:e.fitNonce+1}}return{...e,focusDepth:n}}case"setFocusTarget":return{...e,focusTarget:t.id,fitNonce:t.id!==null?e.fitNonce+1:e.fitNonce};case"startTour":return e.model?et(e,{tour:!0,emphasis:"none"}):e;case"exitTour":return{...e,...Ft(),tour:!1,focus:null,selected:null};case"resetView":return e.model?et(e,{...Ft(),coupling:!1}):e;case"resetExpansion":return e.model?et(e):e;case"setBundleBeta":return{...e,bundleBeta:Math.max(0,Math.min(1,t.value))};case"setEdgeStats":{const{drawn:n,total:o}=t.stats;return e.edgeStats.drawn===n&&e.edgeStats.total===o?e:{...e,edgeStats:{drawn:n,total:o}}}}}const In=_.createContext(null);function xr({children:e}){const[t,n]=_.useReducer(yr,{status:{kind:"loading",phase:"starting"},model:null,expanded:new Set,selected:null,hovered:null,fitNonce:0,filters:{kinds:new Set,edgeTypes:new Set,minConfidence:0},focusTarget:null,lens:"all",emphasis:"none",audit:"off",impact:null,coupling:!1,cochange:null,focus:null,focusDepth:jo,tour:!1,bundleBeta:.85,edgeStats:{drawn:0,total:0}});_.useEffect(()=>{const s=An();if(s){let i=!1;return Promise.resolve().then(async()=>{if(!i)try{n({t:"progress",phase:"parsing baked graph"});const c=await hr(s);i||n({t:"ready",model:St(c)})}catch(c){i||n({t:"error",message:c instanceof Error?c.message:String(c)})}}),()=>{i=!0}}const r=new go;return r.onmessage=i=>{const c=i.data;c.type==="progress"?n({t:"progress",phase:c.phase}):c.type==="error"?n({t:"error",message:c.message}):c.type==="result"&&n({t:"ready",model:St(c)})},r.onerror=i=>n({t:"error",message:i.message}),r.postMessage({cmd:"load"}),()=>r.terminate()},[]);const o=_.useMemo(()=>({...t,toggleExpand:s=>n({t:"toggleExpand",key:s}),collapseLevel:()=>n({t:"collapseLevel"}),select:s=>n({t:"select",id:s}),hover:s=>n({t:"hover",id:s}),requestFit:()=>n({t:"requestFit"}),setKindFilter:(s,r)=>n({t:"setKindFilter",kind:s,hidden:r}),setEdgeTypeFilter:(s,r)=>n({t:"setEdgeTypeFilter",type:s,hidden:r}),setMinConfidence:s=>n({t:"setMinConfidence",value:s}),clearFilters:()=>n({t:"clearFilters"}),setFocusTarget:s=>n({t:"setFocusTarget",id:s}),setLens:s=>n({t:"setLens",lens:s}),setAudit:s=>n({t:"setAudit",mode:s}),toggleImpact:()=>n({t:"toggleImpact"}),toggleFocus:()=>n({t:"toggleFocus"}),setFocusDepth:s=>n({t:"setFocusDepth",depth:s}),toggleCoupling:()=>n({t:"toggleCoupling"}),setCochange:s=>n({t:"setCochange",map:s}),startTour:()=>n({t:"startTour"}),exitTour:()=>n({t:"exitTour"}),resetView:()=>n({t:"resetView"}),resetExpansion:()=>n({t:"resetExpansion"}),setBundleBeta:s=>n({t:"setBundleBeta",value:s}),setEdgeStats:s=>n({t:"setEdgeStats",stats:s})}),[t]);return y.jsx(In.Provider,{value:o,children:e})}function Z(){const e=_.useContext(In);if(!e)throw new Error("useStore must be used within StoreProvider");return e}const J=e=>{const t=parseInt(e.replace("#",""),16);return[(t>>16&255)/255,(t>>8&255)/255,(t&255)/255]},B={amber:"#F2B84B",teal:"#2DD4BF",cream:"#EAE7DC",navy:"#070A12"},Ae={amber:J(B.amber),teal:J(B.teal),cream:J(B.cream),navy:J(B.navy)};function lt(e,t){if(e==="galaxy")return J("#ffffff");if(e==="dir")return J("#9aa7c7");if(e==="file")return J("#6ea8ff");switch(t){case"Function":return J("#ffe08a");case"Class":return J("#5fe0e0");case"Interface":return J("#b98aff");case"Enum":return J("#7ce08a");case"Variable":return J("#9aa0a8");default:return J("#cfd6e4")}}const mr={rust:"#ff7a45",python:"#4b8bff",typescript:"#3aa0ff",javascript:"#f4d03f",go:"#39c5cf",java:"#e76f51",csharp:"#9b6dff"},br="#8a93a8",vr={rust:"Rust",python:"Python",typescript:"TypeScript",javascript:"JavaScript",go:"Go",java:"Java",csharp:"C#"};function zn(e){return mr[e]??br}function wr(e){return J(zn(e))}const Sr={CALLS:J("#ffd166"),IMPORTS:J("#6ea8ff"),INSTANTIATES:J("#ef8aff"),IMPLEMENTS:J("#5fe0e0"),INHERITS:J("#7ce08a")};function Cn(e){return Sr[e]??J("#8892a6")}const Rn=.15;function _r(e){switch(e){case"exact":return .75;case"name_match":return .42;case"ambiguous":return Rn}}function kr(e,t){const o=_r(e)*(1+.18*Math.log(1+t));return Math.min(1,Math.max(Rn,o))}const Pt=220,Er=.04;function Mr(e){return e<=Pt?1:Math.max(Er,Pt/e)}const Bt=.1;function Nr(e,t,n){const o=Math.max(e,t,n);if(o>0&&o<Bt){const s=Bt/o;return[e*s,t*s,n*s]}return[e,t,n]}const jr=1,Tr=12;function Ar(e,t){const o=(e==="galaxy"?6:e==="dir"?3.5:e==="file"?2.6:1.4)+.9*Math.log(1+t);return Math.min(Tr,Math.max(jr,o))}const Ir=[{type:"CALLS",color:"#ffd166",label:"Calls"},{type:"IMPORTS",color:"#6ea8ff",label:"Imports"},{type:"INSTANTIATES",color:"#ef8aff",label:"Instantiates"},{type:"IMPLEMENTS",color:"#5fe0e0",label:"Implements"},{type:"INHERITS",color:"#7ce08a",label:"Inherits"}],zr=[{kind:"galaxy",color:"#ffffff",label:"Repo"},{kind:"dir",color:"#9aa7c7",label:"Directory"},{kind:"file",color:"#6ea8ff",label:"File"},{kind:"Function",color:"#ffe08a",label:"Function"},{kind:"Class",color:"#5fe0e0",label:"Class"},{kind:"Interface",color:"#b98aff",label:"Interface"},{kind:"Enum",color:"#7ce08a",label:"Enum"},{kind:"Variable",color:"#9aa0a8",label:"Variable"}],Dt=500;function Ot(e){const t=Math.min(1,Math.max(0,e));return 1-Math.pow(1-t,3)}function Cr(e,t){const n=[],o=[];for(const s of t)e.has(s)||n.push(s);for(const s of e)t.has(s)||o.push(s);return{expanded:n,collapsed:o}}const $t=new Map;function Rr(e){return`${e.size}|${e.stops.map(t=>`${t.offset}:${t.alpha}`).join(",")}`}function mt(e){const t=Rr(e),n=$t.get(t);if(n)return n;const{size:o,stops:s}=e,r=document.createElement("canvas");r.width=r.height=o;const i=r.getContext("2d"),c=i.createRadialGradient(o/2,o/2,0,o/2,o/2,o/2);for(const a of s)c.addColorStop(a.offset,`rgba(255,255,255,${a.alpha})`);i.fillStyle=c,i.fillRect(0,0,o,o);const l=new co(r);return l.needsUpdate=!0,$t.set(t,l),l}const Kr={size:64,stops:[{offset:0,alpha:1},{offset:.4,alpha:.6},{offset:1,alpha:0}]},Lr={size:64,stops:[{offset:0,alpha:1},{offset:.4,alpha:.5},{offset:1,alpha:0}]},Fr={size:128,stops:[{offset:0,alpha:.55},{offset:.25,alpha:.22},{offset:.6,alpha:.05},{offset:1,alpha:0}]},Pr=Ae.amber,Br=Ae.teal,Dr=Ae.amber,Or=Ae.teal,fe=.18,De=1.9,$r=1.1;function qr(){const e=Z(),t=e.model,n=_.useRef(null),o=_.useRef(null),s=e.hovered,r=_.useMemo(()=>[...de(t,e.expanded)],[t,e.expanded]),i=_.useMemo(()=>xo(t,s,new Set(r)),[s,t,r]),c=_.useMemo(()=>{if(!e.impact)return null;const F=new Set(r),A=W=>ue(t,W,F),N=new Set,T=new Set,D=A(e.impact.sourceId);for(const W of e.impact.impacted){const z=A(W);z&&N.add(z)}for(const W of e.impact.coveringTests){const z=A(W);z&&T.add(z)}return{impacted:N,covering:T,sourceRep:D}},[e.impact,t,r]),l=_.useMemo(()=>{if(!e.focus)return null;const F=new Set(r),A=new Set;for(const N of e.focus.nodes){const T=ue(t,N,F);T&&A.add(T)}return A},[e.focus,t,r]),a=_.useMemo(()=>{if(e.emphasis!=="tests")return null;const F=new Set(r),A=new Set;for(const N of t.records.values()){if(!dn(N))continue;const T=ue(t,N.id,F);T&&A.add(T)}return A},[e.emphasis,t,r]),u=_.useMemo(()=>e.selected?ue(t,e.selected,new Set(r)):null,[e.selected,t,r]),f=_.useMemo(()=>s?ue(t,s,new Set(r)):null,[s,t,r]),{geometry:g,keysAt:p}=_.useMemo(()=>{const F=e.filters.kinds.size>0?r.filter(O=>{const C=t.byKey.get(O);return!(C?.symbolKind&&e.filters.kinds.has(C.symbolKind.toLowerCase()))}):r,A=F.length,N=new Float32Array(A*3),T=new Float32Array(A*3),D=new Float32Array(A),W=new Array(A);for(let O=0;O<A;O++){const C=F[O],H=t.indexByKey.get(C);if(W[O]=C,H===void 0)continue;N[O*3]=t.positions[H*3],N[O*3+1]=t.positions[H*3+1],N[O*3+2]=t.positions[H*3+2];const P=t.byKey.get(C),ee=P.nodeId?t.records.get(P.nodeId)?.degree??0:0;let[j,$,U]=lt(P.kind,P.symbolKind);if(c)C===c.sourceRep||(c.covering.has(C)?[j,$,U]=Br:c.impacted.has(C)?[j,$,U]=Pr:(j*=fe,$*=fe,U*=fe));else if(l)l.has(C)||(j*=fe,$*=fe,U*=fe);else if(e.emphasis==="types"){const le=P.symbolKind?.toLowerCase();P.kind==="symbol"&&!(le&&So.has(le))&&(j*=fe,$*=fe,U*=fe)}else a&&(a.has(C)||(j*=fe,$*=fe,U*=fe));c||(f&&C===f?[j,$,U]=Or:u&&C===u&&([j,$,U]=Dr));let G=De;i&&!i.has(C)&&(G*=.22),j*=G,$*=G,U*=G;const[xe,_e,ie]=Nr(j,$,U);T[O*3]=xe,T[O*3+1]=_e,T[O*3+2]=ie;const pe=C===u||C===f?1.6:l?.has(C)?1.25:1;D[O]=Ar(P.kind,ee)*pe}const z=new we;return z.setAttribute("position",new ge(N,3)),z.setAttribute("color",new ge(T,3)),z.setAttribute("aSize",new ge(D,1)),{geometry:z,keysAt:W}},[r,t,i,e.filters,c,l,a,e.emphasis,u,f]);_.useEffect(()=>()=>g.dispose(),[g]);const d=_.useRef(null),b=_.useRef(new Map),x=_.useRef(new Set(e.expanded)),h=_.useRef(null),S=_.useRef(null),[w,m]=_.useState(0);_.useEffect(()=>{const F=x.current,A=e.expanded,{expanded:N,collapsed:T}=Cr(F,A);if(x.current=new Set(A),N.length===0&&T.length===0)return;const D=performance.now(),W=new Set(N);if(N.length>0){const z=de(t,A),O=new Map;for(const C of z){const H=t.ancestors.get(C);if(!H)continue;let P=null;for(let j=H.length-1;j>=0;j--){const $=H[j];if($!==C&&W.has($)){P=$;break}}if(!P)continue;const ee=b.current.get(C);if(ee)O.set(C,ee);else{const j=t.indexByKey.get(P);if(j===void 0)continue;O.set(C,[t.positions[j*3],t.positions[j*3+1],t.positions[j*3+2]])}}d.current=O.size>0?{origin:O,start:D}:null}if(T.length>0){const z=de(t,F),O=de(t,A),C=new Set(T),H=[];for(const P of z){if(O.has(P))continue;const ee=t.ancestors.get(P);if(!ee)continue;let j=null;for(let $=ee.length-1;$>=0;$--){const U=ee[$];if(U!==P&&C.has(U)){j=U;break}}j&&H.push({key:P,into:j})}if(H.length>0){const P=H.length,ee=new Float32Array(P*3),j=new Float32Array(P*3),$=new Float32Array(P*3),U=new Float32Array(P*3);for(let G=0;G<P;G++){const{key:xe,into:_e}=H[G],ie=t.indexByKey.get(xe),pe=t.indexByKey.get(_e);if(ie===void 0||pe===void 0)continue;const le=b.current.get(xe)??[t.positions[ie*3],t.positions[ie*3+1],t.positions[ie*3+2]];ee[G*3]=le[0],ee[G*3+1]=le[1],ee[G*3+2]=le[2],$[G*3]=le[0],$[G*3+1]=le[1],$[G*3+2]=le[2],j[G*3]=t.positions[pe*3],j[G*3+1]=t.positions[pe*3+1],j[G*3+2]=t.positions[pe*3+2];const be=t.byKey.get(xe),Ye=be?lt(be.kind,be.symbolKind):[.8,.85,.95];U[G*3]=Ye[0]*De,U[G*3+1]=Ye[1]*De,U[G*3+2]=Ye[2]*De}S.current={positions:$,origin:ee,target:j,colors:U,start:D},m(G=>G+1)}}},[e.expanded,t]);const v=_.useRef(null);_.useEffect(()=>{v.current=performance.now()},[]);const k=_.useMemo(()=>new we,[]);_.useEffect(()=>()=>k.dispose(),[k]),ht(({invalidate:F})=>{const A=o.current;if(A){const C=v.current;let H=1;C!==null&&(H=Math.min(1,(performance.now()-C)/1e3/$r),H=1-Math.pow(1-H,3)),A.opacity=.95*H,A.size=.3+.7*H}const N=performance.now(),T=n.current,D=T?.geometry.getAttribute("position"),W=b.current;if(T&&D){const C=D.array,H=d.current,P=H?Ot((N-H.start)/Dt):1;let ee=!1;W.clear();for(let j=0;j<p.length;j++){const $=p[j],U=t.indexByKey.get($);if(U===void 0)continue;const G=t.positions[U*3],xe=t.positions[U*3+1],_e=t.positions[U*3+2],ie=H&&P<1?H.origin.get($):void 0;let pe=G,le=xe,be=_e;ie&&(pe=ie[0]+(G-ie[0])*P,le=ie[1]+(xe-ie[1])*P,be=ie[2]+(_e-ie[2])*P,ee=!0),C[j*3]=pe,C[j*3+1]=le,C[j*3+2]=be,W.set($,[pe,le,be])}D.needsUpdate=!0,P>=1&&(d.current=null),ee&&F()}const z=S.current,O=h.current;if(z&&O){const C=Ot((N-z.start)/Dt),H=z.positions.length/3;for(let j=0;j<H;j++)z.positions[j*3]=z.origin[j*3]+(z.target[j*3]-z.origin[j*3])*C,z.positions[j*3+1]=z.origin[j*3+1]+(z.target[j*3+1]-z.origin[j*3+1])*C,z.positions[j*3+2]=z.origin[j*3+2]+(z.target[j*3+2]-z.origin[j*3+2])*C;const P=O.geometry.getAttribute("position");P&&(P.needsUpdate=!0);const ee=O.material;ee.opacity=.95*(1-C),C>=1?(S.current=null,ee.opacity=0):F()}}),_.useEffect(()=>{const F=S.current;if(!F)return;const A=new ge(F.positions,3);k.setAttribute("position",A),k.setAttribute("color",new ge(F.colors,3)),A.needsUpdate=!0},[w,k]);const E=F=>{F.stopPropagation();const A=F.index;if(A===void 0)return;const N=p[A];if(!N)return;const T=t.byKey.get(N);T&&(T.kind==="symbol"?e.select(T.nodeId??N):(e.toggleExpand(N),T.nodeId&&e.select(T.nodeId)))},M=_.useRef(null),I=_.useRef(null),R=_.useRef(s);_.useEffect(()=>{R.current=s},[s]),_.useEffect(()=>()=>{I.current!==null&&cancelAnimationFrame(I.current)},[]);const K=F=>{M.current=F,I.current===null&&(I.current=requestAnimationFrame(()=>{I.current=null;const A=M.current;A!==R.current&&(R.current=A,e.hover(A))}))},L=F=>{F.stopPropagation();const A=F.index,N=A===void 0?null:p[A]??null,T=N?t.byKey.get(N):null;K(T?.nodeId??N??null)},re=()=>K(null),ae=_.useMemo(()=>mt(Kr),[]);return y.jsxs(y.Fragment,{children:[y.jsx("points",{ref:n,geometry:g,onClick:E,onPointerMove:L,onPointerOut:re,raycast:Gr,renderOrder:10,children:y.jsx("pointsMaterial",{ref:o,size:1,sizeAttenuation:!0,vertexColors:!0,transparent:!0,opacity:.95,depthWrite:!1,blending:Ne,map:ae,onBeforeCompile:Hr})}),y.jsx("points",{ref:h,geometry:k,raycast:()=>null,children:y.jsx("pointsMaterial",{size:3,sizeAttenuation:!0,vertexColors:!0,transparent:!0,opacity:0,depthWrite:!1,blending:Ne,map:ae})})]})}function Hr(e){e.vertexShader=e.vertexShader.replace("uniform float size;",`uniform float size;
4
+ attribute float aSize;`).replace("gl_PointSize = size;","gl_PointSize = size * aSize;")}function Gr(e,t){const n=e.params.Points?.threshold;e.params.Points&&(e.params.Points.threshold=2.5),ao.prototype.raycast.call(this,e,t),e.params.Points&&n!==void 0&&(e.params.Points.threshold=n)}const Wr={rs:"rust",py:"python",pyi:"python",ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",go:"go",java:"java",cs:"csharp"};function Ur(e){const t=e.trim().toLowerCase();return t===""?"":t==="c#"||t==="c-sharp"||t==="cs"?"csharp":t==="ts"?"typescript":t==="js"?"javascript":t==="py"?"python":t==="golang"?"go":t}function qt(e){const t=e.lastIndexOf(".");if(t<0||t===e.length-1)return"";const n=e.slice(t+1).toLowerCase();return Wr[n]??""}function Kn(e,t){const n=e.byKey.get(t);if(!n)return"";if(n.nodeId){const o=e.records.get(n.nodeId);if(o){const s=Ur(o.language);if(s)return s;const r=qt(o.filePath||n.name);if(r)return r}}return qt(n.name)}function Yr(e){const t=new Set;for(const n of e.byKey.values()){if(n.kind!=="file")continue;const o=Kn(e,n.key);o&&t.add(o)}return[...t].sort()}function Xr(e){const t=new Map,n=s=>{let r=t.get(s);return r||(r=new Map,t.set(s,r)),r};for(const s of e.byKey.values()){if(s.kind!=="file")continue;const r=Kn(e,s.key);if(!r)continue;const i=e.ancestors.get(s.key);if(i)for(const c of i){const l=n(c);l.set(r,(l.get(r)??0)+1)}}const o=new Map;for(const[s,r]of t){let i="",c=0;for(const[l,a]of[...r.entries()].sort((u,f)=>u[0]<f[0]?-1:1))a>c&&(c=a,i=l);i&&o.set(s,i)}return o}function Vr(){const e=Z(),t=e.model,n=_.useMemo(()=>Zr(t),[t]),o=_.useMemo(()=>Xr(t),[t]),s=_.useMemo(()=>{const c=de(t,e.expanded),l=[],a=[],u=[];for(const g of c){const p=t.byKey.get(g);if(!p||p.kind==="symbol")continue;const d=t.indexByKey.get(g);if(d===void 0)continue;const b=n.get(g)??0,x=p.kind==="galaxy"?26:p.kind==="dir"?16:9,h=Math.max(x,b*2.2),S=o.get(g),w=S?wr(S):p.kind==="galaxy"?Ae.amber:lt(p.kind,p.symbolKind),m=.34,v=w[0]*m,k=w[1]*m,E=w[2]*m;l.push(t.positions[d*3],t.positions[d*3+1],t.positions[d*3+2]),a.push(v,k,E),u.push(h)}const f=new we;return f.setAttribute("position",new Ee(l,3)),f.setAttribute("color",new Ee(a,3)),f.setAttribute("aSize",new Ee(u,1)),f},[t,e.expanded,n,o]);_.useEffect(()=>()=>s.dispose(),[s]);const r=_.useMemo(()=>mt(Fr),[]),i=_.useMemo(()=>Qr(r),[r]);return _.useEffect(()=>()=>i.dispose(),[i]),y.jsx("points",{geometry:s,material:i,renderOrder:-1,raycast:()=>null})}function Zr(e){const t=new Map;for(const[n]of e.indexByKey){const o=e.byKey.get(n);!o||o.kind==="symbol"||t.set(n,0)}for(const[n,o]of e.indexByKey){const s=e.ancestors.get(n);if(!s)continue;const r=e.positions[o*3],i=e.positions[o*3+1],c=e.positions[o*3+2];for(const l of s){if(l===n)continue;const a=e.indexByKey.get(l);if(a===void 0)continue;const u=r-e.positions[a*3],f=i-e.positions[a*3+1],g=c-e.positions[a*3+2],p=Math.sqrt(u*u+f*f+g*g),d=t.get(l);d!==void 0&&p>d&&t.set(l,p)}}return t}function Qr(e){const t=new lo({size:1,sizeAttenuation:!0,vertexColors:!0,transparent:!0,opacity:.5,depthWrite:!1,blending:Ne,map:e,fog:!0});return t.onBeforeCompile=n=>{n.vertexShader=n.vertexShader.replace("uniform float size;",`uniform float size;
5
+ attribute float aSize;`).replace("gl_PointSize = size;","gl_PointSize = aSize;")},t}function Ht(e,t){const n=e.x-t.x,o=e.y-t.y,s=e.z-t.z;return n*n+o*o+s*s}function Jr(e){const t=e.length;if(t<2)return[];const n=new Array(t).fill(!1),o=new Array(t).fill(1/0),s=new Array(t).fill(-1);n[0]=!0;for(let i=1;i<t;i++)o[i]=Ht(e[0],e[i]),s[i]=0;const r=[];for(let i=1;i<t;i++){let c=-1,l=1/0;for(let u=0;u<t;u++)n[u]||o[u]<l&&(l=o[u],c=u);if(c===-1)break;n[c]=!0;const a=s[c];r.push(a<c?[a,c]:[c,a]);for(let u=0;u<t;u++){if(n[u])continue;const f=Ht(e[c],e[u]);f<o[u]&&(o[u]=f,s[u]=c)}}return r.sort((i,c)=>i[0]!==c[0]?i[0]-c[0]:i[1]-c[1]),r}const Gt=80;function ei(){const e=Z(),t=e.model,n=_.useMemo(()=>{const s=de(t,e.expanded),r=[];for(const c of e.expanded){const l=t.byKey.get(c);if(!l||l.children.length<2)continue;const a=[];for(const f of l.children){if(!s.has(f))continue;const g=t.indexByKey.get(f);if(g!==void 0&&(a.push({key:f,x:t.positions[g*3],y:t.positions[g*3+1],z:t.positions[g*3+2]}),a.length>Gt))break}if(a.length<2||a.length>Gt)continue;const u=Jr(a);for(const[f,g]of u){const p=a[f],d=a[g];r.push(p.x,p.y,p.z,d.x,d.y,d.z)}}const i=new we;return i.setAttribute("position",new Ee(r,3)),i},[t,e.expanded]);_.useEffect(()=>()=>n.dispose(),[n]);const o=_.useMemo(()=>{const[s,r,i]=Ae.teal,c=.06;return new cn({color:new uo(s*c,r*c,i*c),transparent:!0,depthWrite:!1,blending:Ne,fog:!0})},[]);return _.useEffect(()=>()=>o.dispose(),[o]),y.jsx("lineSegments",{geometry:n,material:o,raycast:()=>null})}const Wt=15e4,ti=12,Ut=8,ni=4e3;function bt(e,t,n){const o=e.ancestors.get(t),s=e.ancestors.get(n);if(!o||!s)return[t,n];let r=0;const i=Math.min(o.length,s.length);for(;r<i&&o[r]===s[r];)r++;const c=r-1;if(c<0)return[t,n];const l=[];for(let a=o.length-1;a>=c;a--)l.push(o[a]);for(let a=c+1;a<s.length;a++)l.push(s[a]);return l}function oi(e,t){const n=t.length>ni,o=n?Ut:ti,s=n?4:Ut,r=t.map(l=>{const a=bt(e,l.srcKey,l.dstKey).length;return a<=2?1:a===3?s:o}),i=r.reduce((l,a)=>l+a,0);if(i<=Wt)return r;const c=Wt/i;return r.map(l=>Math.max(1,Math.floor(l*c)))}let Y=new Float64Array(64),X=new Float64Array(64),V=new Float64Array(64);function Ln(e){if(e<=Y.length)return;const t=Math.max(e,Y.length*2);Y=new Float64Array(t),X=new Float64Array(t),V=new Float64Array(t)}let Q=new Float64Array(64);function Fn(e){e>Q.length&&(Q=new Float64Array(Math.max(e,Q.length*2)))}function si(e,t,n,o){const s=oi(e,t);let r=0;for(const g of s)r+=g;const i=new Float32Array(r*2*3),c=new Float32Array(r*2*3);let l=0;const a=e.positions,u=e.indexByKey;for(let g=0;g<t.length;g++){const p=t[g],d=s[g],b=p.a*o,x=p.r*b,h=p.g*b,S=p.b*b,w=bt(e,p.srcKey,p.dstKey);Ln(w.length);let m=0;for(const N of w){const T=u.get(N);T!==void 0&&(Y[m]=a[T*3],X[m]=a[T*3+1],V[m]=a[T*3+2],m++)}if(m<2)continue;if(d===1||m===2){l=Yt(i,c,l,Y[0],X[0],V[0],Y[m-1],X[m-1],V[m-1],x,h,S);continue}const v=m-1,k=Y[0],E=X[0],M=V[0],I=Y[v],R=X[v],K=V[v];for(let N=1;N<v;N++){const T=N/v,D=k+(I-k)*T,W=E+(R-E)*T,z=M+(K-M)*T;Y[N]=n*Y[N]+(1-n)*D,X[N]=n*X[N]+(1-n)*W,V[N]=n*V[N]+(1-n)*z}Fn(m),Q[0]=0;for(let N=1;N<m;N++){const T=Y[N]-Y[N-1],D=X[N]-X[N-1],W=V[N]-V[N-1],z=Math.sqrt(Math.sqrt(T*T+D*D+W*W));Q[N]=Q[N-1]+(z>1e-6?z:1e-6)}const L=Q[0],re=Q[v];let ae=Y[0],F=X[0],A=V[0];for(let N=1;N<=d;N++){const T=L+(re-L)*N/d;let D=0;for(;D<v-1&&Q[D+1]<T;)D++;const W=Me(Y,Q,D,v,T),z=Me(X,Q,D,v,T),O=Me(V,Q,D,v,T);l=Yt(i,c,l,ae,F,A,W,z,O,x,h,S),ae=W,F=z,A=O}}const f=new we;return f.setAttribute("position",new ge(i,3)),f.setAttribute("color",new ge(c,3)),f.setDrawRange(0,l/3),f}const ve=10;function ri(e,t,n,o,s,r){const i=e.positions,c=e.indexByKey,l=bt(e,t,n);Ln(l.length);let a=0;for(const m of l){const v=c.get(m);v!==void 0&&(Y[a]=i[v*3],X[a]=i[v*3+1],V[a]=i[v*3+2],a++)}if(a<2)return 0;const u=ve+1;if(a===2){const m=Y[0],v=X[0],k=V[0],E=Y[1],M=X[1],I=V[1];for(let R=0;R<u;R++){const K=R/ve;s[r+R*3]=m+(E-m)*K,s[r+R*3+1]=v+(M-v)*K,s[r+R*3+2]=k+(I-k)*K}return u}const f=a-1,g=Y[0],p=X[0],d=V[0],b=Y[f],x=X[f],h=V[f];for(let m=1;m<f;m++){const v=m/f;Y[m]=o*Y[m]+(1-o)*(g+(b-g)*v),X[m]=o*X[m]+(1-o)*(p+(x-p)*v),V[m]=o*V[m]+(1-o)*(d+(h-d)*v)}Fn(a),Q[0]=0;for(let m=1;m<a;m++){const v=Y[m]-Y[m-1],k=X[m]-X[m-1],E=V[m]-V[m-1],M=Math.sqrt(Math.sqrt(v*v+k*k+E*E));Q[m]=Q[m-1]+(M>1e-6?M:1e-6)}const S=Q[0],w=Q[f];for(let m=0;m<u;m++){const v=S+(w-S)*m/ve;let k=0;for(;k<f-1&&Q[k+1]<v;)k++;s[r+m*3]=Me(Y,Q,k,f,v),s[r+m*3+1]=Me(X,Q,k,f,v),s[r+m*3+2]=Me(V,Q,k,f,v)}return u}function Me(e,t,n,o,s){const r=n,i=n+1,c=r>0?r-1:r,l=i<o?i+1:i,a=t[c],u=t[r],f=t[i],g=t[l],p=e[c],d=e[r],b=e[i],x=e[l],h=u-a,S=f-u,w=g-f,m=h>1e-9?((u-s)*p+(s-a)*d)/h:d,v=S>1e-9?((f-s)*d+(s-u)*b)/S:d,k=w>1e-9?((g-s)*b+(s-f)*x)/w:b,E=f-a,M=g-u,I=E>1e-9?((f-s)*m+(s-a)*v)/E:v,R=M>1e-9?((g-s)*v+(s-u)*k)/M:v;return S>1e-9?((f-s)*I+(s-u)*R)/S:I}function Yt(e,t,n,o,s,r,i,c,l,a,u,f){return e[n]=o,e[n+1]=s,e[n+2]=r,e[n+3]=i,e[n+4]=c,e[n+5]=l,t[n]=a,t[n+1]=u,t[n+2]=f,t[n+3]=a,t[n+4]=u,t[n+5]=f,n+6}function Xt(e){return e.startsWith("galaxy:")?e:e.split(":")[1]??e}function Vt(e,t){for(const n of e)if(t.has(n))return!0;return!1}function ii(){const e=Z(),t=e.model,n=e.hovered,{geometry:o,drawn:s,total:r}=_.useMemo(()=>{const c=[e.selected,n,...e.focus?.nodes??[]].filter(Boolean),{bundles:l,visible:a,total:u}=un(t,{expanded:e.expanded,filters:{edgeTypes:e.filters.edgeTypes,minConfidence:e.filters.minConfidence,audit:e.audit},activeNodes:c}),f=e.selected?ot(t,e.selected,a):null,g=n?yo(t,n,a):null,p=an(t,e.focus,a),d=new Set;if(f&&d.add(f),g&&d.add(g),p)for(const m of p)d.add(m);const b=d.size>0,x=e.impact?new Set([e.impact.sourceId,...e.impact.impacted]):null,h=[];for(const m of l){if(!t.indexByKey.has(m.srcKey)||!t.indexByKey.has(m.dstKey))continue;let[v,k,E]=Cn(m.dominantType),M=kr(m.bestResolution,m.count)*m.lengthAtten;if(x&&(m.dominantType==="CALLS"&&Vt(m.srcNodes,x)&&Vt(m.dstNodes,x)?(v=1,k=.42,E=.32,M=Math.min(1,M*1.8)):M*=.08),b){const I=p?p.has(m.srcKey)&&p.has(m.dstKey):!1,R=d.has(m.srcKey)||d.has(m.dstKey);I?M=Math.min(1,M*1.5):R?M=Math.min(1,M*1.3):M*=.06}Xt(m.srcKey)!==Xt(m.dstKey)&&(v=Math.min(1,v*1.8),k=Math.min(1,k*1.8),E=Math.min(1,E*1.8)),h.push({srcKey:m.srcKey,dstKey:m.dstKey,r:v,g:k,b:E,a:M})}const S=Mr(h.length);return{geometry:si(t,h,e.bundleBeta,S),drawn:h.length,total:u}},[t,e.expanded,e.selected,n,e.filters,e.audit,e.impact,e.focus,e.bundleBeta]);_.useEffect(()=>()=>o.dispose(),[o]),_.useEffect(()=>{e.setEdgeStats({drawn:s,total:r})},[s,r]);const i=_.useMemo(()=>new cn({vertexColors:!0,transparent:!0,depthWrite:!1,blending:Ne}),[]);return _.useEffect(()=>()=>i.dispose(),[i]),y.jsx("lineSegments",{geometry:o,material:i,renderOrder:5})}function Zt(e){return Math.min(4,1+Math.floor(Math.log2(1+e)))}function Qt(e,t){return t<=1?0:e/t}function ci(e,t=3e3,n){const o=[];if(e.length===0||t<=0)return{particles:o};const s=[],r=[];for(let l=0;l<e.length;l++)n&&n(e[l],l)?s.push(l):r.push(l);const i=(l,a)=>{for(let u=0;u<a&&o.length<t;u++)o.push({bundleIndex:l,phase:Qt(u,a)})};for(const l of s){if(o.length>=t)break;i(l,Zt(e[l].count))}const c=t-o.length;if(c>0&&r.length>0)if(r.length<=c){for(const l of r)i(l,1);for(const l of r){if(o.length>=t)break;const a=Zt(e[l].count)-1;for(let u=1;u<=a&&o.length<t;u++)o.push({bundleIndex:l,phase:Qt(u,a+1)})}}else{const l=Math.ceil(r.length/c);for(let a=0;a<r.length&&o.length<t;a+=l)i(r[a],1)}return{particles:o}}const ai=3e3,li=.32,ui=.8,fi=.55,di=ve+1;function pi(){const e=Z(),t=e.model,{geometry:n,curves:o,curveBase:s,phaseArr:r,count:i}=_.useMemo(()=>{const l=[e.selected,e.hovered,...e.focus?.nodes??[]].filter(Boolean),{bundles:a,visible:u}=un(t,{expanded:e.expanded,filters:{edgeTypes:e.filters.edgeTypes,minConfidence:e.filters.minConfidence,audit:e.audit},activeNodes:l});let f=a;if(e.focus){const K=an(t,e.focus,u);K&&(f=a.filter(L=>K.has(L.srcKey)&&K.has(L.dstKey)))}const g=new Set,p=e.selected?ot(t,e.selected,u):null,d=e.hovered?ot(t,e.hovered,u):null;p&&g.add(p),d&&g.add(d);const b=g.size>0?K=>g.has(K.srcKey)||g.has(K.dstKey):void 0,{particles:x}=ci(f,ai,b),h=x.length,S=new Map,w=new Float32Array(h*di*3);let m=0;const v=new Float32Array(h),k=new Int32Array(h),E=new Float32Array(h*3),M=new Float32Array(h*3);let I=0;for(let K=0;K<h;K++){const L=x[K],re=f[L.bundleIndex];if(!t.indexByKey.has(re.srcKey)||!t.indexByKey.has(re.dstKey))continue;let ae=S.get(L.bundleIndex);if(ae===void 0){const W=ri(t,re.srcKey,re.dstKey,e.bundleBeta,w,m*3);if(W===0)continue;ae=m,S.set(L.bundleIndex,ae),m+=W}k[I]=ae,E[I*3]=w[ae*3],E[I*3+1]=w[ae*3+1],E[I*3+2]=w[ae*3+2],v[I]=L.phase;const[F,A,N]=Cn(re.dominantType),T=g.size>0&&(g.has(re.srcKey)||g.has(re.dstKey)),D=fi*(T?2:1);M[I*3]=F*D,M[I*3+1]=A*D,M[I*3+2]=N*D,I++}const R=new we;return R.setAttribute("position",new ge(E,3)),R.setAttribute("color",new ge(M,3)),R.setDrawRange(0,I),{geometry:R,curves:w,curveBase:k,phaseArr:v,count:I}},[t,e.expanded,e.filters,e.audit,e.focus,e.selected,e.hovered,e.bundleBeta]);_.useEffect(()=>()=>n.dispose(),[n]);const c=_.useRef(null);return ht(({clock:l,invalidate:a})=>{const u=c.current;if(!u||i===0)return;const f=u.geometry.getAttribute("position");if(!f)return;const g=f.array,p=l.elapsedTime*li;for(let d=0;d<i;d++){const b=(p+r[d])%1,x=s[d],h=b*ve;let S=h|0;S>=ve&&(S=ve-1);const w=h-S,m=(x+S)*3,v=(x+S+1)*3;g[d*3]=o[m]+(o[v]-o[m])*w,g[d*3+1]=o[m+1]+(o[v+1]-o[m+1])*w,g[d*3+2]=o[m+2]+(o[v+2]-o[m+2])*w}f.needsUpdate=!0,a()}),i===0?null:y.jsx("points",{ref:c,geometry:n,raycast:()=>null,children:y.jsx("pointsMaterial",{size:ui,sizeAttenuation:!0,map:mt(Lr),vertexColors:!0,transparent:!0,opacity:.85,depthWrite:!1,blending:Ne})})}const hi=20;function gi(){const e=Z(),t=e.model,n=_.useMemo(()=>{const o=de(t,e.expanded),s=new Set;e.hovered&&s.add(e.hovered),e.selected&&s.add(e.selected);const r=[];for(const a of s){const u=t.clusterOfNode.get(a)??a,f=t.indexByKey.get(u);if(f===void 0)continue;const p=t.byKey.get(u)?.name??t.records.get(a)?.name??u;r.push({key:`priority-${u}`,label:p,pos:[t.positions[f*3],t.positions[f*3+1],t.positions[f*3+2]],priority:!0})}const i=[];for(const a of o){const u=t.byKey.get(a);u&&u.kind!=="symbol"&&i.push({key:a,importance:u.children.length})}i.sort((a,u)=>u.importance-a.importance);const c=new Set([...s].map(a=>t.clusterOfNode.get(a)??a));let l=0;for(const{key:a}of i){if(l>=hi)break;if(c.has(a))continue;const u=t.indexByKey.get(a);if(u===void 0)continue;const f=t.byKey.get(a);r.push({key:`cluster-${a}`,label:f.name,pos:[t.positions[u*3],t.positions[u*3+1],t.positions[u*3+2]],priority:!1}),l++}return r},[t,e.hovered,e.selected,e.expanded]);return y.jsx(y.Fragment,{children:n.map(o=>y.jsx(eo,{position:o.pos,center:!0,distanceFactor:40,zIndexRange:[10,0],children:y.jsx("div",{style:{padding:"2px 6px",borderRadius:4,background:o.priority?"rgba(8,12,24,0.92)":"rgba(8,12,24,0.65)",border:o.priority?"1px solid rgba(120,150,210,0.5)":"1px solid rgba(120,150,210,0.25)",color:o.priority?"#dfe6f5":"rgba(180,200,230,0.7)",fontSize:o.priority?12:10,whiteSpace:"nowrap",pointerEvents:"none",transform:"translateY(-14px)"},children:o.label})},o.key))})}let ut=null;function Jt(){return ut}let ft=null;function yi(e,t,n){ft?.(e,t,n)}const xi=4e3,mi=.05,en=1.3;function bi(){const e=_.useRef(null),t=Z(),n=t.model,{invalidate:o}=rn(),s=_.useRef(performance.now()),r=_.useMemo(()=>({box:new po,sphere:new fo,pt:new wt}),[]);_.useEffect(()=>{const c=e.current;if(!c||!n)return;if(t.focusTarget){const p=n.clusterOfNode.get(t.focusTarget)??t.focusTarget,d=n.indexByKey.get(p);if(d!==void 0){const{sphere:b,pt:x}=r;x.set(n.positions[d*3],n.positions[d*3+1],n.positions[d*3+2]),b.set(x,60*en),c.fitToSphere(b,!0),s.current=performance.now(),o();return}}let l;if(t.focus){const p=de(n,t.expanded),d=new Set;for(const b of t.focus.nodes){const x=ue(n,b,p);x&&d.add(x)}l=[...d]}else t.selected&&n.clusterOfNode.has(t.selected)?l=[n.clusterOfNode.get(t.selected)]:t.selected&&n.indexByKey.has(t.selected)?l=[t.selected]:l=[...de(n,t.expanded)];const{box:a,sphere:u,pt:f}=r;a.makeEmpty();let g=!1;for(const p of l){const d=n.indexByKey.get(p);d!==void 0&&(f.set(n.positions[d*3],n.positions[d*3+1],n.positions[d*3+2]),a.expandByPoint(f),g=!0)}g&&(a.getBoundingSphere(u),u.radius=Math.max(u.radius,4)*en,c.fitToSphere(u,!0),s.current=performance.now(),o())},[t.fitNonce,n]),_.useEffect(()=>(ft=(c,l,a)=>{const u=e.current;u&&(u.moveTo(c,l,a,!0),s.current=performance.now(),o())},()=>{ft=null,ut=null}),[o]);const i=_.useMemo(()=>new wt,[]);return ht((c,l)=>{const a=e.current;if(!a)return;a.getTarget(i),ut={x:i.x,y:i.y,z:i.z};const u=performance.now();if(a.active){s.current=u;return}u-s.current<xi||(a.rotate(mi*l,0,!1),o())}),y.jsx(to,{ref:e,makeDefault:!0,smoothTime:.3,minDistance:2,maxDistance:1200,onStart:()=>{s.current=performance.now()}})}async function vi(){if(Ue())return{};try{const e=await fetch("/api/temporal");return e.ok?await e.json():{}}catch{return{}}}function wi(e,t){return`file:${e}:${t}`}function Si(e,t,n){const o=new Map,s=r=>{const i=wi(e.repoId,r),c=e.byKey.get(i);if(!c)return null;const l=c.nodeId??i;return ue(e,l,n)??(n.has(i)?i:null)};for(const[r,i]of Object.entries(t)){const c=s(r);if(c)for(const{path:l,support:a,confidence:u}of i){const f=s(l);if(!f||f===c)continue;const[g,p]=c<f?[c,f]:[f,c],d=`${g} ${p}`,b=o.get(d);(!b||a>b.support||a===b.support&&u>b.confidence)&&o.set(d,{aKey:g,bKey:p,support:a,confidence:u})}}return[...o.values()].sort((r,i)=>r.aKey===i.aKey?r.bKey<i.bKey?-1:1:r.aKey<i.aKey?-1:1)}function _i(){const e=Z(),t=e.model,n=e.cochange,o=_.useMemo(()=>{if(!n)return null;const r=de(t,e.expanded),i=Si(t,n,r);if(i.length===0)return null;const c=[],l=[];for(const u of i){const f=t.indexByKey.get(u.aKey),g=t.indexByKey.get(u.bKey);if(f===void 0||g===void 0)continue;const p=t.positions[f*3],d=t.positions[f*3+1],b=t.positions[f*3+2],x=t.positions[g*3],h=t.positions[g*3+1],S=t.positions[g*3+2];c.push(p,d,b,x,h,S);const w=Math.hypot(x-p,h-d,S-b);l.push(0,w)}if(c.length===0)return null;const a=new we;return a.setAttribute("position",new Ee(c,3)),a.setAttribute("lineDistance",new Ee(l,1)),a},[t,n,e.expanded]);_.useEffect(()=>{const r=o;return()=>r?.dispose()},[o]);const s=_.useMemo(()=>new ho({color:16727536,transparent:!0,opacity:.7,dashSize:2.5,gapSize:1.8,depthWrite:!1}),[]);return _.useEffect(()=>()=>s.dispose(),[s]),!e.coupling||!o?null:y.jsx("lineSegments",{geometry:o,material:s})}async function ki(e,t,n){if(Ue())return null;try{const o=new URLSearchParams({path:e,start:String(t),end:String(n)}),s=await fetch(`/api/source?${o.toString()}`);return s.ok?await s.json():null}catch{return null}}const ze=Dn();function Ei(){const e=Z(),t=e.model,[n,o]=_.useState([]),s=e.selected?t.records.get(e.selected):null,r=_.useMemo(()=>{if(!e.selected)return[];const u=e.selected,f=[];for(const g of t.drawEdges)g.from===u?f.push({direction:"out",type:g.type,neighborId:g.to,neighbor:t.records.get(g.to)?.name??g.to,resolution:g.resolution,confidence:g.confidence}):g.to===u&&f.push({direction:"in",type:g.type,neighborId:g.from,neighbor:t.records.get(g.from)?.name??g.from,resolution:g.resolution,confidence:g.confidence});return f},[t,e.selected]);function i(u){const f=t.clusterOfNode.get(u)??u,g=t.ancestors.get(f);if(g)for(const p of g){const d=t.byKey.get(p);d&&d.children.length>0&&!e.expanded.has(p)&&e.toggleExpand(p)}e.select(u),e.setFocusTarget(u)}const c=_.useMemo(()=>[ze.accessor("direction",{header:"dir"}),ze.accessor("type",{header:"type"}),ze.accessor("neighbor",{header:"neighbor"}),ze.accessor("resolution",{header:"resolution"}),ze.accessor("confidence",{header:"conf"})],[]),l=Bn({data:r,columns:c,state:{sorting:n},onSortingChange:o,getCoreRowModel:$n(),getSortedRowModel:On()});if(!s)return y.jsx(tn,{children:y.jsx("div",{style:{opacity:.6,fontSize:13},children:"Click a star to inspect it. Click a cluster (galaxy / directory / file) to expand or collapse it."})});const a=s.semanticSummary!==null&&s.summaryOfHash!==null&&s.contentHash!==null&&s.summaryOfHash!==s.contentHash;return y.jsxs(tn,{children:[y.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:8,flexWrap:"wrap"},children:[y.jsx("strong",{style:{fontSize:15},children:s.name||s.id}),s.kind&&y.jsx(tt,{children:s.kind}),s.language&&y.jsx(tt,{children:s.language}),s.role&&y.jsx(tt,{children:s.role})]}),s.qualifiedName&&s.qualifiedName!==s.name&&y.jsx("div",{style:{fontSize:12,opacity:.7},children:s.qualifiedName}),s.filePath&&y.jsxs("div",{style:{fontSize:12,opacity:.85,marginTop:4},children:[s.filePath,s.startLine?`:${s.startLine}-${s.endLine}`:""]}),y.jsx(Ni,{}),y.jsx(ji,{}),y.jsx(Mi,{rec:s,repoRoot:t.repoRoot}),y.jsx(dt,{title:"Semantic summary",children:y.jsx(Ti,{summary:s.semanticSummary,stale:a})}),y.jsx(dt,{title:`Incident edges (${r.length})`,children:r.length===0?y.jsx("div",{style:{fontSize:12,opacity:.55},children:"No relationship edges."}):y.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[y.jsx("thead",{children:l.getHeaderGroups().map(u=>y.jsx("tr",{children:u.headers.map(f=>y.jsxs("th",{onClick:f.column.getToggleSortingHandler(),style:{textAlign:"left",cursor:"pointer",borderBottom:"1px solid rgba(120,150,210,0.3)",padding:"3px 4px",userSelect:"none"},children:[vt(f.column.columnDef.header,f.getContext()),{asc:" ▲",desc:" ▼"}[f.column.getIsSorted()]??""]},f.id))},u.id))}),y.jsx("tbody",{children:l.getRowModel().rows.map(u=>y.jsx("tr",{onClick:()=>i(u.original.neighborId),style:{cursor:"pointer"},children:u.getVisibleCells().map(f=>y.jsx("td",{style:{padding:"3px 4px",borderBottom:"1px solid rgba(120,150,210,0.12)"},children:vt(f.column.columnDef.cell,f.getContext())},f.id))},u.id))})]})})]})}function Mi({rec:e,repoRoot:t}){const[n,o]=_.useState(null),[s,r]=_.useState("idle"),i=!Ue()&&!!e.filePath&&e.startLine>0;if(_.useEffect(()=>{if(!i){o(null),r("idle");return}let l=!1;r("loading"),o(null);const a=e.endLine>=e.startLine?e.endLine:e.startLine;return ki(e.filePath,e.startLine,a).then(u=>{l||(u&&u.lines.length>0?(o(u),r("idle")):r("missing"))}),()=>{l=!0}},[e.id,e.filePath,e.startLine,e.endLine,i]),!i)return null;const c=t&&e.filePath?`vscode://file/${t.replace(/\/+$/,"")}/${e.filePath}:${e.startLine||1}`:null;return y.jsxs(dt,{title:"Source",children:[c&&y.jsx("a",{href:c,style:{fontSize:11,color:B.teal,textDecoration:"none",display:"inline-block",marginBottom:6},title:"Open this file at this line in VS Code",children:"Open in editor ↗"}),s==="loading"&&y.jsx("div",{style:{fontSize:11,opacity:.5},children:"Loading source…"}),s==="missing"&&y.jsx("div",{style:{fontSize:11,opacity:.5},children:"Source unavailable."}),n&&y.jsx("pre",{style:{margin:0,maxHeight:220,overflow:"auto",background:"rgba(0,0,0,0.35)",border:"1px solid rgba(120,150,210,0.18)",borderRadius:6,padding:"6px 8px",fontSize:11,lineHeight:1.45,fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",color:"rgba(220,228,245,0.78)",opacity:.92},children:n.lines.map((l,a)=>{const u=n.start+a;return y.jsxs("div",{style:{display:"flex",whiteSpace:"pre"},children:[y.jsx("span",{style:{display:"inline-block",width:40,flexShrink:0,textAlign:"right",paddingRight:10,color:"rgba(120,140,180,0.5)",userSelect:"none"},children:u}),y.jsx("span",{style:{flex:1},children:l||" "})]},u)})})]})}function Ni(){const e=Z(),t=e.focus!==null,n=e.focus?.nodes.size??0,o=e.focusDepth,s=B.teal;return y.jsxs("div",{style:{marginTop:10},children:[y.jsx("button",{onClick:()=>e.toggleFocus(),title:"Isolate this symbol's N-hop neighborhood (in + out edges) and frame it",style:{width:"100%",padding:"5px 0",borderRadius:6,background:t?`${s}33`:"rgba(255,255,255,0.05)",border:`1px solid ${t?s:"rgba(255,255,255,0.14)"}`,color:t?"#a9f0e6":"rgba(255,255,255,0.75)",cursor:"pointer",fontSize:12,fontWeight:t?600:400},children:t?"Focus ON — click to clear":"Focus neighborhood"}),y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:6,fontSize:11,opacity:t?1:.7},children:[y.jsx("span",{style:{opacity:.7},children:"Depth"}),Array.from({length:pn-rt+1},(r,i)=>{const c=rt+i,l=o===c;return y.jsx("button",{onClick:()=>e.setFocusDepth(c),style:{width:24,height:22,borderRadius:5,background:l?`${s}33`:"rgba(255,255,255,0.05)",border:`1px solid ${l?s:"rgba(255,255,255,0.14)"}`,color:l?"#a9f0e6":"rgba(255,255,255,0.6)",cursor:"pointer",fontSize:11,fontWeight:l?700:400},children:c},c)}),t&&y.jsxs("span",{style:{marginLeft:"auto",color:"#a9f0e6"},children:[n," node",n===1?"":"s"]})]})]})}function ji(){const e=Z(),t=e.impact!==null,n=e.impact?.impacted.size??0,o=e.impact?.coveringTests.size??0;return y.jsxs("div",{style:{marginTop:10},children:[y.jsx("button",{onClick:()=>e.toggleImpact(),title:"Highlight transitive callers (reverse CALLS) and covering tests",style:{width:"100%",padding:"5px 0",borderRadius:6,background:t?"rgba(255,107,82,0.22)":"rgba(255,255,255,0.05)",border:`1px solid ${t?"#ff6b52":"rgba(255,255,255,0.14)"}`,color:t?"#ffb9ab":"rgba(255,255,255,0.75)",cursor:"pointer",fontSize:12,fontWeight:t?600:400},children:t?"Impact ON — click to clear":"Impact"}),t&&y.jsxs("div",{style:{display:"flex",gap:8,marginTop:6,fontSize:11},children:[y.jsxs("span",{style:{color:"#ff8a73"},children:["● ",n," impacted"]}),y.jsxs("span",{style:{color:"#74ff8e"},children:["● ",o," covering test",o===1?"":"s"]})]})]})}function Ti({summary:e,stale:t}){if(!e)return y.jsx("div",{style:{fontSize:12,opacity:.55},children:"No summary yet — agents write these as they explore."});const n=e.split(/\n\n+/);function o(s){return s.split(/`([^`]+)`/).map((i,c)=>c%2===1?y.jsx("code",{style:{background:"rgba(255,255,255,0.1)",borderRadius:3,padding:"0 3px",fontFamily:"monospace"},children:i},c):i)}return y.jsxs("div",{children:[t&&y.jsx("span",{style:{display:"inline-block",background:"#ffb454",color:"#000",borderRadius:10,padding:"1px 7px",fontSize:10,fontWeight:700,marginBottom:4},children:"⚠ STALE"}),n.map((s,r)=>y.jsx("p",{style:{margin:"4px 0",fontSize:13,lineHeight:1.5},children:o(s)},r))]})}function tn({children:e}){return y.jsx("div",{style:{position:"absolute",top:12,right:12,width:360,maxHeight:"calc(100vh - 24px)",overflowY:"auto",padding:14,borderRadius:8,background:"rgba(8,11,22,0.92)",border:"1px solid rgba(90,120,180,0.35)",backdropFilter:"blur(4px)"},children:e})}function dt({title:e,children:t}){return y.jsxs("div",{style:{marginTop:12},children:[y.jsx("div",{style:{fontSize:11,textTransform:"uppercase",letterSpacing:.6,opacity:.6},children:e}),y.jsx("div",{style:{marginTop:4},children:t})]})}function tt({children:e}){return y.jsx("span",{style:{fontSize:11,padding:"1px 6px",borderRadius:999,background:"rgba(90,120,180,0.25)",border:"1px solid rgba(120,150,210,0.4)"},children:e})}const Ai=[{key:"function",label:"Function",color:"#e5c07b"},{key:"class",label:"Class",color:"#56b6c2"},{key:"interface",label:"Interface",color:"#c678dd"},{key:"enum",label:"Enum",color:"#98c379"},{key:"variable",label:"Variable",color:"#abb2bf"}],Ii=["CALLS","IMPORTS","INHERITS","IMPLEMENTS","INSTANTIATES"];function zi(){const e=Z(),[t,n]=_.useState(!0),{filters:o,audit:s}=e,r=o.kinds.size>0||o.edgeTypes.size>0||o.minConfidence>0||s!=="off";return y.jsxs("div",{style:{position:"fixed",bottom:12,right:12,background:"rgba(20,22,28,0.88)",borderRadius:8,border:"1px solid rgba(255,255,255,0.08)",backdropFilter:"blur(8px)",color:"#fff",fontSize:12,width:240,zIndex:20},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 10px",borderBottom:t?"1px solid rgba(255,255,255,0.07)":"none",cursor:"pointer",userSelect:"none"},onClick:()=>n(i=>!i),children:[y.jsxs("span",{style:{fontWeight:600,fontSize:11,letterSpacing:1,opacity:.8},children:["FILTERS ",r?"●":""]}),y.jsx("span",{style:{opacity:.5},children:t?"▲":"▼"})]}),t&&y.jsxs("div",{style:{padding:"8px 10px"},children:[y.jsx("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:"NODE KIND"}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:Ai.map(({key:i,label:c,color:l})=>{const a=o.kinds.has(i);return y.jsx("button",{onClick:()=>e.setKindFilter(i,!a),style:{background:a?"rgba(255,255,255,0.05)":l+"33",border:`1px solid ${a?"rgba(255,255,255,0.1)":l+"88"}`,color:a?"rgba(255,255,255,0.3)":l,borderRadius:12,padding:"2px 8px",cursor:"pointer",fontSize:11,transition:"all 0.15s"},children:c},i)})}),y.jsx("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:"EDGE TYPE"}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:Ii.map(i=>{const c=o.edgeTypes.has(i);return y.jsx("button",{onClick:()=>e.setEdgeTypeFilter(i,!c),style:{background:c?"rgba(255,255,255,0.05)":"rgba(255,255,255,0.1)",border:`1px solid ${c?"rgba(255,255,255,0.1)":"rgba(255,255,255,0.25)"}`,color:c?"rgba(255,255,255,0.25)":"rgba(255,255,255,0.8)",borderRadius:12,padding:"2px 8px",cursor:"pointer",fontSize:11,transition:"all 0.15s"},children:i},i)})}),y.jsxs("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:["CONFIDENCE AUDIT ",s!=="off"?"● ON":""]}),y.jsxs("div",{style:{display:"flex",gap:4,marginBottom:4},children:[y.jsx(nn,{label:"Ambiguous only",hint:"Show ONLY ambiguous (guessed) edges; hide everything else",on:s==="ambiguous",onClick:()=>e.setAudit(s==="ambiguous"?"off":"ambiguous")}),y.jsx(nn,{label:"+ name_match",hint:"Also include name_match edges (still low-confidence)",on:s==="ambiguous+name",onClick:()=>e.setAudit(s==="ambiguous+name"?"off":"ambiguous+name")})]}),s!=="off"&&y.jsx("div",{style:{fontSize:10,lineHeight:1.4,color:"#ffb454",marginBottom:8},children:"Showing only low-confidence edges — where the resolver is guessing."}),y.jsxs("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:["MIN CONFIDENCE: ",o.minConfidence.toFixed(2)]}),y.jsx("input",{type:"range",min:0,max:1,step:.05,value:o.minConfidence,onChange:i=>e.setMinConfidence(parseFloat(i.target.value)),style:{width:"100%",marginBottom:8,accentColor:"#61afef"}}),y.jsxs("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:["EDGE BUNDLING: ",e.bundleBeta.toFixed(2)]}),y.jsx("input",{type:"range",min:0,max:1,step:.05,value:e.bundleBeta,onChange:i=>e.setBundleBeta(parseFloat(i.target.value)),style:{width:"100%",marginBottom:8,accentColor:"#61afef"}}),y.jsx("div",{style:{fontSize:10,opacity:.5,margin:"4px 0"},children:"OVERLAYS"}),y.jsx(Ci,{}),r&&y.jsx("button",{onClick:()=>e.clearFilters(),style:{width:"100%",padding:"4px 0",borderRadius:4,background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.1)",color:"rgba(255,255,255,0.6)",cursor:"pointer",fontSize:11},children:"Reset filters"})]})]})}function Ci(){const e=Z(),t=e.coupling,n=e.cochange!==null,o=t&&n&&Object.keys(e.cochange).length===0;return y.jsxs("div",{style:{marginBottom:8},children:[y.jsx("button",{onClick:()=>e.toggleCoupling(),title:"Draw git co-change links between files that change together (dashed magenta)",style:{width:"100%",padding:"4px 0",borderRadius:6,background:t?"rgba(255,61,240,0.18)":"rgba(255,255,255,0.05)",border:`1px solid ${t?"#ff3df0":"rgba(255,255,255,0.12)"}`,color:t?"#ffb6f7":"rgba(255,255,255,0.65)",cursor:"pointer",fontSize:11,fontWeight:t?600:400},children:t?"Coupling ON":"Coupling (co-change)"}),t&&!n&&y.jsx("div",{style:{fontSize:10,opacity:.5,marginTop:4},children:"Loading temporal data…"}),o&&y.jsx("div",{style:{fontSize:10,color:"#ffb454",marginTop:4,lineHeight:1.4},children:"No temporal data (git history unavailable for this repo)."})]})}function nn({label:e,hint:t,on:n,onClick:o}){return y.jsx("button",{onClick:o,title:t,style:{flex:1,background:n?"rgba(255,180,84,0.22)":"rgba(255,255,255,0.05)",border:`1px solid ${n?"#ffb454":"rgba(255,255,255,0.12)"}`,color:n?"#ffd9a0":"rgba(255,255,255,0.65)",borderRadius:6,padding:"3px 6px",cursor:"pointer",fontSize:10,fontWeight:n?600:400},children:e})}const Ri={name:10,qualifiedName:6,filePath:3,semanticSummary:1.5},Ki=["name","qualifiedName","filePath","semanticSummary"];function Li(e,t){if(!t)return 0;const n=t.toLowerCase();if(n===e)return 1;if(n.startsWith(e))return .7;const o=n.indexOf(e);if(o<0)return 0;const s=o===0?"":n[o-1];return o===0||!/[a-z0-9]/.test(s)?.5:.25}function Fi(e,t){switch(t){case"name":return e.name;case"qualifiedName":return e.qualifiedName;case"filePath":return e.filePath;case"semanticSummary":return e.semanticSummary??""}}function Pi(e){return e.toLowerCase().split(/\s+/).map(t=>t.trim()).filter(t=>t.length>0)}function Bi(e,t,n=10){const o=Pi(t);if(o.length===0)return[];const s=[];for(const r of e){let i=0,c=-1,l="name",a=!0;for(const u of o){let f=0,g="name";for(const p of Ki){const d=Li(u,Fi(r,p));if(d===0)continue;const b=d*Ri[p];b>f&&(f=b,g=p)}if(f===0){a=!1;break}i+=f,f>c&&(c=f,l=g)}a&&s.push({rec:r,score:i,topField:l})}return s.sort((r,i)=>i.score!==r.score?i.score-r.score:r.rec.name!==i.rec.name?r.rec.name<i.rec.name?-1:1:r.rec.id<i.rec.id?-1:r.rec.id>i.rec.id?1:0),s.slice(0,n)}function Di(e){switch(e){case"name":return"name";case"qualifiedName":return"qualified name";case"filePath":return"path";case"semanticSummary":return"summary"}}function Oi(){const e=Z(),[t,n]=_.useState(""),[o,s]=_.useState(!1),r=_.useRef(null),i=e.model,c=qn.useMemo(()=>!i||t.trim().length<2?[]:Bi(i.records.values(),t,10),[i,t]);_.useEffect(()=>{s(c.length>0)},[c]);function l(u){if(!i)return;const f=i.clusterOfNode.get(u)??u,g=i.ancestors.get(f);if(g)for(const p of g){const d=i.byKey.get(p);d&&d.children.length>0&&!e.expanded.has(p)&&e.toggleExpand(p)}e.select(u),e.setFocusTarget(u),n(""),s(!1)}function a(u){u.key==="Escape"&&(n(""),s(!1)),u.key==="Enter"&&c.length>0&&l(c[0].rec.id)}return i?y.jsx("div",{style:{position:"relative",marginTop:8,zIndex:25},children:y.jsxs("div",{style:{position:"relative"},children:[y.jsx("input",{ref:r,id:"reposkein-search",type:"text",placeholder:"Search nodes… ( / )",value:t,onChange:u=>n(u.target.value),onKeyDown:a,style:{background:"rgba(20,22,28,0.88)",border:"1px solid rgba(255,255,255,0.12)",borderRadius:6,color:"#fff",padding:"5px 10px",fontSize:12,width:220,backdropFilter:"blur(8px)",outline:"none"}}),o&&c.length>0&&y.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:2,background:"rgba(20,22,28,0.95)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,overflow:"hidden",backdropFilter:"blur(8px)",maxHeight:280,overflowY:"auto"},children:c.map(({rec:u,topField:f})=>y.jsxs("div",{onClick:()=>l(u.id),style:{padding:"6px 10px",cursor:"pointer",fontSize:12,borderBottom:"1px solid rgba(255,255,255,0.05)",transition:"background 0.1s"},onMouseEnter:g=>g.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:g=>g.currentTarget.style.background="transparent",children:[y.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:6},children:[y.jsx("span",{style:{color:"#fff",fontWeight:500},children:u.name}),y.jsx("span",{style:{color:"rgba(150,180,230,0.7)",fontSize:9,flexShrink:0,textTransform:"uppercase",letterSpacing:.4},children:Di(f)})]}),y.jsx("div",{style:{color:"rgba(255,255,255,0.4)",fontSize:10,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.filePath})]},u.id))})]})}):null}function $i(){const[e,t]=_.useState(!0),n=Z(),o=_.useMemo(()=>n.model?Yr(n.model):[],[n.model]);return y.jsxs("div",{style:{position:"fixed",bottom:12,left:12,background:"rgba(20,22,28,0.88)",borderRadius:8,border:"1px solid rgba(255,255,255,0.08)",backdropFilter:"blur(8px)",color:"#fff",fontSize:11,width:180,zIndex:20},children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 10px",borderBottom:e?"1px solid rgba(255,255,255,0.07)":"none",cursor:"pointer",userSelect:"none"},onClick:()=>t(s=>!s),children:[y.jsx("span",{style:{fontWeight:600,fontSize:11,letterSpacing:1,opacity:.8},children:"LEGEND"}),y.jsx("span",{style:{opacity:.5},children:e?"▲":"▼"})]}),e&&y.jsxs("div",{style:{padding:"8px 10px"},children:[y.jsx("div",{style:{fontSize:10,opacity:.5,marginBottom:4},children:"NODE KIND"}),zr.map(({kind:s,color:r,label:i})=>y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},children:[y.jsx("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",background:r,flexShrink:0}}),y.jsx("span",{style:{color:"rgba(255,255,255,0.75)"},children:i})]},s)),y.jsx("div",{style:{fontSize:10,opacity:.5,marginTop:8,marginBottom:4},children:"EDGE TYPE"}),Ir.map(({type:s,color:r,label:i})=>y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},children:[y.jsx("span",{style:{display:"inline-block",width:18,height:2,background:r,flexShrink:0,borderRadius:1}}),y.jsx("span",{style:{color:"rgba(255,255,255,0.75)"},children:i})]},s)),o.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("div",{style:{fontSize:10,opacity:.5,marginTop:8,marginBottom:4},children:"LANGUAGES"}),o.map(s=>y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},title:"Galaxy / nebula halos are tinted by their dominant language",children:[y.jsx("span",{style:{display:"inline-block",width:10,height:10,borderRadius:"50%",background:zn(s),flexShrink:0}}),y.jsx("span",{style:{color:"rgba(255,255,255,0.75)"},children:vr[s]??s})]},s))]}),y.jsx("div",{style:{marginTop:8,fontSize:10,opacity:.45,lineHeight:1.4,borderTop:"1px solid rgba(255,255,255,0.07)",paddingTop:6},children:"Edge opacity = confidence · halo tint = language"})]})]})}function qi(){const e=Z();return y.jsxs("div",{style:{position:"fixed",top:12,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:4,background:"rgba(20,22,28,0.88)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:8,padding:"4px 6px",backdropFilter:"blur(8px)",zIndex:25},children:[y.jsx("span",{style:{fontSize:10,letterSpacing:1,opacity:.5,color:"#fff",padding:"0 4px"},children:"LENS"}),wo.map(t=>{const n=fn[t],o=e.lens===t;return y.jsx("button",{onClick:()=>e.setLens(t),title:n.hint,style:{background:o?"rgba(97,175,239,0.28)":"rgba(255,255,255,0.04)",border:`1px solid ${o?"#61afef":"rgba(255,255,255,0.12)"}`,color:o?"#cfe6ff":"rgba(255,255,255,0.7)",borderRadius:6,padding:"3px 10px",cursor:"pointer",fontSize:11,fontWeight:o?600:400,whiteSpace:"nowrap",transition:"all 0.12s"},children:n.label},t)})]})}function Hi(e){let t=1/0,n=-1/0,o=1/0,s=-1/0;const r=Math.floor(e.length/3);for(let i=0;i<r;i++){const c=e[i*3],l=e[i*3+1];c<t&&(t=c),c>n&&(n=c),l<o&&(o=l),l>s&&(s=l)}return Number.isFinite(t)?{minX:t,maxX:n,minY:o,maxY:s}:{minX:0,maxX:0,minY:0,maxY:0}}function Gi(e,t,n,o=6){const s=Math.max(e.maxX-e.minX,1e-6),r=Math.max(e.maxY-e.minY,1e-6),i=Math.max(t-o*2,1),c=Math.max(n-o*2,1),l=Math.min(i/s,c/r),a=(e.minX+e.maxX)/2,u=(e.minY+e.maxY)/2,f=t/2-a*l,g=n/2-u*l;return{bounds:e,scale:l,offsetX:f,offsetY:g,width:t,height:n}}function on(e,t,n){const o=t*e.scale+e.offsetX,s=e.height-(n*e.scale+e.offsetY);return{px:o,py:s}}function Wi(e,t,n){const o=(t-e.offsetX)/e.scale,s=(e.height-n-e.offsetY)/e.scale;return{x:o,y:s}}const Ce=160,Re=120;function Ui(){const t=Z().model,n=_.useRef(null),[o,s]=_.useState(!0),r=_.useMemo(()=>{if(!t)return null;const c=Hi(t.positions),l=Gi(c,Ce,Re),a=Math.floor(t.positions.length/3),u=new Float32Array(a*2);for(let f=0;f<a;f++){const{px:g,py:p}=on(l,t.positions[f*3],t.positions[f*3+1]);u[f*2]=g,u[f*2+1]=p}return{proj:l,pts:u,n:a}},[t]);if(_.useEffect(()=>{if(!o||!r)return;const c=n.current;if(!c)return;const l=Math.min(window.devicePixelRatio||1,2);c.width=Ce*l,c.height=Re*l;const a=c.getContext("2d");if(!a)return;let u=0;const{proj:f,pts:g,n:p}=r,d=()=>{a.setTransform(l,0,0,l,0,0),a.clearRect(0,0,Ce,Re),a.fillStyle="rgba(120,170,220,0.45)";for(let x=0;x<p;x++)a.fillRect(g[x*2]-.5,g[x*2+1]-.5,1.4,1.4);const b=Jt();if(b){const{px:x,py:h}=on(f,b.x,b.y);a.strokeStyle=B.amber,a.lineWidth=1.2,a.beginPath(),a.arc(x,h,5,0,Math.PI*2),a.stroke(),a.beginPath(),a.moveTo(x-8,h),a.lineTo(x+8,h),a.moveTo(x,h-8),a.lineTo(x,h+8),a.strokeStyle=`${B.amber}99`,a.stroke()}u=requestAnimationFrame(d)};return u=requestAnimationFrame(d),()=>cancelAnimationFrame(u)},[o,r]),!t)return null;const i=c=>{if(!r)return;const l=c.currentTarget.getBoundingClientRect(),a=(c.clientX-l.left)/l.width*Ce,u=(c.clientY-l.top)/l.height*Re,{x:f,y:g}=Wi(r.proj,a,u),p=Jt();yi(f,g,p?p.z:0)};return y.jsxs("div",{style:{position:"absolute",left:12,bottom:12,background:"rgba(8,11,22,0.78)",border:"1px solid rgba(90,120,180,0.30)",borderRadius:8,padding:6,userSelect:"none"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:10,letterSpacing:.4,opacity:.6,marginBottom:o?4:0,gap:8},children:[y.jsx("span",{children:"OVERVIEW"}),y.jsx("button",{onClick:()=>s(c=>!c),title:o?"Hide minimap":"Show minimap",style:{border:"none",background:"transparent",color:"rgba(180,200,230,0.7)",cursor:"pointer",fontSize:11,padding:0,lineHeight:1},children:o?"▾ hide":"▸ show"})]}),o&&y.jsx("canvas",{ref:n,onClick:i,title:"Click to recenter the view here",style:{display:"block",width:Ce,height:Re,cursor:"crosshair",borderRadius:4}})]})}const Yi=new Set(["INHERITS","IMPLEMENTS"]),Xi=3;function Vi(e){const t=new Map,n=o=>{const s=t.get(o);if(s!==void 0)return s;const r=e.byKey.get(o);if(!r||r.children.length===0)return t.set(o,0),0;let i=0;for(const c of r.children)i+=1+n(c);return t.set(o,i),i};for(const o of e.byKey.keys())n(o);return t}function Zi(e,t){let n=0,o=0;const s=i=>{const c=e.byKey.get(i);if(c){c.kind==="file"?n++:c.kind==="symbol"&&o++;for(const l of c.children)s(l)}},r=e.byKey.get(t);if(r)for(const i of r.children)s(i);return{files:n,symbols:o}}function Oe(e,t,n){return[...e].sort((o,s)=>{const r=t(o),i=t(s);if(r!==i)return i-r;const c=n(o),l=n(s);return c<l?-1:c>l?1:0})}function sn(e){const t=e.byKey.get(e.rootKey);if(!t)return[];let n=t.children;if(n.length===1){const s=e.byKey.get(n[0]);s&&s.kind==="dir"&&s.children.length>0&&(n=s.children)}const o=[];for(const s of n){const r=e.byKey.get(s);r&&r.children.length>0&&o.push(r)}return o}function Qi(e){const t=new Map,n=(o,s)=>{let r=t.get(o);r||(r={in:0,out:0},t.set(o,r)),r[s]++};for(const o of e.drawEdges)n(o.from,"out"),n(o.to,"in");return t}function nt(e,t){return e.records.get(t)?.name||t}function me(e,t){return`${e} ${t}${e===1?"":"s"}`}function Ji(e){const t=[],n=sn(e).length;t.push({id:"overview",kind:"overview",targetKey:e.rootKey,expandKeys:[],expandDepth:0,lens:"all",focusNodeId:null,collapsePrevious:!0,caption:{title:e.repoId,body:`${me(e.counts.nodes,"node")} · ${me(e.counts.edges,"edge")} · ${me(n,"module")}`}});const o=Vi(e),s=Oe(sn(e),d=>o.get(d.key)??0,d=>d.key).slice(0,Xi);for(const d of s){const{files:b,symbols:x}=Zi(e,d.key);t.push({id:`module:${d.key}`,kind:"module",targetKey:d.key,expandKeys:[d.key],expandDepth:1,lens:"imports",focusNodeId:null,collapsePrevious:!0,caption:{title:d.name,body:`${me(b,"file")}, ${me(x,"symbol")}`}})}const r=Qi(e),i=[...r.entries()].map(([d,b])=>({id:d,total:b.in+b.out,in:b.in})),l=Oe(i,d=>d.total,d=>d.id)[0];l&&l.total>0&&t.push({id:`hub:${l.id}`,kind:"node",targetKey:l.id,expandKeys:[],expandDepth:0,lens:"calls",focusNodeId:l.id,collapsePrevious:!0,caption:{title:nt(e,l.id),body:`called from ${me(l.in,"place")}`}});const a=new Map;for(const d of e.drawEdges)Yi.has(d.type)&&(a.set(d.from,(a.get(d.from)??0)+1),a.set(d.to,(a.get(d.to)??0)+1));const u=[...a.entries()].filter(([d])=>{const b=e.records.get(d)?.kind;return b==="Class"||b==="Interface"}).map(([d,b])=>({id:d,count:b})),f=Oe(u,d=>d.count,d=>d.id)[0];if(f&&f.count>0){const d=e.records.get(f.id)?.kind??"Type";t.push({id:`type:${f.id}`,kind:"node",targetKey:f.id,expandKeys:[],expandDepth:0,lens:"types",focusNodeId:f.id,collapsePrevious:!0,caption:{title:nt(e,f.id),body:`${d} · ${me(f.count,"type link")}`}})}const g=[...r.entries()].filter(([d])=>e.records.get(d)?.kind==="Function"&&d!==l?.id).map(([d,b])=>({id:d,out:b.out})),p=Oe(g,d=>d.out,d=>d.id)[0];return p&&p.out>0&&t.push({id:`entry:${p.id}`,kind:"node",targetKey:p.id,expandKeys:[],expandDepth:0,lens:"calls",focusNodeId:p.id,collapsePrevious:!0,caption:{title:nt(e,p.id),body:`calls out to ${me(p.out,"place")}`}}),t}function ec(e,t,n){const o=t.collapsePrevious?new Set([e.rootKey]):new Set(n),s=[],r=i=>{o.has(i)||(o.add(i),s.push(i))};if(t.kind==="module")for(const i of t.expandKeys){const c=e.byKey.get(i);c&&c.children.length>0&&r(i)}else if(t.focusNodeId)for(const i of Pe(e,t.focusNodeId))r(i);return s}const tc=5500;function nc(){const e=Z(),t=e.model,n=e.tour,o=_.useMemo(()=>t?Ji(t):[],[t]),[s,r]=_.useState(0),[i,c]=_.useState(!0),[l,a]=_.useState(!1),u=_.useCallback(x=>{if(t){x.collapsePrevious&&e.resetExpansion(),e.setLens(x.lens);for(const h of ec(t,x,e.expanded))e.toggleExpand(h);x.focusNodeId?(e.select(x.focusNodeId),e.toggleFocus()):e.select(null),e.setFocusTarget(x.targetKey)}},[t,e]),f=_.useCallback(x=>{if(o.length===0)return;const h=Math.max(0,Math.min(o.length-1,x));r(h),u(o[h])},[o,u]),g=_.useRef(!1);if(_.useEffect(()=>{n&&!g.current&&(r(0),c(!0),o.length>0&&u(o[0])),g.current=n},[n,o,u]),_.useEffect(()=>{if(!n)return;a(!1);const x=setTimeout(()=>a(!0),60);return()=>clearTimeout(x)},[s,n]),_.useEffect(()=>{if(!n||!i)return;const x=setTimeout(()=>{s<o.length-1?f(s+1):c(!1)},tc);return()=>clearTimeout(x)},[n,i,s,o.length,f]),_.useEffect(()=>{if(!n)return;const x=h=>{h.key==="Escape"&&(h.stopImmediatePropagation(),e.exitTour())};return window.addEventListener("keydown",x,!0),()=>window.removeEventListener("keydown",x,!0)},[n,e]),!t||o.length===0)return null;if(!n)return y.jsx("button",{onClick:()=>e.startTour(),title:"Take a guided cinematic tour of the constellation",style:{padding:"2px 10px",fontSize:11,borderRadius:5,border:`1px solid ${B.teal}66`,background:`${B.teal}1f`,color:B.cream,cursor:"pointer",letterSpacing:.3},children:"▶ Tour"});const p=o[s],d=s===0,b=s===o.length-1;return y.jsxs(y.Fragment,{children:[y.jsx("div",{style:{position:"fixed",bottom:88,left:"50%",transform:`translateX(-50%) translateY(${l?0:8}px)`,width:"min(520px, calc(100vw - 48px))",opacity:l?1:0,transition:"opacity 0.45s ease, transform 0.45s ease",pointerEvents:"none",zIndex:40,textAlign:"center"},children:y.jsxs("div",{style:{display:"inline-block",maxWidth:"100%",padding:"14px 22px",borderRadius:12,background:"rgba(8,11,22,0.86)",border:`1px solid ${B.amber}44`,boxShadow:`0 8px 32px rgba(0,0,0,0.5), 0 0 28px ${B.amber}1a`,backdropFilter:"blur(10px)"},children:[y.jsxs("div",{style:{fontSize:10,letterSpacing:2,textTransform:"uppercase",color:B.teal,opacity:.85,marginBottom:6},children:["Guided tour · stop ",s+1," / ",o.length]}),y.jsx("div",{style:{fontSize:19,fontWeight:600,color:B.cream,letterSpacing:.3,wordBreak:"break-word"},children:p.caption.title}),y.jsx("div",{style:{fontSize:13,color:"rgba(200,210,235,0.82)",marginTop:4},children:p.caption.body})]})}),y.jsxs("div",{style:{position:"fixed",bottom:26,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:999,background:"rgba(8,11,22,0.9)",border:"1px solid rgba(90,120,180,0.35)",backdropFilter:"blur(10px)",zIndex:41},children:[y.jsx($e,{label:"⟨ Prev",disabled:d,onClick:()=>f(s-1)}),y.jsx($e,{label:i?"❚❚ Pause":"▶ Play",primary:!0,onClick:()=>c(x=>!x)}),y.jsx($e,{label:"Next ⟩",disabled:b,onClick:()=>{c(!1),f(s+1)}}),y.jsx("div",{style:{display:"flex",gap:4,margin:"0 6px"},children:o.map((x,h)=>y.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h===s?B.amber:"rgba(255,255,255,0.25)",transition:"background 0.3s"}},x.id))}),y.jsx($e,{label:"✕ Exit",onClick:()=>e.exitTour()})]})]})}function $e({label:e,onClick:t,disabled:n,primary:o}){return y.jsx("button",{onClick:t,disabled:n,style:{padding:"4px 12px",fontSize:12,borderRadius:999,border:`1px solid ${o?B.amber+"88":"rgba(255,255,255,0.18)"}`,background:o?`${B.amber}26`:"rgba(255,255,255,0.05)",color:n?"rgba(255,255,255,0.3)":o?B.cream:"rgba(230,235,245,0.85)",cursor:n?"default":"pointer",letterSpacing:.3,whiteSpace:"nowrap"},children:e})}function oc(e,t){const n=new Set;for(const o of e)o.from===t&&o.to!==t?n.add(o.to):o.to===t&&o.from!==t&&n.add(o.from);return[...n].sort()}function sc(e,t,n,o){const s=oc(e,t);if(s.length===0)return null;const r=t,i=s.indexOf(r),c=s.length;return n==="next"?s[i===-1?0:(i+1)%c]:s[i===-1?c-1:(i-1+c)%c]}function rc(e){return`reposkein-${(e??"repo").replace(/[^a-zA-Z0-9._-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80)||"repo"}.png`}let pt=null;function ic(){pt?.()}function cc({repoId:e}){const{gl:t,scene:n,camera:o}=rn();return _.useEffect(()=>(pt=()=>{try{t.render(n,o)}catch{}const s=t.domElement,r=rc(e),i=(c,l)=>{const a=document.createElement("a");a.href=c,a.download=r,document.body.appendChild(a),a.click(),a.remove(),l&&setTimeout(()=>URL.revokeObjectURL(c),1e3)};try{typeof s.toBlob=="function"?s.toBlob(c=>{c?i(URL.createObjectURL(c),!0):i(s.toDataURL("image/png"),!1)},"image/png"):i(s.toDataURL("image/png"),!1)}catch{}},()=>{pt=null}),[t,n,o,e]),null}function ac(){return y.jsx(xr,{children:y.jsx(lc,{})})}function lc(){const e=Z(),t=Hn({from:"/"}),n=Gn({from:"/"}),o=t.node;return _.useEffect(()=>{const s=r=>{const i=r.target,c=i&&(i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable);if(e.tour)return;if(r.key==="Escape"){c||e.collapseLevel();return}if(c)return;if(r.key==="/"){r.preventDefault(),document.getElementById("reposkein-search")?.focus();return}if(r.key==="f"||r.key==="F"){r.preventDefault(),e.resetView();return}const l=e.model;if(!l||!e.selected)return;let a=null;if(r.key==="ArrowRight"||r.key==="ArrowDown"?a="next":r.key==="ArrowLeft"||r.key==="ArrowUp"?a="prev":r.key==="Tab"&&(a=r.shiftKey?"prev":"next"),!a)return;r.preventDefault();const u=sc(l.drawEdges,e.selected,a);if(u){for(const f of Pe(l,u))e.expanded.has(f)||e.toggleExpand(f);e.select(u),e.setFocusTarget(u)}};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e]),_.useEffect(()=>{if(!e.model||!o)return;const s=e.model,r=o;if(s.records.has(r)){for(const i of Pe(s,r))e.expanded.has(i)||e.toggleExpand(i);e.select(r),e.setFocusTarget(r)}},[e.model,o]),_.useEffect(()=>{if(!e.coupling||e.cochange!==null)return;let s=!1;return vi().then(r=>{s||e.setCochange(r)}),()=>{s=!0}},[e.coupling,e.cochange]),_.useEffect(()=>{n({search:e.selected?{node:e.selected}:{},replace:!0})},[e.selected]),y.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[y.jsx("div",{style:{position:"absolute",inset:0,background:"radial-gradient(ellipse 80% 60% at 50% 38%, #16204a 0%, #0a1024 42%, #05060c 78%, #02030a 100%)",pointerEvents:"none"}}),y.jsxs(no,{camera:{position:[0,0,160],fov:55,near:.1,far:6e3},gl:{antialias:!0,preserveDrawingBuffer:!0},style:{background:"transparent"},onPointerMissed:s=>{s.button===0&&e.collapseLevel()},children:[y.jsx("fogExp2",{attach:"fog",args:[461330,.0016]}),y.jsx("ambientLight",{intensity:.6}),y.jsx(oo,{radius:600,depth:120,count:2600,factor:6,saturation:0,fade:!0,speed:.6}),e.status.kind==="ready"&&e.model&&y.jsxs(y.Fragment,{children:[y.jsx(Vr,{}),y.jsx(ei,{}),y.jsx(qr,{}),y.jsx(ii,{}),y.jsx(pi,{}),y.jsx(_i,{}),y.jsx(gi,{})]}),y.jsx(bi,{}),y.jsx(cc,{repoId:e.model?.repoId}),y.jsx(so,{children:y.jsx(ro,{luminanceThreshold:.2,luminanceSmoothing:.4,intensity:.9,mipmapBlur:!0})})]}),y.jsx(uc,{}),e.status.kind==="ready"&&e.model&&y.jsx(fc,{}),e.status.kind==="ready"&&y.jsx(Ei,{}),e.status.kind==="ready"&&y.jsx(qi,{}),e.status.kind==="ready"&&y.jsx(zi,{}),e.status.kind==="ready"&&y.jsx($i,{}),e.status.kind==="ready"&&e.model&&y.jsx(Ui,{}),y.jsx(dc,{}),e.status.kind==="error"&&y.jsx(pc,{text:`Error: ${e.status.message}`,error:!0})]})}function uc(){const e=Z(),t=e.model?.counts;return y.jsxs("div",{style:{position:"absolute",top:12,left:12,fontSize:13,padding:"8px 12px",borderRadius:8,background:"rgba(8,11,22,0.85)",border:"1px solid rgba(90,120,180,0.35)"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[y.jsx("span",{style:{fontWeight:600,color:B.amber},children:"RepoSkein Constellation"}),e.model&&y.jsx("button",{onClick:()=>e.resetView(),title:"Frame all — collapse to top level",style:{marginLeft:8,padding:"2px 10px",fontSize:11,borderRadius:5,border:`1px solid ${B.amber}66`,background:`${B.amber}1f`,color:B.cream,cursor:"pointer",letterSpacing:.3},children:"Frame all"}),e.model&&y.jsx("button",{onClick:()=>ic(),title:"Capture a PNG screenshot of the current view",style:{padding:"2px 10px",fontSize:11,borderRadius:5,border:`1px solid ${B.teal}66`,background:`${B.teal}1f`,color:B.cream,cursor:"pointer",letterSpacing:.3},children:"Screenshot"}),e.model&&y.jsx(nc,{})]}),e.model&&y.jsxs("div",{style:{fontSize:11,opacity:.75,marginTop:2},children:[e.model.repoId," · ",t?.nodes??0," nodes · ",t?.edges??0," edges"]}),e.model&&e.edgeStats.total>0&&y.jsxs("div",{style:{fontSize:11,opacity:.6,marginTop:1},title:"Edge bundles currently drawn / total bundles before the render cap",children:["showing ",e.edgeStats.drawn," of ",e.edgeStats.total," connections",e.edgeStats.drawn<e.edgeStats.total?" (capped)":""]}),y.jsx("div",{style:{fontSize:11,opacity:.55,marginTop:2},children:"scroll = zoom · drag = orbit · click cluster = expand · click star = inspect · Esc / click space = back"}),y.jsx("div",{style:{fontSize:11,opacity:.45,marginTop:1},children:"keys: / search · f frame all · ←→ / Tab hop neighbor"}),e.model&&y.jsx(Oi,{})]})}function fc(){const e=Z(),t=e.model;if(!e.selected)return null;const n=t.clusterOfNode.get(e.selected)??e.selected,o=t.ancestors.get(n)??[n],s=o.map(c=>{const l=t.byKey.get(c);return{key:c,label:l?.name??c}}),r=t.records.get(e.selected);r&&!t.byKey.has(e.selected)&&s.push({key:e.selected,label:r.name});function i(c){const l=o.indexOf(c);if(l!==-1){for(const a of Pe(t,c))e.expanded.has(a)||e.toggleExpand(a);for(const a of e.expanded){if(a===t.rootKey)continue;const u=t.ancestors.get(a);if(!u)continue;u.indexOf(c)!==-1&&u.length-1>l&&e.toggleExpand(a)}e.select(c),e.setFocusTarget(c)}}return y.jsx("div",{style:{position:"absolute",top:132,left:12,display:"flex",alignItems:"center",gap:4,fontSize:12,background:"rgba(8,11,22,0.78)",border:"1px solid rgba(90,120,180,0.25)",borderRadius:6,padding:"4px 10px",maxWidth:"calc(100vw - 420px)",overflow:"hidden",flexWrap:"nowrap"},children:s.map((c,l)=>y.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4,minWidth:0},children:[l>0&&y.jsx("span",{style:{opacity:.4,flexShrink:0},children:"›"}),y.jsx("span",{onClick:()=>i(c.key),style:{cursor:l<s.length-1?"pointer":"default",color:l===s.length-1?"#dfe6f5":"rgba(160,180,220,0.7)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:200},title:c.label,children:c.label})]},c.key))})}function dc(){const e=Z(),t=e.status.kind==="loading",n=e.status.kind==="loading"?e.status.phase:"",[o,s]=_.useState(!0),[r,i]=_.useState(!0);return _.useEffect(()=>{if(t){s(!0),i(!0);return}i(!1);const c=setTimeout(()=>s(!1),700);return()=>clearTimeout(c)},[t]),o?y.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:18,pointerEvents:"none",opacity:r?1:0,transition:"opacity 0.7s ease",background:"radial-gradient(ellipse 60% 50% at 50% 50%, rgba(5,6,12,0.55) 0%, rgba(5,6,12,0) 70%)"},children:[y.jsx("style",{children:`@keyframes rs-pulse {
6
+ 0%,100% { transform: scale(0.9); opacity: 0.55; }
7
+ 50% { transform: scale(1.12); opacity: 1; }
8
+ }
9
+ @keyframes rs-spin { to { transform: rotate(360deg); } }`}),y.jsxs("div",{style:{position:"relative",width:64,height:64},children:[y.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",border:`2px solid ${B.teal}55`,borderTopColor:B.amber,animation:"rs-spin 1.6s linear infinite"}}),y.jsx("div",{style:{position:"absolute",inset:18,borderRadius:"50%",background:`radial-gradient(circle, ${B.amber} 0%, ${B.amber}00 70%)`,animation:"rs-pulse 1.8s ease-in-out infinite"}})]}),y.jsxs("div",{style:{textAlign:"center"},children:[y.jsx("div",{style:{fontSize:15,color:B.cream,letterSpacing:.4},children:"Charting the constellation…"}),n&&y.jsx("div",{style:{fontSize:11,color:"rgba(160,180,220,0.6)",marginTop:4},children:n})]})]}):null}function pc({text:e,error:t}){return y.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",color:t?"#ff8a8a":"#cdd6ea",fontSize:15},children:e})}const hc=new Wn,Pn=Un({component:()=>y.jsx(Jn,{})}),gc=Yn({getParentRoute:()=>Pn,path:"/",validateSearch:e=>({node:typeof e.node=="string"?e.node:void 0}),component:ac}),yc=Pn.addChildren([gc]),xc=Xn({routeTree:yc,history:Ue()?Vn():void 0});io.createRoot(document.getElementById("root")).render(y.jsx(_.StrictMode,{children:y.jsx(Zn,{client:hc,children:y.jsx(Qn,{router:xc})})}));