@industry-theme/repository-composition-panels 0.2.43 → 0.2.45

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,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import require$$0, { jsxs, jsx, Fragment } from "react/jsx-runtime";
4
+ import require$$0, { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import React2, { createContext, useContext, forwardRef, createElement, useCallback, useState, useRef, useEffect, useMemo } from "react";
6
6
  import require$$2, { createPortal } from "react-dom";
7
7
  import { GitStatusFileTree, calculateTelemetryCoverageStats, TelemetryCoverageFileTree } from "@principal-ade/dynamic-file-tree";
@@ -28,240 +28,6 @@ var useTheme = () => {
28
28
  }
29
29
  return context;
30
30
  };
31
- class _ {
32
- static buildTreeFromPaths(j, k = "") {
33
- let q2 = k.endsWith("/") ? k.slice(0, -1) : k, E = /* @__PURE__ */ new Map(), J = [], O = [], X2 = /* @__PURE__ */ new Set();
34
- j.forEach((K2) => {
35
- let Q2 = K2.split("/");
36
- for (let W = 1; W < Q2.length; W++) X2.add(Q2.slice(0, W).join("/"));
37
- }), Array.from(X2).forEach((K2) => {
38
- let Q2 = K2.split("/"), W = Q2[Q2.length - 1] || "", Y2 = Q2.length - 1, M = { path: K2, name: W, children: [], fileCount: 0, totalSize: 0, depth: Y2, relativePath: this.calculateRelativePath(K2, q2) };
39
- E.set(K2, M), O.push(M);
40
- }), j.forEach((K2) => {
41
- let Q2 = K2.split("/"), W = Q2[Q2.length - 1] || "", Y2 = this.extractExtension(W), M = Q2.slice(0, -1).join("/"), A2 = { path: K2, name: W, extension: Y2, size: 0, lastModified: /* @__PURE__ */ new Date(), isDirectory: false, relativePath: this.calculateRelativePath(K2, q2) };
42
- J.push(A2);
43
- let H2 = E.get(M);
44
- if (H2 && "children" in H2) H2.children.push(A2), H2.fileCount++;
45
- }), Array.from(X2).sort((K2, Q2) => Q2.length - K2.length).forEach((K2) => {
46
- let Q2 = K2.split("/");
47
- if (Q2.length > 1) {
48
- let W = Q2.slice(0, -1).join("/"), Y2 = E.get(W), M = E.get(K2);
49
- if (Y2 && M && "children" in Y2) Y2.children.push(M);
50
- }
51
- });
52
- let $ = q2 ? q2.split("/").pop() || "root" : "root", Z = [];
53
- return O.forEach((K2) => {
54
- if (K2.path.split("/").length === 1) Z.push(K2);
55
- }), J.forEach((K2) => {
56
- if (K2.path.split("/").length === 1) Z.push(K2);
57
- }), { root: { path: q2 || ".", name: $, children: Z, fileCount: J.length, totalSize: 0, depth: 0, relativePath: "" }, allFiles: J, allDirectories: O };
58
- }
59
- static buildTreeFromFileInfos(j, k = "") {
60
- let q2 = k.endsWith("/") ? k.slice(0, -1) : k, E = /* @__PURE__ */ new Map(), J = [], O = /* @__PURE__ */ new Set();
61
- j.forEach((V2) => {
62
- let K2 = V2.path.split("/");
63
- for (let Q2 = 1; Q2 < K2.length; Q2++) O.add(K2.slice(0, Q2).join("/"));
64
- }), Array.from(O).forEach((V2) => {
65
- let K2 = V2.split("/"), Q2 = K2[K2.length - 1] || "", W = { path: V2, name: Q2, children: [], fileCount: 0, totalSize: 0, depth: K2.length - 1, relativePath: this.calculateRelativePath(V2, q2) };
66
- E.set(V2, W), J.push(W);
67
- }), j.forEach((V2) => {
68
- let Q2 = V2.path.split("/").slice(0, -1).join("/"), W = E.get(Q2);
69
- if (W) W.children.push(V2), W.fileCount++, W.totalSize += V2.size || 0;
70
- }), Array.from(O).sort((V2, K2) => K2.length - V2.length).forEach((V2) => {
71
- let K2 = V2.split("/");
72
- if (K2.length > 1) {
73
- let Q2 = K2.slice(0, -1).join("/"), W = E.get(Q2), Y2 = E.get(V2);
74
- if (W && Y2) W.children.push(Y2), W.fileCount += Y2.fileCount, W.totalSize += Y2.totalSize;
75
- }
76
- });
77
- let X2 = q2 ? q2.split("/").pop() || "root" : "root", $ = [];
78
- return J.forEach((V2) => {
79
- if (V2.path.split("/").length === 1) $.push(V2);
80
- }), j.forEach((V2) => {
81
- if (V2.path.split("/").length === 1) $.push(V2);
82
- }), { root: { path: q2 || ".", name: X2, children: $, fileCount: j.length, totalSize: j.reduce((V2, K2) => V2 + (K2.size || 0), 0), depth: 0, relativePath: "" }, allFiles: j, allDirectories: J };
83
- }
84
- static calculateStats(j, k) {
85
- return { totalFiles: j.length, totalDirectories: k.length, totalSize: j.reduce((q2, E) => q2 + (E.size || 0), 0), maxDepth: this.calculateMaxDepth(k) };
86
- }
87
- static calculateMaxDepth(j) {
88
- if (j.length === 0) return 0;
89
- return Math.max(...j.map((k) => k.depth || 0));
90
- }
91
- static extractExtension(j) {
92
- if (!j.includes(".")) return "";
93
- let k = j.split(".");
94
- return "." + k[k.length - 1].toLowerCase();
95
- }
96
- static calculateRelativePath(j, k) {
97
- if (!k || k === "" || k === ".") return j;
98
- if (j === k) return "";
99
- if (j.startsWith(k)) {
100
- let q2 = j.substring(k.length);
101
- return q2.startsWith("/") ? q2.substring(1) : q2;
102
- }
103
- return j;
104
- }
105
- static hashPaths(j) {
106
- let q2 = [...j].sort().join(`
107
- `), E = 0;
108
- for (let J = 0; J < q2.length; J++) {
109
- let O = q2.charCodeAt(J);
110
- E = (E << 5) - E + O, E = E & E;
111
- }
112
- return `paths-${Math.abs(E).toString(36)}`;
113
- }
114
- static simpleHash(j) {
115
- let k = 0;
116
- for (let q2 = 0; q2 < j.length; q2++) {
117
- let E = j.charCodeAt(q2);
118
- k = (k << 5) - k + E, k = k & k;
119
- }
120
- return Math.abs(k).toString(36);
121
- }
122
- }
123
- class G {
124
- generateTimestampId() {
125
- return Date.now().toString(36);
126
- }
127
- simpleHash(j) {
128
- let k = 0;
129
- for (let q2 = 0; q2 < j.length; q2++) {
130
- let E = j.charCodeAt(q2);
131
- k = (k << 5) - k + E, k = k & k;
132
- }
133
- return Math.abs(k).toString(36);
134
- }
135
- }
136
- class N extends G {
137
- build(j) {
138
- let { files: k, rootPath: q2 = "" } = j, { root: E, allFiles: J, allDirectories: O } = _.buildTreeFromPaths(k, q2), X2 = _.calculateStats(J, O);
139
- return { sha: this.calculateSha(j), metadata: this.generateMetadata(j), root: E, allFiles: J, allDirectories: O, stats: X2 };
140
- }
141
- generateMetadata(j) {
142
- let { files: k, rootPath: q2 = "" } = j, E = this.calculateSha(j);
143
- return { id: `paths-${E}-${this.generateTimestampId()}`, timestamp: /* @__PURE__ */ new Date(), sourceType: "paths", sourceSha: E, sourceInfo: { fileCount: k.length, rootPath: q2 || "." } };
144
- }
145
- calculateSha(j) {
146
- return _.hashPaths(j.files);
147
- }
148
- }
149
- class U {
150
- constructor() {
151
- __publicField(this, "files", /* @__PURE__ */ new Map());
152
- __publicField(this, "binaryFiles", /* @__PURE__ */ new Map());
153
- }
154
- exists(j) {
155
- return this.files.has(j) || this.binaryFiles.has(j) || this.isDirectory(j);
156
- }
157
- readFile(j) {
158
- let k = this.files.get(j);
159
- if (k === void 0) throw new Error(`File not found: ${j}`);
160
- return k;
161
- }
162
- writeFile(j, k) {
163
- let q2 = this.dirname(j);
164
- if (q2 && q2 !== "/" && q2 !== j) this.createDir(q2);
165
- this.files.set(j, k);
166
- }
167
- deleteFile(j) {
168
- this.files.delete(j), this.binaryFiles.delete(j);
169
- }
170
- readBinaryFile(j) {
171
- let k = this.binaryFiles.get(j);
172
- if (k === void 0) throw new Error(`Binary file not found: ${j}`);
173
- return k;
174
- }
175
- writeBinaryFile(j, k) {
176
- let q2 = this.dirname(j);
177
- if (q2 && q2 !== "/" && q2 !== j) this.createDir(q2);
178
- this.binaryFiles.set(j, k);
179
- }
180
- createDir(j) {
181
- if (!j || j === "/") return;
182
- this.files.set(j + "/.dir", "");
183
- }
184
- readDir(j) {
185
- if ((this.files.has(j) || this.binaryFiles.has(j)) && !j.endsWith("/.dir")) throw new Error(`ENOTDIR: not a directory, scandir '${j}'`);
186
- if (!this.isDirectory(j)) throw new Error(`ENOENT: no such file or directory, scandir '${j}'`);
187
- let k = j.endsWith("/") ? j.slice(0, -1) : j, q2 = k === "/" ? "" : `${k}/`, E = /* @__PURE__ */ new Set();
188
- for (let J of this.files.keys()) if (J.startsWith(q2)) {
189
- let O = J.slice(q2.length);
190
- if (O) {
191
- if (O === ".dir") continue;
192
- if (O.endsWith("/.dir")) {
193
- let X2 = O.slice(0, -5).split("/")[0];
194
- if (X2) E.add(X2);
195
- } else {
196
- let X2 = O.split("/")[0];
197
- if (X2 && X2 !== ".dir") E.add(X2);
198
- }
199
- }
200
- }
201
- for (let J of this.binaryFiles.keys()) if (J.startsWith(q2)) {
202
- let O = J.slice(q2.length);
203
- if (O) {
204
- let X2 = O.split("/");
205
- if (X2[0]) E.add(X2[0]);
206
- }
207
- }
208
- return Array.from(E);
209
- }
210
- deleteDir(j) {
211
- let k = `${j}/`;
212
- for (let q2 of this.files.keys()) if (q2.startsWith(k) || q2 === j + "/.dir") this.files.delete(q2);
213
- for (let q2 of this.binaryFiles.keys()) if (q2.startsWith(k)) this.binaryFiles.delete(q2);
214
- }
215
- join(...j) {
216
- return j.join("/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
217
- }
218
- dirname(j) {
219
- let k = j.lastIndexOf("/");
220
- return k <= 0 ? "/" : j.slice(0, k);
221
- }
222
- isAbsolute(j) {
223
- return j.startsWith("/");
224
- }
225
- relative(j, k) {
226
- if (k.startsWith(j)) return k.slice(j.length + 1);
227
- return k;
228
- }
229
- isDirectory(j) {
230
- if (this.files.has(j + "/.dir")) return true;
231
- let k = `${j}/`;
232
- for (let q2 of this.files.keys()) if (q2.startsWith(k)) return true;
233
- for (let q2 of this.binaryFiles.keys()) if (q2.startsWith(k)) return true;
234
- return false;
235
- }
236
- normalizeRepositoryPath(j) {
237
- let k = j;
238
- while (k && k !== "/") {
239
- if (this.exists(this.join(k, ".git"))) return k;
240
- k = this.dirname(k);
241
- }
242
- throw new Error(`Not a git repository: ${j}`);
243
- }
244
- findProjectRoot(j) {
245
- return this.normalizeRepositoryPath(j);
246
- }
247
- getRepositoryName(j) {
248
- let k = j.split("/").filter((q2) => q2);
249
- return k[k.length - 1] || "root";
250
- }
251
- clear() {
252
- this.files.clear(), this.binaryFiles.clear();
253
- }
254
- getFiles() {
255
- return new Map(this.files);
256
- }
257
- setupTestRepo(j) {
258
- this.createDir(j), this.createDir(this.join(j, ".git")), this.createDir(this.join(j, ".alexandria"));
259
- }
260
- debug() {
261
- console.log("InMemory FileSystem Contents:");
262
- for (let [j, k] of this.files.entries()) if (!j.endsWith("/.dir")) console.log(` ${j}: ${k.length} bytes`);
263
- }
264
- }
265
31
  /**
266
32
  * @license lucide-react v0.552.0 - ISC
267
33
  *
@@ -810,56 +576,6 @@ const EMPTY_GIT_STATUS = {
810
576
  untracked: [],
811
577
  deleted: []
812
578
  };
813
- const ToggleButtons = React2.memo(({ showFullTree, onShowFullTree, onShowChanges, theme }) => /* @__PURE__ */ jsxs(
814
- "div",
815
- {
816
- style: {
817
- display: "flex",
818
- alignItems: "stretch",
819
- backgroundColor: theme.colors.backgroundTertiary,
820
- width: "100%",
821
- height: "100%"
822
- },
823
- children: [
824
- /* @__PURE__ */ jsx(
825
- "button",
826
- {
827
- onClick: onShowFullTree,
828
- style: {
829
- flex: 1,
830
- padding: "6px 12px",
831
- fontSize: theme.fontSizes[1],
832
- backgroundColor: showFullTree ? theme.colors.backgroundSecondary : "transparent",
833
- color: showFullTree ? theme.colors.text : theme.colors.textSecondary,
834
- border: "none",
835
- cursor: "pointer",
836
- fontWeight: showFullTree ? 600 : 400,
837
- transition: "all 0.2s"
838
- },
839
- children: "Full Tree"
840
- }
841
- ),
842
- /* @__PURE__ */ jsx(
843
- "button",
844
- {
845
- onClick: onShowChanges,
846
- style: {
847
- flex: 1,
848
- padding: "6px 12px",
849
- fontSize: theme.fontSizes[1],
850
- backgroundColor: !showFullTree ? theme.colors.backgroundSecondary : "transparent",
851
- color: !showFullTree ? theme.colors.text : theme.colors.textSecondary,
852
- border: "none",
853
- cursor: "pointer",
854
- fontWeight: !showFullTree ? 600 : 400,
855
- transition: "all 0.2s"
856
- },
857
- children: "Changes"
858
- }
859
- )
860
- ]
861
- }
862
- ));
863
579
  const GitChangesPanelContent = ({
864
580
  gitStatus,
865
581
  fileTree,
@@ -891,17 +607,10 @@ const GitChangesPanelContent = ({
891
607
  return () => document.removeEventListener("mousedown", handleClickOutside);
892
608
  }
893
609
  }, [contextMenu.visible]);
894
- const hasChanges = useMemo(
610
+ useMemo(
895
611
  () => gitStatus.staged.length > 0 || gitStatus.unstaged.length > 0 || gitStatus.untracked.length > 0 || gitStatus.deleted.length > 0,
896
612
  [gitStatus.staged.length, gitStatus.unstaged.length, gitStatus.untracked.length, gitStatus.deleted.length]
897
613
  );
898
- const [showFullTree, setShowFullTree] = useState(false);
899
- const userHasToggledView = useRef(false);
900
- useEffect(() => {
901
- if (!isLoading && !userHasToggledView.current) {
902
- setShowFullTree(!hasChanges);
903
- }
904
- }, [hasChanges, isLoading]);
905
614
  const getFileStatus = useCallback(
906
615
  (filePath) => {
907
616
  if (gitStatus.staged.includes(filePath)) {
@@ -978,7 +687,7 @@ const GitChangesPanelContent = ({
978
687
  return null;
979
688
  }
980
689
  const expandDirectories = (paths) => {
981
- if (!(fileTree == null ? void 0 : fileTree.allFiles)) return paths;
690
+ if (!fileTree.allFiles) return paths;
982
691
  const expandedPaths = [];
983
692
  for (const path of paths) {
984
693
  const normalizedPath = path.endsWith("/") ? path.slice(0, -1) : path;
@@ -1020,30 +729,8 @@ const GitChangesPanelContent = ({
1020
729
  status: "??"
1021
730
  }))
1022
731
  ];
1023
- if (showFullTree && fileTree) {
1024
- return { tree: fileTree, statusData };
1025
- }
1026
- if (!hasChanges) {
1027
- return null;
1028
- }
1029
- const allChangedFiles = [
1030
- ...gitStatus.staged,
1031
- ...gitStatus.unstaged,
1032
- ...expandedUntracked,
1033
- ...gitStatus.deleted
1034
- ].sort((a2, b) => a2.localeCompare(b));
1035
- const builder = new N();
1036
- const tree = builder.build({ files: allChangedFiles, rootPath: rootPath ?? "" });
1037
- return { tree, statusData };
1038
- }, [isLoading, hasChanges, fileTree, gitStatus, rootPath, showFullTree]);
1039
- const handleShowFullTree = useCallback(() => {
1040
- userHasToggledView.current = true;
1041
- setShowFullTree(true);
1042
- }, []);
1043
- const handleShowChanges = useCallback(() => {
1044
- userHasToggledView.current = true;
1045
- setShowFullTree(false);
1046
- }, []);
732
+ return { tree: fileTree, statusData };
733
+ }, [isLoading, fileTree, gitStatus]);
1047
734
  const renderContent = () => {
1048
735
  if (isLoading) {
1049
736
  return /* @__PURE__ */ jsx(
@@ -1058,7 +745,7 @@ const GitChangesPanelContent = ({
1058
745
  }
1059
746
  );
1060
747
  }
1061
- if (!hasChanges && !showFullTree) {
748
+ if (!gitChangesData) {
1062
749
  return /* @__PURE__ */ jsx(
1063
750
  "div",
1064
751
  {
@@ -1071,9 +758,6 @@ const GitChangesPanelContent = ({
1071
758
  }
1072
759
  );
1073
760
  }
1074
- if (!gitChangesData) {
1075
- return null;
1076
- }
1077
761
  return /* @__PURE__ */ jsx(
1078
762
  GitStatusFileTree,
1079
763
  {
@@ -1086,10 +770,9 @@ const GitChangesPanelContent = ({
1086
770
  transparentBackground: true,
1087
771
  horizontalNodePadding: "16px",
1088
772
  verticalPadding: "16px",
1089
- openByDefault: !showFullTree,
773
+ openByDefault: false,
1090
774
  enableDragAndDrop: false
1091
- },
1092
- showFullTree ? "full-tree" : "changes-only"
775
+ }
1093
776
  );
1094
777
  };
1095
778
  const contextMenuButtonStyle = {
@@ -1106,15 +789,6 @@ const GitChangesPanelContent = ({
1106
789
  textAlign: "left"
1107
790
  };
1108
791
  return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1109
- hasChanges && /* @__PURE__ */ jsx("div", { style: { height: 40, borderBottom: `1px solid ${theme.colors.border}` }, children: /* @__PURE__ */ jsx(
1110
- ToggleButtons,
1111
- {
1112
- showFullTree,
1113
- onShowFullTree: handleShowFullTree,
1114
- onShowChanges: handleShowChanges,
1115
- theme
1116
- }
1117
- ) }),
1118
792
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto" }, children: renderContent() }),
1119
793
  contextMenu.visible && createPortal(
1120
794
  /* @__PURE__ */ jsxs(
@@ -1257,7 +931,7 @@ const GitChangesPanel = ({ context, events }) => {
1257
931
  const gitSlice = context.getSlice("git");
1258
932
  const fileTreeSlice = context.getSlice("fileTree");
1259
933
  const gitStatus = (gitSlice == null ? void 0 : gitSlice.data) ?? EMPTY_GIT_STATUS;
1260
- const fileTree = (fileTreeSlice == null ? void 0 : fileTreeSlice.data) ?? null;
934
+ const fileTree = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
1261
935
  const isLoading = (gitSlice == null ? void 0 : gitSlice.loading) || (fileTreeSlice == null ? void 0 : fileTreeSlice.loading) || false;
1262
936
  const rootPath = context.currentScope.type === "repository" ? (_a = context.currentScope.repository) == null ? void 0 : _a.path : void 0;
1263
937
  const handleFileClick = useCallback(
@@ -1282,6 +956,9 @@ const GitChangesPanel = ({ context, events }) => {
1282
956
  },
1283
957
  [events]
1284
958
  );
959
+ if (!fileTree) {
960
+ return null;
961
+ }
1285
962
  return /* @__PURE__ */ jsx(
1286
963
  GitChangesPanelContent,
1287
964
  {
@@ -5019,23 +4696,23 @@ function requireUmd() {
5019
4696
  return this.firstElementChild;
5020
4697
  }
5021
4698
  var M = Array.prototype.filter;
5022
- function N2() {
4699
+ function N() {
5023
4700
  return Array.from(this.children);
5024
4701
  }
5025
4702
  function k(e2) {
5026
4703
  return new Array(e2.length);
5027
4704
  }
5028
- function _2(e2, t2) {
4705
+ function _(e2, t2) {
5029
4706
  this.ownerDocument = e2.ownerDocument, this.namespaceURI = e2.namespaceURI, this._next = null, this._parent = e2, this.__data__ = t2;
5030
4707
  }
5031
4708
  function P2(e2, t2, n2, o2, r2, i2) {
5032
- for (var a3, s2 = 0, l2 = t2.length, c3 = i2.length; s2 < c3; ++s2) (a3 = t2[s2]) ? (a3.__data__ = i2[s2], o2[s2] = a3) : n2[s2] = new _2(e2, i2[s2]);
4709
+ for (var a3, s2 = 0, l2 = t2.length, c3 = i2.length; s2 < c3; ++s2) (a3 = t2[s2]) ? (a3.__data__ = i2[s2], o2[s2] = a3) : n2[s2] = new _(e2, i2[s2]);
5033
4710
  for (; s2 < l2; ++s2) (a3 = t2[s2]) && (r2[s2] = a3);
5034
4711
  }
5035
4712
  function z(e2, t2, n2, o2, r2, i2, a3) {
5036
4713
  var s2, l2, c3, u2 = /* @__PURE__ */ new Map(), d2 = t2.length, h2 = i2.length, f2 = new Array(d2);
5037
4714
  for (s2 = 0; s2 < d2; ++s2) (l2 = t2[s2]) && (f2[s2] = c3 = a3.call(l2, l2.__data__, s2, t2) + "", u2.has(c3) ? r2[s2] = l2 : u2.set(c3, l2));
5038
- for (s2 = 0; s2 < h2; ++s2) c3 = a3.call(e2, i2[s2], s2, i2) + "", (l2 = u2.get(c3)) ? (o2[s2] = l2, l2.__data__ = i2[s2], u2.delete(c3)) : n2[s2] = new _2(e2, i2[s2]);
4715
+ for (s2 = 0; s2 < h2; ++s2) c3 = a3.call(e2, i2[s2], s2, i2) + "", (l2 = u2.get(c3)) ? (o2[s2] = l2, l2.__data__ = i2[s2], u2.delete(c3)) : n2[s2] = new _(e2, i2[s2]);
5039
4716
  for (s2 = 0; s2 < d2; ++s2) (l2 = t2[s2]) && u2.get(f2[s2]) === l2 && (r2[s2] = l2);
5040
4717
  }
5041
4718
  function I(e2) {
@@ -5120,17 +4797,17 @@ function requireUmd() {
5120
4797
  function K2(e2) {
5121
4798
  return e2.trim().split(/^|\s+/);
5122
4799
  }
5123
- function G2(e2) {
4800
+ function G(e2) {
5124
4801
  return e2.classList || new q2(e2);
5125
4802
  }
5126
4803
  function q2(e2) {
5127
4804
  this._node = e2, this._names = K2(e2.getAttribute("class") || "");
5128
4805
  }
5129
4806
  function U2(e2, t2) {
5130
- for (var n2 = G2(e2), o2 = -1, r2 = t2.length; ++o2 < r2; ) n2.add(t2[o2]);
4807
+ for (var n2 = G(e2), o2 = -1, r2 = t2.length; ++o2 < r2; ) n2.add(t2[o2]);
5131
4808
  }
5132
4809
  function Q2(e2, t2) {
5133
- for (var n2 = G2(e2), o2 = -1, r2 = t2.length; ++o2 < r2; ) n2.remove(t2[o2]);
4810
+ for (var n2 = G(e2), o2 = -1, r2 = t2.length; ++o2 < r2; ) n2.remove(t2[o2]);
5134
4811
  }
5135
4812
  function J(e2) {
5136
4813
  return function() {
@@ -5232,7 +4909,7 @@ function requireUmd() {
5232
4909
  return me(this, e2, t2.apply(this, arguments));
5233
4910
  };
5234
4911
  }
5235
- _2.prototype = { constructor: _2, appendChild: function(e2) {
4912
+ _.prototype = { constructor: _, appendChild: function(e2) {
5236
4913
  return this._parent.insertBefore(e2, this._next);
5237
4914
  }, insertBefore: function(e2, t2) {
5238
4915
  return this._parent.insertBefore(e2, t2);
@@ -5291,7 +4968,7 @@ function requireUmd() {
5291
4968
  };
5292
4969
  })("function" == typeof e2 ? e2 : S(e2)));
5293
4970
  }, selectChildren: function(e2) {
5294
- return this.selectAll(null == e2 ? N2 : /* @__PURE__ */ (function(e3) {
4971
+ return this.selectAll(null == e2 ? N : /* @__PURE__ */ (function(e3) {
5295
4972
  return function() {
5296
4973
  return M.call(this.children, e3);
5297
4974
  };
@@ -5375,7 +5052,7 @@ function requireUmd() {
5375
5052
  }, classed: function(e2, t2) {
5376
5053
  var n2 = K2(e2 + "");
5377
5054
  if (arguments.length < 2) {
5378
- for (var o2 = G2(this.node()), r2 = -1, i2 = n2.length; ++r2 < i2; ) if (!o2.contains(n2[r2])) return false;
5055
+ for (var o2 = G(this.node()), r2 = -1, i2 = n2.length; ++r2 < i2; ) if (!o2.contains(n2[r2])) return false;
5379
5056
  return true;
5380
5057
  }
5381
5058
  return this.each(("function" == typeof t2 ? te2 : t2 ? J : ee)(n2, t2));
@@ -6289,7 +5966,7 @@ function requireUmd() {
6289
5966
  function no() {
6290
5967
  var e2, t2, n2, o2 = qn, r2 = Un, i2 = to2, s2 = Jn2, l2 = eo, c3 = [0, 1 / 0], u2 = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], d2 = 250, h2 = Bt2, f2 = a2("start", "zoom", "end"), g2 = 500, p2 = 150, m3 = 0, y3 = 10;
6291
5968
  function v2(e3) {
6292
- e3.property("__zoom", Qn2).on("wheel.zoom", M2, { passive: false }).on("mousedown.zoom", N3).on("dblclick.zoom", k2).filter(l2).on("touchstart.zoom", _3).on("touchmove.zoom", P3).on("touchend.zoom touchcancel.zoom", z2).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
5969
+ e3.property("__zoom", Qn2).on("wheel.zoom", M2, { passive: false }).on("mousedown.zoom", N2).on("dblclick.zoom", k2).filter(l2).on("touchstart.zoom", _2).on("touchmove.zoom", P3).on("touchend.zoom touchcancel.zoom", z2).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
6293
5970
  }
6294
5971
  function x3(e3, t3) {
6295
5972
  return (t3 = Math.max(c3[0], Math.min(c3[1], t3))) === e3.k ? e3 : new Yn2(t3, e3.x, e3.y);
@@ -6337,7 +6014,7 @@ function requireUmd() {
6337
6014
  }), p2), n3.zoom("mouse", i2(w2(x3(r3, a3), n3.mouse[0], n3.mouse[1]), n3.extent, u2));
6338
6015
  }
6339
6016
  }
6340
- function N3(e3, ...t3) {
6017
+ function N2(e3, ...t3) {
6341
6018
  if (!n2 && o2.apply(this, arguments)) {
6342
6019
  var r3 = e3.currentTarget, a3 = C3(this, t3, true).event(e3), s3 = Se(e3.view).on("mousemove.zoom", (function(e4) {
6343
6020
  if (Gn2(e4), !a3.moved) {
@@ -6357,7 +6034,7 @@ function requireUmd() {
6357
6034
  Gn2(e3), d2 > 0 ? Se(this).transition().duration(d2).call(S2, c4, a3, e3) : Se(this).call(v2.transform, c4, a3, e3);
6358
6035
  }
6359
6036
  }
6360
- function _3(n3, ...r3) {
6037
+ function _2(n3, ...r3) {
6361
6038
  if (o2.apply(this, arguments)) {
6362
6039
  var i3, a3, s3, l3, c4 = n3.touches, u3 = c4.length, d3 = C3(this, r3, n3.changedTouches.length === u3).event(n3);
6363
6040
  for (Kn2(n3), a3 = 0; a3 < u3; ++a3) l3 = [l3 = Ce2(s3 = c4[a3], this), this.__zoom.invert(l3), s3.identifier], d3.touch0 ? d3.touch1 || d3.touch0[2] === l3[2] || (d3.touch1 = l3, d3.taps = 0) : (d3.touch0 = l3, i3 = true, d3.taps = 1 + !!e2);
@@ -7023,8 +6700,8 @@ function requireUmd() {
7023
6700
  return v2;
7024
6701
  }
7025
6702
  const Jr2 = { onPointerDown: function(t2, { connectionMode: n2, connectionRadius: o2, handleId: r2, nodeId: i2, edgeUpdaterType: a3, isTarget: s2, domNode: l2, nodeLookup: c3, lib: u2, autoPanOnConnect: d2, flowId: h2, panBy: f2, cancelConnection: g2, onConnectStart: p2, onConnect: m3, onConnectEnd: y3, isValidConnection: v2 = Ur, onReconnectEnd: x3, updateConnection: w2, getTransform: b2, getFromHandle: S2, autoPanSpeed: C3, dragThreshold: E2 = 1, handleDomNode: M2 }) {
7026
- const N3 = nr2(t2.target);
7027
- let k2, _3 = 0;
6703
+ const N2 = nr2(t2.target);
6704
+ let k2, _2 = 0;
7028
6705
  const { x: P3, y: z2 } = ar(t2), I2 = qr2(a3, M2), O2 = l2 == null ? void 0 : l2.getBoundingClientRect();
7029
6706
  let A3 = false;
7030
6707
  if (!O2 || !I2) return;
@@ -7034,7 +6711,7 @@ function requireUmd() {
7034
6711
  function B2() {
7035
6712
  if (!d2 || !O2) return;
7036
6713
  const [e2, t3] = Oo(R3, O2, C3);
7037
- f2({ x: e2, y: t3 }), _3 = requestAnimationFrame(B2);
6714
+ f2({ x: e2, y: t3 }), _2 = requestAnimationFrame(B2);
7038
6715
  }
7039
6716
  const j2 = { ...D3, nodeId: i2, type: I2, position: D3.position }, H3 = c3.get(i2);
7040
6717
  let Z2 = { inProgress: true, isValid: null, from: Cr(H3, j2, e.Position.Left, true), fromHandle: j2, fromPosition: j2.position, fromNode: H3, to: R3, toHandle: null, toPosition: po[j2.position], toNode: null, pointer: R3 };
@@ -7050,7 +6727,7 @@ function requireUmd() {
7050
6727
  if (!S2() || !j2) return void F3(t3);
7051
6728
  const a4 = b2();
7052
6729
  R3 = ar(t3, O2), k2 = Kr2(Xo(R3, a4, false, [1, 1]), o2, c3, j2), L2 || (B2(), L2 = true);
7053
- const l3 = Qr(t3, { handle: k2, connectionMode: n2, fromNodeId: i2, fromHandleId: r2, fromType: s2 ? "target" : "source", isValidConnection: v2, doc: N3, lib: u2, flowId: h2, nodeLookup: c3 });
6730
+ const l3 = Qr(t3, { handle: k2, connectionMode: n2, fromNodeId: i2, fromHandleId: r2, fromType: s2 ? "target" : "source", isValidConnection: v2, doc: N2, lib: u2, flowId: h2, nodeLookup: c3 });
7054
6731
  V3 = l3.handleDomNode, $2 = l3.connection, T3 = (function(e2, t4) {
7055
6732
  let n3 = null;
7056
6733
  return t4 ? n3 = true : e2 && !t4 && (n3 = false), n3;
@@ -7065,10 +6742,10 @@ function requireUmd() {
7065
6742
  const { inProgress: t3, ...n3 } = Z2, o3 = { ...n3, toPosition: Z2.toHandle ? Z2.toPosition : null };
7066
6743
  y3 == null ? void 0 : y3(e2, o3), a3 && (x3 == null ? void 0 : x3(e2, o3));
7067
6744
  }
7068
- g2(), cancelAnimationFrame(_3), L2 = false, T3 = false, $2 = null, V3 = null, N3.removeEventListener("mousemove", Y3), N3.removeEventListener("mouseup", F3), N3.removeEventListener("touchmove", Y3), N3.removeEventListener("touchend", F3);
6745
+ g2(), cancelAnimationFrame(_2), L2 = false, T3 = false, $2 = null, V3 = null, N2.removeEventListener("mousemove", Y3), N2.removeEventListener("mouseup", F3), N2.removeEventListener("touchmove", Y3), N2.removeEventListener("touchend", F3);
7069
6746
  }
7070
6747
  }
7071
- 0 === E2 && X3(), N3.addEventListener("mousemove", Y3), N3.addEventListener("mouseup", F3), N3.addEventListener("touchmove", Y3), N3.addEventListener("touchend", F3);
6748
+ 0 === E2 && X3(), N2.addEventListener("mousemove", Y3), N2.addEventListener("mouseup", F3), N2.addEventListener("touchmove", Y3), N2.addEventListener("touchend", F3);
7072
6749
  }, isValid: Qr };
7073
6750
  const ei = (e2) => ({ x: e2.x, y: e2.y, zoom: e2.k }), ti = ({ x: e2, y: t2, zoom: n2 }) => Fn.translate(e2, t2).scale(n2), ni = (e2, t2) => e2.target.closest(`.${t2}`), oi2 = (e2, t2) => 2 === t2 && Array.isArray(e2) && e2.includes(2), ri = (e2) => ((e2 *= 2) <= 1 ? e2 * e2 * e2 : (e2 -= 2) * e2 * e2 + 2) / 2, ii2 = (e2, t2 = 0, n2 = ri, o2 = (() => {
7074
6751
  })) => {
@@ -7094,10 +6771,10 @@ function requireUmd() {
7094
6771
  const o3 = ti(e2), r3 = h2 == null ? void 0 : h2.constrain()(o3, t3, n3);
7095
6772
  return r3 && await m3(r3), new Promise(((e3) => e3(r3)));
7096
6773
  }
7097
- return h2.wheelDelta(ai2), { update: function({ noWheelClassName: t3, noPanClassName: n3, onPaneContextMenu: o3, userSelectionActive: r3, panOnScroll: i3, panOnDrag: d3, panOnScrollMode: m4, panOnScrollSpeed: v3, preventScrolling: x3, zoomOnPinch: w2, zoomOnScroll: b2, zoomOnDoubleClick: S2, zoomActivationKeyPressed: C3, lib: E2, onTransformChange: M2, connectionInProgress: N3, paneClickDistance: k2, selectionOnDrag: _3 }) {
6774
+ return h2.wheelDelta(ai2), { update: function({ noWheelClassName: t3, noPanClassName: n3, onPaneContextMenu: o3, userSelectionActive: r3, panOnScroll: i3, panOnDrag: d3, panOnScrollMode: m4, panOnScrollSpeed: v3, preventScrolling: x3, zoomOnPinch: w2, zoomOnScroll: b2, zoomOnDoubleClick: S2, zoomActivationKeyPressed: C3, lib: E2, onTransformChange: M2, connectionInProgress: N2, paneClickDistance: k2, selectionOnDrag: _2 }) {
7098
6775
  r3 && !u2.isZoomingOrPanning && y3();
7099
6776
  const P3 = i3 && !C3 && !r3;
7100
- h2.clickDistance(_3 ? 1 / 0 : !jo2(k2) || k2 < 0 ? 0 : k2);
6777
+ h2.clickDistance(_2 ? 1 / 0 : !jo2(k2) || k2 < 0 ? 0 : k2);
7101
6778
  const z2 = P3 ? (function({ zoomPanValues: t4, noWheelClassName: n4, d3Selection: o4, d3Zoom: r4, panOnScrollMode: i4, panOnScrollSpeed: a4, zoomOnPinch: s3, onPanZoomStart: l3, onPanZoom: c4, onPanZoomEnd: u3 }) {
7102
6779
  return (d4) => {
7103
6780
  if (ni(d4, n4)) return d4.ctrlKey && d4.preventDefault(), false;
@@ -7170,7 +6847,7 @@ function requireUmd() {
7170
6847
  const p3 = Array.isArray(o4) && o4.includes(d4.button) || !d4.button || d4.button <= 1;
7171
6848
  return (!d4.ctrlKey || g3) && p3;
7172
6849
  };
7173
- })({ zoomActivationKeyPressed: C3, panOnDrag: d3, zoomOnScroll: b2, panOnScroll: i3, zoomOnDoubleClick: S2, zoomOnPinch: w2, userSelectionActive: r3, noPanClassName: n3, noWheelClassName: t3, lib: E2, connectionInProgress: N3 });
6850
+ })({ zoomActivationKeyPressed: C3, panOnDrag: d3, zoomOnScroll: b2, panOnScroll: i3, zoomOnDoubleClick: S2, zoomOnPinch: w2, userSelectionActive: r3, noPanClassName: n3, noWheelClassName: t3, lib: E2, connectionInProgress: N2 });
7174
6851
  h2.filter(I2), S2 ? f2.on("dblclick.zoom", p2) : f2.on("dblclick.zoom", null);
7175
6852
  }, destroy: y3, setViewport: async function(e2, t3) {
7176
6853
  const n3 = ti(e2);
@@ -7246,37 +6923,37 @@ function requireUmd() {
7246
6923
  })).on("drag", ((e4) => {
7247
6924
  const { transform: t3, snapGrid: r3, snapToGrid: i3, nodeOrigin: s3 } = n2(), l3 = er(e4.sourceEvent, { transform: t3, snapGrid: r3, snapToGrid: i3, containerBounds: w2 }), c4 = [];
7248
6925
  if (!g2) return;
7249
- const { x: u3, y: h3, width: C4, height: E2 } = p2, M2 = {}, N3 = g2.origin ?? s3, { width: k2, height: _3, x: P3, y: z2 } = (function(e5, t4, n3, o3, r4, i4, a4, s4) {
6926
+ const { x: u3, y: h3, width: C4, height: E2 } = p2, M2 = {}, N2 = g2.origin ?? s3, { width: k2, height: _2, x: P3, y: z2 } = (function(e5, t4, n3, o3, r4, i4, a4, s4) {
7250
6927
  let { affectsX: l4, affectsY: c5 } = t4;
7251
6928
  const { isHorizontal: u4, isVertical: d3 } = t4, h4 = u4 && d3, { xSnapped: f3, ySnapped: g3 } = n3, { minWidth: p3, maxWidth: m4, minHeight: y4, maxHeight: v3 } = o3, { x: x4, y: w3, width: b3, height: S3, aspectRatio: C5 } = e5;
7252
6929
  let E3 = Math.floor(u4 ? f3 - e5.pointerX : 0), M3 = Math.floor(d3 ? g3 - e5.pointerY : 0);
7253
- const N4 = b3 + (l4 ? -E3 : E3), k3 = S3 + (c5 ? -M3 : M3), _4 = -i4[0] * b3, P4 = -i4[1] * S3;
7254
- let z3 = gi(N4, p3, m4), I3 = gi(k3, y4, v3);
6930
+ const N3 = b3 + (l4 ? -E3 : E3), k3 = S3 + (c5 ? -M3 : M3), _3 = -i4[0] * b3, P4 = -i4[1] * S3;
6931
+ let z3 = gi(N3, p3, m4), I3 = gi(k3, y4, v3);
7255
6932
  if (a4) {
7256
6933
  let e6 = 0, t5 = 0;
7257
- l4 && E3 < 0 ? e6 = hi(x4 + E3 + _4, a4[0][0]) : !l4 && E3 > 0 && (e6 = fi(x4 + N4 + _4, a4[1][0])), c5 && M3 < 0 ? t5 = hi(w3 + M3 + P4, a4[0][1]) : !c5 && M3 > 0 && (t5 = fi(w3 + k3 + P4, a4[1][1])), z3 = Math.max(z3, e6), I3 = Math.max(I3, t5);
6934
+ l4 && E3 < 0 ? e6 = hi(x4 + E3 + _3, a4[0][0]) : !l4 && E3 > 0 && (e6 = fi(x4 + N3 + _3, a4[1][0])), c5 && M3 < 0 ? t5 = hi(w3 + M3 + P4, a4[0][1]) : !c5 && M3 > 0 && (t5 = fi(w3 + k3 + P4, a4[1][1])), z3 = Math.max(z3, e6), I3 = Math.max(I3, t5);
7258
6935
  }
7259
6936
  if (s4) {
7260
6937
  let e6 = 0, t5 = 0;
7261
- l4 && E3 > 0 ? e6 = fi(x4 + E3, s4[0][0]) : !l4 && E3 < 0 && (e6 = hi(x4 + N4, s4[1][0])), c5 && M3 > 0 ? t5 = fi(w3 + M3, s4[0][1]) : !c5 && M3 < 0 && (t5 = hi(w3 + k3, s4[1][1])), z3 = Math.max(z3, e6), I3 = Math.max(I3, t5);
6938
+ l4 && E3 > 0 ? e6 = fi(x4 + E3, s4[0][0]) : !l4 && E3 < 0 && (e6 = hi(x4 + N3, s4[1][0])), c5 && M3 > 0 ? t5 = fi(w3 + M3, s4[0][1]) : !c5 && M3 < 0 && (t5 = hi(w3 + k3, s4[1][1])), z3 = Math.max(z3, e6), I3 = Math.max(I3, t5);
7262
6939
  }
7263
6940
  if (r4) {
7264
6941
  if (u4) {
7265
- const e6 = gi(N4 / C5, y4, v3) * C5;
6942
+ const e6 = gi(N3 / C5, y4, v3) * C5;
7266
6943
  if (z3 = Math.max(z3, e6), a4) {
7267
6944
  let e7 = 0;
7268
- e7 = !l4 && !c5 || l4 && !c5 && h4 ? fi(w3 + P4 + N4 / C5, a4[1][1]) * C5 : hi(w3 + P4 + (l4 ? E3 : -E3) / C5, a4[0][1]) * C5, z3 = Math.max(z3, e7);
6945
+ e7 = !l4 && !c5 || l4 && !c5 && h4 ? fi(w3 + P4 + N3 / C5, a4[1][1]) * C5 : hi(w3 + P4 + (l4 ? E3 : -E3) / C5, a4[0][1]) * C5, z3 = Math.max(z3, e7);
7269
6946
  }
7270
6947
  if (s4) {
7271
6948
  let e7 = 0;
7272
- e7 = !l4 && !c5 || l4 && !c5 && h4 ? hi(w3 + N4 / C5, s4[1][1]) * C5 : fi(w3 + (l4 ? E3 : -E3) / C5, s4[0][1]) * C5, z3 = Math.max(z3, e7);
6949
+ e7 = !l4 && !c5 || l4 && !c5 && h4 ? hi(w3 + N3 / C5, s4[1][1]) * C5 : fi(w3 + (l4 ? E3 : -E3) / C5, s4[0][1]) * C5, z3 = Math.max(z3, e7);
7273
6950
  }
7274
6951
  }
7275
6952
  if (d3) {
7276
6953
  const e6 = gi(k3 * C5, p3, m4) / C5;
7277
6954
  if (I3 = Math.max(I3, e6), a4) {
7278
6955
  let e7 = 0;
7279
- e7 = !l4 && !c5 || c5 && !l4 && h4 ? fi(x4 + k3 * C5 + _4, a4[1][0]) / C5 : hi(x4 + (c5 ? M3 : -M3) * C5 + _4, a4[0][0]) / C5, I3 = Math.max(I3, e7);
6956
+ e7 = !l4 && !c5 || c5 && !l4 && h4 ? fi(x4 + k3 * C5 + _3, a4[1][0]) / C5 : hi(x4 + (c5 ? M3 : -M3) * C5 + _3, a4[0][0]) / C5, I3 = Math.max(I3, e7);
7280
6957
  }
7281
6958
  if (s4) {
7282
6959
  let e7 = 0;
@@ -7284,19 +6961,19 @@ function requireUmd() {
7284
6961
  }
7285
6962
  }
7286
6963
  }
7287
- M3 += M3 < 0 ? I3 : -I3, E3 += E3 < 0 ? z3 : -z3, r4 && (h4 ? N4 > k3 * C5 ? M3 = (pi(l4, c5) ? -E3 : E3) / C5 : E3 = (pi(l4, c5) ? -M3 : M3) * C5 : u4 ? (M3 = E3 / C5, c5 = l4) : (E3 = M3 * C5, l4 = c5));
6964
+ M3 += M3 < 0 ? I3 : -I3, E3 += E3 < 0 ? z3 : -z3, r4 && (h4 ? N3 > k3 * C5 ? M3 = (pi(l4, c5) ? -E3 : E3) / C5 : E3 = (pi(l4, c5) ? -M3 : M3) * C5 : u4 ? (M3 = E3 / C5, c5 = l4) : (E3 = M3 * C5, l4 = c5));
7288
6965
  const O3 = l4 ? x4 + E3 : x4, A4 = c5 ? w3 + M3 : w3;
7289
6966
  return { width: b3 + (l4 ? -E3 : E3), height: S3 + (c5 ? -M3 : M3), x: i4[0] * E3 * (l4 ? -1 : 1) + O3, y: i4[1] * M3 * (c5 ? -1 : 1) + A4 };
7290
- })(m3, a3.controlDirection, l3, a3.boundaries, a3.keepAspectRatio, N3, v2, x3), I2 = k2 !== C4, O2 = _3 !== E2, A3 = P3 !== u3 && I2, D3 = z2 !== h3 && O2;
6967
+ })(m3, a3.controlDirection, l3, a3.boundaries, a3.keepAspectRatio, N2, v2, x3), I2 = k2 !== C4, O2 = _2 !== E2, A3 = P3 !== u3 && I2, D3 = z2 !== h3 && O2;
7291
6968
  if (!(A3 || D3 || I2 || O2)) return;
7292
- if ((A3 || D3 || 1 === N3[0] || 1 === N3[1]) && (M2.x = A3 ? P3 : p2.x, M2.y = D3 ? z2 : p2.y, p2.x = M2.x, p2.y = M2.y, b2.length > 0)) {
6969
+ if ((A3 || D3 || 1 === N2[0] || 1 === N2[1]) && (M2.x = A3 ? P3 : p2.x, M2.y = D3 ? z2 : p2.y, p2.x = M2.x, p2.y = M2.y, b2.length > 0)) {
7293
6970
  const e5 = P3 - u3, t4 = z2 - h3;
7294
- for (const n3 of b2) n3.position = { x: n3.position.x - e5 + N3[0] * (k2 - C4), y: n3.position.y - t4 + N3[1] * (_3 - E2) }, c4.push(n3);
6971
+ for (const n3 of b2) n3.position = { x: n3.position.x - e5 + N2[0] * (k2 - C4), y: n3.position.y - t4 + N2[1] * (_2 - E2) }, c4.push(n3);
7295
6972
  }
7296
- if ((I2 || O2) && (M2.width = !I2 || a3.resizeDirection && "horizontal" !== a3.resizeDirection ? p2.width : k2, M2.height = !O2 || a3.resizeDirection && "vertical" !== a3.resizeDirection ? p2.height : _3, p2.width = M2.width, p2.height = M2.height), y3 && g2.expandParent) {
7297
- const e5 = N3[0] * (M2.width ?? 0);
6973
+ if ((I2 || O2) && (M2.width = !I2 || a3.resizeDirection && "horizontal" !== a3.resizeDirection ? p2.width : k2, M2.height = !O2 || a3.resizeDirection && "vertical" !== a3.resizeDirection ? p2.height : _2, p2.width = M2.width, p2.height = M2.height), y3 && g2.expandParent) {
6974
+ const e5 = N2[0] * (M2.width ?? 0);
7298
6975
  M2.x && M2.x < e5 && (p2.x = e5, m3.x = m3.x - (M2.x - e5));
7299
- const t4 = N3[1] * (M2.height ?? 0);
6976
+ const t4 = N2[1] * (M2.height ?? 0);
7300
6977
  M2.y && M2.y < t4 && (p2.y = t4, m3.y = m3.y - (M2.y - t4));
7301
6978
  }
7302
6979
  const R3 = (function({ width: e5, prevWidth: t4, height: n3, prevHeight: o3, affectsX: r4, affectsY: i4 }) {
@@ -7800,7 +7477,7 @@ function requireUmd() {
7800
7477
  const Oa = (e2) => e2.selected, Aa = "undefined" != typeof window ? window : void 0;
7801
7478
  const Da = { position: "absolute", width: "100%", height: "100%", top: 0, left: 0 }, Ra = (e2) => ({ userSelectionActive: e2.userSelectionActive, lib: e2.lib, connectionInProgress: e2.connection.inProgress });
7802
7479
  function La({ onPaneContextMenu: o2, zoomOnScroll: r2 = true, zoomOnPinch: i2 = true, panOnScroll: a3 = false, panOnScrollSpeed: s2 = 0.5, panOnScrollMode: l2 = e.PanOnScrollMode.Free, zoomOnDoubleClick: c3 = true, panOnDrag: u2 = true, defaultViewport: d2, translateExtent: h2, minZoom: f2, maxZoom: g2, zoomActivationKeyCode: p2, preventScrolling: m3 = true, children: y3, noWheelClassName: v2, noPanClassName: x3, onViewportChange: w2, isControlledViewport: b2, paneClickDistance: S2, selectionOnDrag: C3 }) {
7803
- const E2 = Ti(), M2 = n.useRef(null), { userSelectionActive: N3, lib: k2, connectionInProgress: _3 } = $i(Ra, qi2), P3 = da(p2), z2 = n.useRef();
7480
+ const E2 = Ti(), M2 = n.useRef(null), { userSelectionActive: N2, lib: k2, connectionInProgress: _2 } = $i(Ra, qi2), P3 = da(p2), z2 = n.useRef();
7804
7481
  !(function(e2) {
7805
7482
  const t2 = Ti();
7806
7483
  n.useEffect((() => {
@@ -7842,8 +7519,8 @@ function requireUmd() {
7842
7519
  }
7843
7520
  }), []), n.useEffect((() => {
7844
7521
  var _a2;
7845
- (_a2 = z2.current) == null ? void 0 : _a2.update({ onPaneContextMenu: o2, zoomOnScroll: r2, zoomOnPinch: i2, panOnScroll: a3, panOnScrollSpeed: s2, panOnScrollMode: l2, zoomOnDoubleClick: c3, panOnDrag: u2, zoomActivationKeyPressed: P3, preventScrolling: m3, noPanClassName: x3, userSelectionActive: N3, noWheelClassName: v2, lib: k2, onTransformChange: I2, connectionInProgress: _3, selectionOnDrag: C3, paneClickDistance: S2 });
7846
- }), [o2, r2, i2, a3, s2, l2, c3, u2, P3, m3, x3, N3, v2, k2, I2, _3, C3, S2]), t.jsx("div", { className: "react-flow__renderer", ref: M2, style: Da, children: y3 });
7522
+ (_a2 = z2.current) == null ? void 0 : _a2.update({ onPaneContextMenu: o2, zoomOnScroll: r2, zoomOnPinch: i2, panOnScroll: a3, panOnScrollSpeed: s2, panOnScrollMode: l2, zoomOnDoubleClick: c3, panOnDrag: u2, zoomActivationKeyPressed: P3, preventScrolling: m3, noPanClassName: x3, userSelectionActive: N2, noWheelClassName: v2, lib: k2, onTransformChange: I2, connectionInProgress: _2, selectionOnDrag: C3, paneClickDistance: S2 });
7523
+ }), [o2, r2, i2, a3, s2, l2, c3, u2, P3, m3, x3, N2, v2, k2, I2, _2, C3, S2]), t.jsx("div", { className: "react-flow__renderer", ref: M2, style: Da, children: y3 });
7847
7524
  }
7848
7525
  const $a = (e2) => ({ userSelectionActive: e2.userSelectionActive, userSelectionRect: e2.userSelectionRect });
7849
7526
  function Ta() {
@@ -7854,36 +7531,36 @@ function requireUmd() {
7854
7531
  n2.target === t2.current && (e2 == null ? void 0 : e2(n2));
7855
7532
  }, Ba = (e2) => ({ userSelectionActive: e2.userSelectionActive, elementsSelectable: e2.elementsSelectable, connectionInProgress: e2.connection.inProgress, dragging: e2.paneDragging });
7856
7533
  function ja({ isSelecting: o2, selectionKeyPressed: i2, selectionMode: a3 = e.SelectionMode.Full, panOnDrag: s2, paneClickDistance: l2, selectionOnDrag: c3, onSelectionStart: u2, onSelectionEnd: d2, onPaneClick: h2, onPaneContextMenu: f2, onPaneScroll: g2, onPaneMouseEnter: p2, onPaneMouseMove: m3, onPaneMouseLeave: y3, children: v2 }) {
7857
- const x3 = Ti(), { userSelectionActive: w2, elementsSelectable: b2, dragging: S2, connectionInProgress: C3 } = $i(Ba, qi2), E2 = b2 && (o2 || w2), M2 = n.useRef(null), N3 = n.useRef(), k2 = n.useRef(/* @__PURE__ */ new Set()), _3 = n.useRef(/* @__PURE__ */ new Set()), P3 = n.useRef(false), z2 = (e2) => {
7534
+ const x3 = Ti(), { userSelectionActive: w2, elementsSelectable: b2, dragging: S2, connectionInProgress: C3 } = $i(Ba, qi2), E2 = b2 && (o2 || w2), M2 = n.useRef(null), N2 = n.useRef(), k2 = n.useRef(/* @__PURE__ */ new Set()), _2 = n.useRef(/* @__PURE__ */ new Set()), P3 = n.useRef(false), z2 = (e2) => {
7858
7535
  P3.current || C3 ? P3.current = false : (h2 == null ? void 0 : h2(e2), x3.getState().resetSelectedElements(), x3.setState({ nodesSelectionActive: false }));
7859
7536
  }, I2 = g2 ? (e2) => g2(e2) : void 0, O2 = true === s2 || Array.isArray(s2) && s2.includes(0);
7860
7537
  return t.jsxs("div", { className: r(["react-flow__pane", { draggable: O2, dragging: S2, selection: o2 }]), onClick: E2 ? void 0 : Va(z2, M2), onContextMenu: Va(((e2) => {
7861
7538
  Array.isArray(s2) && (s2 == null ? void 0 : s2.includes(2)) ? e2.preventDefault() : f2 == null ? void 0 : f2(e2);
7862
7539
  }), M2), onWheel: Va(I2, M2), onPointerEnter: E2 ? void 0 : p2, onPointerMove: E2 ? (t2) => {
7863
7540
  const { userSelectionRect: n2, transform: o3, nodeLookup: r2, edgeLookup: s3, connectionLookup: c4, triggerNodeChanges: d3, triggerEdgeChanges: h3, defaultEdgeOptions: f3, resetSelectedElements: g3 } = x3.getState();
7864
- if (!N3.current || !n2) return;
7865
- const { x: p3, y: m4 } = ar(t2.nativeEvent, N3.current), { startX: y4, startY: v3 } = n2;
7541
+ if (!N2.current || !n2) return;
7542
+ const { x: p3, y: m4 } = ar(t2.nativeEvent, N2.current), { startX: y4, startY: v3 } = n2;
7866
7543
  if (!P3.current) {
7867
7544
  const e2 = i2 ? 0 : l2;
7868
7545
  if (Math.hypot(p3 - y4, m4 - v3) <= e2) return;
7869
7546
  g3(), u2 == null ? void 0 : u2(t2);
7870
7547
  }
7871
7548
  P3.current = true;
7872
- const w3 = { startX: y4, startY: v3, x: p3 < y4 ? p3 : y4, y: m4 < v3 ? m4 : v3, width: Math.abs(p3 - y4), height: Math.abs(m4 - v3) }, b3 = k2.current, S3 = _3.current;
7873
- k2.current = new Set(Eo2(r2, w3, o3, a3 === e.SelectionMode.Partial, true).map(((e2) => e2.id))), _3.current = /* @__PURE__ */ new Set();
7549
+ const w3 = { startX: y4, startY: v3, x: p3 < y4 ? p3 : y4, y: m4 < v3 ? m4 : v3, width: Math.abs(p3 - y4), height: Math.abs(m4 - v3) }, b3 = k2.current, S3 = _2.current;
7550
+ k2.current = new Set(Eo2(r2, w3, o3, a3 === e.SelectionMode.Partial, true).map(((e2) => e2.id))), _2.current = /* @__PURE__ */ new Set();
7874
7551
  const C4 = (f3 == null ? void 0 : f3.selectable) ?? true;
7875
7552
  for (const e2 of k2.current) {
7876
7553
  const t3 = c4.get(e2);
7877
7554
  if (t3) for (const { edgeId: e3 } of t3.values()) {
7878
7555
  const t4 = s3.get(e3);
7879
- t4 && (t4.selectable ?? C4) && _3.current.add(e3);
7556
+ t4 && (t4.selectable ?? C4) && _2.current.add(e3);
7880
7557
  }
7881
7558
  }
7882
7559
  if (!Jo(b3, k2.current)) {
7883
7560
  d3(wa(r2, k2.current, true));
7884
7561
  }
7885
- if (!Jo(S3, _3.current)) {
7886
- h3(wa(s3, _3.current));
7562
+ if (!Jo(S3, _2.current)) {
7563
+ h3(wa(s3, _2.current));
7887
7564
  }
7888
7565
  x3.setState({ userSelectionRect: w3, userSelectionActive: true, nodesSelectionActive: false });
7889
7566
  } : m3, onPointerUp: E2 ? (e2) => {
@@ -7892,11 +7569,11 @@ function requireUmd() {
7892
7569
  } : void 0, onPointerDownCapture: E2 ? (e2) => {
7893
7570
  var _a2, _b;
7894
7571
  const { domNode: t2 } = x3.getState();
7895
- if (N3.current = t2 == null ? void 0 : t2.getBoundingClientRect(), !N3.current) return;
7572
+ if (N2.current = t2 == null ? void 0 : t2.getBoundingClientRect(), !N2.current) return;
7896
7573
  const n2 = e2.target === M2.current;
7897
7574
  if (!n2 && !!e2.target.closest(".nokey") || !o2 || !(c3 && n2 || i2) || 0 !== e2.button || !e2.isPrimary) return;
7898
7575
  (_b = (_a2 = e2.target) == null ? void 0 : _a2.setPointerCapture) == null ? void 0 : _b.call(_a2, e2.pointerId), P3.current = false;
7899
- const { x: r2, y: a4 } = ar(e2.nativeEvent, N3.current);
7576
+ const { x: r2, y: a4 } = ar(e2.nativeEvent, N2.current);
7900
7577
  x3.setState({ userSelectionRect: { width: 0, height: 0, startX: r2, startY: a4, x: r2, y: a4 } }), n2 || (e2.stopPropagation(), e2.preventDefault());
7901
7578
  } : void 0, onClickCapture: E2 ? (e2) => {
7902
7579
  P3.current && (e2.stopPropagation(), P3.current = false);
@@ -7948,7 +7625,7 @@ function requireUmd() {
7948
7625
  const Ka = () => n.useContext(Fa), Ga = (e2) => ({ connectOnClick: e2.connectOnClick, noPanClassName: e2.noPanClassName, rfId: e2.rfId });
7949
7626
  const qa = n.memo(Ma((function({ type: n2 = "source", position: o2 = e.Position.Top, isValidConnection: i2, isConnectable: a3 = true, isConnectableStart: s2 = true, isConnectableEnd: l2 = true, id: c3, onConnect: u2, children: d2, className: h2, onMouseDown: f2, onTouchStart: g2, ...p2 }, m3) {
7950
7627
  var _a2, _b;
7951
- const y3 = c3 || null, v2 = "target" === n2, x3 = Ti(), w2 = Ka(), { connectOnClick: b2, noPanClassName: S2, rfId: C3 } = $i(Ga, qi2), { connectingFrom: E2, connectingTo: M2, clickConnecting: N3, isPossibleEndHandle: k2, connectionInProcess: _3, clickConnectionInProcess: P3, valid: z2 } = $i(/* @__PURE__ */ ((t2, n3, o3) => (r2) => {
7628
+ const y3 = c3 || null, v2 = "target" === n2, x3 = Ti(), w2 = Ka(), { connectOnClick: b2, noPanClassName: S2, rfId: C3 } = $i(Ga, qi2), { connectingFrom: E2, connectingTo: M2, clickConnecting: N2, isPossibleEndHandle: k2, connectionInProcess: _2, clickConnectionInProcess: P3, valid: z2 } = $i(/* @__PURE__ */ ((t2, n3, o3) => (r2) => {
7952
7629
  const { connectionClickStartHandle: i3, connectionMode: a4, connection: s3 } = r2, { fromHandle: l3, toHandle: c4, isValid: u3 } = s3, d3 = (c4 == null ? void 0 : c4.nodeId) === t2 && (c4 == null ? void 0 : c4.id) === n3 && (c4 == null ? void 0 : c4.type) === o3;
7953
7630
  return { connectingFrom: (l3 == null ? void 0 : l3.nodeId) === t2 && (l3 == null ? void 0 : l3.id) === n3 && (l3 == null ? void 0 : l3.type) === o3, connectingTo: d3, clickConnecting: (i3 == null ? void 0 : i3.nodeId) === t2 && (i3 == null ? void 0 : i3.id) === n3 && (i3 == null ? void 0 : i3.type) === o3, isPossibleEndHandle: a4 === e.ConnectionMode.Strict ? (l3 == null ? void 0 : l3.type) !== o3 : t2 !== (l3 == null ? void 0 : l3.nodeId) || n3 !== (l3 == null ? void 0 : l3.id), connectionInProcess: !!l3, clickConnectionInProcess: !!i3, valid: d3 && u3 };
7954
7631
  })(w2, y3, n2), qi2);
@@ -7969,7 +7646,7 @@ function requireUmd() {
7969
7646
  }
7970
7647
  t2 ? f2 == null ? void 0 : f2(e2) : g2 == null ? void 0 : g2(e2);
7971
7648
  };
7972
- return t.jsx("div", { "data-handleid": y3, "data-nodeid": w2, "data-handlepos": o2, "data-id": `${C3}-${w2}-${y3}-${n2}`, className: r(["react-flow__handle", `react-flow__handle-${o2}`, "nodrag", S2, h2, { source: !v2, target: v2, connectable: a3, connectablestart: s2, connectableend: l2, clickconnecting: N3, connectingfrom: E2, connectingto: M2, valid: z2, connectionindicator: a3 && (!_3 || k2) && (_3 || P3 ? l2 : s2) }]), onMouseDown: O2, onTouchStart: O2, onClick: b2 ? (e2) => {
7649
+ return t.jsx("div", { "data-handleid": y3, "data-nodeid": w2, "data-handlepos": o2, "data-id": `${C3}-${w2}-${y3}-${n2}`, className: r(["react-flow__handle", `react-flow__handle-${o2}`, "nodrag", S2, h2, { source: !v2, target: v2, connectable: a3, connectablestart: s2, connectableend: l2, clickconnecting: N2, connectingfrom: E2, connectingto: M2, valid: z2, connectionindicator: a3 && (!_2 || k2) && (_2 || P3 ? l2 : s2) }]), onMouseDown: O2, onTouchStart: O2, onClick: b2 ? (e2) => {
7973
7650
  const { onClickConnectStart: t2, onClickConnectEnd: o3, connectionClickStartHandle: r2, connectionMode: a4, isValidConnection: l3, lib: c4, rfId: u3, nodeLookup: d3, connection: h3 } = x3.getState();
7974
7651
  if (!w2 || !r2 && !s2) return;
7975
7652
  if (!r2) return t2 == null ? void 0 : t2(e2.nativeEvent, { nodeId: w2, handleId: y3, handleType: n2 }), void x3.setState({ connectionClickStartHandle: { nodeId: w2, type: n2, id: y3 } });
@@ -8007,8 +7684,8 @@ function requireUmd() {
8007
7684
  }, style: { width: s2, height: l2 } }) });
8008
7685
  }
8009
7686
  const ts = "undefined" != typeof window ? window : void 0, ns = (e2) => ({ nodesSelectionActive: e2.nodesSelectionActive, userSelectionActive: e2.userSelectionActive });
8010
- function os({ children: e2, onPaneClick: o2, onPaneMouseEnter: r2, onPaneMouseMove: i2, onPaneMouseLeave: a3, onPaneContextMenu: s2, onPaneScroll: l2, paneClickDistance: c3, deleteKeyCode: u2, selectionKeyCode: d2, selectionOnDrag: h2, selectionMode: f2, onSelectionStart: g2, onSelectionEnd: p2, multiSelectionKeyCode: m3, panActivationKeyCode: y3, zoomActivationKeyCode: v2, elementsSelectable: x3, zoomOnScroll: w2, zoomOnPinch: b2, panOnScroll: S2, panOnScrollSpeed: C3, panOnScrollMode: E2, zoomOnDoubleClick: M2, panOnDrag: N3, defaultViewport: k2, translateExtent: _3, minZoom: P3, maxZoom: z2, preventScrolling: I2, onSelectionContextMenu: O2, noWheelClassName: A3, noPanClassName: D3, disableKeyboardA11y: R3, onViewportChange: L2, isControlledViewport: $2 }) {
8011
- const { nodesSelectionActive: T3, userSelectionActive: V3 } = $i(ns, qi2), B2 = da(d2, { target: ts }), j2 = da(y3, { target: ts }), H3 = j2 || N3, Z2 = j2 || S2, X3 = h2 && true !== H3, Y3 = B2 || V3 || X3;
7687
+ function os({ children: e2, onPaneClick: o2, onPaneMouseEnter: r2, onPaneMouseMove: i2, onPaneMouseLeave: a3, onPaneContextMenu: s2, onPaneScroll: l2, paneClickDistance: c3, deleteKeyCode: u2, selectionKeyCode: d2, selectionOnDrag: h2, selectionMode: f2, onSelectionStart: g2, onSelectionEnd: p2, multiSelectionKeyCode: m3, panActivationKeyCode: y3, zoomActivationKeyCode: v2, elementsSelectable: x3, zoomOnScroll: w2, zoomOnPinch: b2, panOnScroll: S2, panOnScrollSpeed: C3, panOnScrollMode: E2, zoomOnDoubleClick: M2, panOnDrag: N2, defaultViewport: k2, translateExtent: _2, minZoom: P3, maxZoom: z2, preventScrolling: I2, onSelectionContextMenu: O2, noWheelClassName: A3, noPanClassName: D3, disableKeyboardA11y: R3, onViewportChange: L2, isControlledViewport: $2 }) {
7688
+ const { nodesSelectionActive: T3, userSelectionActive: V3 } = $i(ns, qi2), B2 = da(d2, { target: ts }), j2 = da(y3, { target: ts }), H3 = j2 || N2, Z2 = j2 || S2, X3 = h2 && true !== H3, Y3 = B2 || V3 || X3;
8012
7689
  return (function({ deleteKeyCode: e3, multiSelectionKeyCode: t2 }) {
8013
7690
  const o3 = Ti(), { deleteElements: r3 } = Ia(), i3 = da(e3, { actInsideInputWithModifier: false }), a4 = da(t2, { target: Aa });
8014
7691
  n.useEffect((() => {
@@ -8019,7 +7696,7 @@ function requireUmd() {
8019
7696
  }), [i3]), n.useEffect((() => {
8020
7697
  o3.setState({ multiSelectionActive: a4 });
8021
7698
  }), [a4]);
8022
- })({ deleteKeyCode: u2, multiSelectionKeyCode: m3 }), t.jsx(La, { onPaneContextMenu: s2, elementsSelectable: x3, zoomOnScroll: w2, zoomOnPinch: b2, panOnScroll: Z2, panOnScrollSpeed: C3, panOnScrollMode: E2, zoomOnDoubleClick: M2, panOnDrag: !B2 && H3, defaultViewport: k2, translateExtent: _3, minZoom: P3, maxZoom: z2, zoomActivationKeyCode: v2, preventScrolling: I2, noWheelClassName: A3, noPanClassName: D3, onViewportChange: L2, isControlledViewport: $2, paneClickDistance: c3, selectionOnDrag: X3, children: t.jsxs(ja, { onSelectionStart: g2, onSelectionEnd: p2, onPaneClick: o2, onPaneMouseEnter: r2, onPaneMouseMove: i2, onPaneMouseLeave: a3, onPaneContextMenu: s2, onPaneScroll: l2, panOnDrag: H3, isSelecting: !!Y3, selectionMode: f2, selectionKeyPressed: B2, paneClickDistance: c3, selectionOnDrag: X3, children: [e2, T3 && t.jsx(es, { onSelectionContextMenu: O2, noPanClassName: D3, disableKeyboardA11y: R3 })] }) });
7699
+ })({ deleteKeyCode: u2, multiSelectionKeyCode: m3 }), t.jsx(La, { onPaneContextMenu: s2, elementsSelectable: x3, zoomOnScroll: w2, zoomOnPinch: b2, panOnScroll: Z2, panOnScrollSpeed: C3, panOnScrollMode: E2, zoomOnDoubleClick: M2, panOnDrag: !B2 && H3, defaultViewport: k2, translateExtent: _2, minZoom: P3, maxZoom: z2, zoomActivationKeyCode: v2, preventScrolling: I2, noWheelClassName: A3, noPanClassName: D3, onViewportChange: L2, isControlledViewport: $2, paneClickDistance: c3, selectionOnDrag: X3, children: t.jsxs(ja, { onSelectionStart: g2, onSelectionEnd: p2, onPaneClick: o2, onPaneMouseEnter: r2, onPaneMouseMove: i2, onPaneMouseLeave: a3, onPaneContextMenu: s2, onPaneScroll: l2, panOnDrag: H3, isSelecting: !!Y3, selectionMode: f2, selectionKeyPressed: B2, paneClickDistance: c3, selectionOnDrag: X3, children: [e2, T3 && t.jsx(es, { onSelectionContextMenu: O2, noPanClassName: D3, disableKeyboardA11y: R3 })] }) });
8023
7700
  }
8024
7701
  os.displayName = "FlowRenderer";
8025
7702
  const rs = n.memo(os), is = (e2) => (t2) => e2 ? Eo2(t2.nodeLookup, { x: 0, y: 0, width: t2.width, height: t2.height }, t2.transform, true).map(((e3) => e3.id)) : Array.from(t2.nodeLookup.keys());
@@ -8029,9 +7706,9 @@ function requireUmd() {
8029
7706
  const n2 = t2.nodeLookup.get(e2), o3 = t2.parentLookup.has(e2);
8030
7707
  return { node: n2, internals: n2.internals, isParent: o3 };
8031
7708
  }), qi2);
8032
- let M2 = S2.type || "default", N3 = (x3 == null ? void 0 : x3[M2]) || Qa[M2];
8033
- void 0 === N3 && (b2 == null ? void 0 : b2("003", oo.error003(M2)), M2 = "default", N3 = (x3 == null ? void 0 : x3.default) || Qa.default);
8034
- const k2 = !!(S2.draggable || u2 && void 0 === S2.draggable), _3 = !!(S2.selectable || d2 && void 0 === S2.selectable), P3 = !!(S2.connectable || h2 && void 0 === S2.connectable), z2 = !!(S2.focusable || f2 && void 0 === S2.focusable), I2 = Ti(), O2 = Uo2(S2), A3 = (function({ node: e3, nodeType: t2, hasDimensions: o3, resizeObserver: r2 }) {
7709
+ let M2 = S2.type || "default", N2 = (x3 == null ? void 0 : x3[M2]) || Qa[M2];
7710
+ void 0 === N2 && (b2 == null ? void 0 : b2("003", oo.error003(M2)), M2 = "default", N2 = (x3 == null ? void 0 : x3.default) || Qa.default);
7711
+ const k2 = !!(S2.draggable || u2 && void 0 === S2.draggable), _2 = !!(S2.selectable || d2 && void 0 === S2.selectable), P3 = !!(S2.connectable || h2 && void 0 === S2.connectable), z2 = !!(S2.focusable || f2 && void 0 === S2.focusable), I2 = Ti(), O2 = Uo2(S2), A3 = (function({ node: e3, nodeType: t2, hasDimensions: o3, resizeObserver: r2 }) {
8035
7712
  const i3 = Ti(), a4 = n.useRef(null), s3 = n.useRef(null), l3 = n.useRef(e3.sourcePosition), c4 = n.useRef(e3.targetPosition), u3 = n.useRef(t2), d3 = o3 && !!e3.internals.handleBounds;
8036
7713
  return n.useEffect((() => {
8037
7714
  !a4.current || e3.hidden || d3 && s3.current === a4.current || (s3.current && (r2 == null ? void 0 : r2.unobserve(s3.current)), r2 == null ? void 0 : r2.observe(a4.current), s3.current = a4.current);
@@ -8043,18 +7720,18 @@ function requireUmd() {
8043
7720
  (n2 || o4 || r3) && (u3.current = t2, l3.current = e3.sourcePosition, c4.current = e3.targetPosition, i3.getState().updateNodeInternals(/* @__PURE__ */ new Map([[e3.id, { id: e3.id, nodeElement: a4.current, force: true }]])));
8044
7721
  }
8045
7722
  }), [e3.id, t2, e3.sourcePosition, e3.targetPosition]), a4;
8046
- })({ node: S2, nodeType: M2, hasDimensions: O2, resizeObserver: g2 }), D3 = Za({ nodeRef: A3, disabled: S2.hidden || !k2, noDragClassName: p2, handleSelector: S2.dragHandle, nodeId: e2, isSelectable: _3, nodeClickDistance: w2 }), R3 = Ya();
7723
+ })({ node: S2, nodeType: M2, hasDimensions: O2, resizeObserver: g2 }), D3 = Za({ nodeRef: A3, disabled: S2.hidden || !k2, noDragClassName: p2, handleSelector: S2.dragHandle, nodeId: e2, isSelectable: _2, nodeClickDistance: w2 }), R3 = Ya();
8047
7724
  if (S2.hidden) return null;
8048
7725
  const L2 = qo(S2), $2 = (function(e3) {
8049
7726
  var _a2, _b, _c, _d;
8050
7727
  return void 0 === e3.internals.handleBounds ? { width: e3.width ?? e3.initialWidth ?? ((_a2 = e3.style) == null ? void 0 : _a2.width), height: e3.height ?? e3.initialHeight ?? ((_b = e3.style) == null ? void 0 : _b.height) } : { width: e3.width ?? ((_c = e3.style) == null ? void 0 : _c.width), height: e3.height ?? ((_d = e3.style) == null ? void 0 : _d.height) };
8051
- })(S2), T3 = _3 || k2 || o2 || i2 || a3 || s2, V3 = i2 ? (e3) => i2(e3, { ...C3.userNode }) : void 0, B2 = a3 ? (e3) => a3(e3, { ...C3.userNode }) : void 0, j2 = s2 ? (e3) => s2(e3, { ...C3.userNode }) : void 0, H3 = l2 ? (e3) => l2(e3, { ...C3.userNode }) : void 0, Z2 = c3 ? (e3) => c3(e3, { ...C3.userNode }) : void 0;
8052
- return t.jsx("div", { className: r(["react-flow__node", `react-flow__node-${M2}`, { [m3]: k2 }, S2.className, { selected: S2.selected, selectable: _3, parent: E2, draggable: k2, dragging: D3 }]), ref: A3, style: { zIndex: C3.z, transform: `translate(${C3.positionAbsolute.x}px,${C3.positionAbsolute.y}px)`, pointerEvents: T3 ? "all" : "none", visibility: O2 ? "visible" : "hidden", ...S2.style, ...$2 }, "data-id": e2, "data-testid": `rf__node-${e2}`, onMouseEnter: V3, onMouseMove: B2, onMouseLeave: j2, onContextMenu: H3, onClick: (t2) => {
7728
+ })(S2), T3 = _2 || k2 || o2 || i2 || a3 || s2, V3 = i2 ? (e3) => i2(e3, { ...C3.userNode }) : void 0, B2 = a3 ? (e3) => a3(e3, { ...C3.userNode }) : void 0, j2 = s2 ? (e3) => s2(e3, { ...C3.userNode }) : void 0, H3 = l2 ? (e3) => l2(e3, { ...C3.userNode }) : void 0, Z2 = c3 ? (e3) => c3(e3, { ...C3.userNode }) : void 0;
7729
+ return t.jsx("div", { className: r(["react-flow__node", `react-flow__node-${M2}`, { [m3]: k2 }, S2.className, { selected: S2.selected, selectable: _2, parent: E2, draggable: k2, dragging: D3 }]), ref: A3, style: { zIndex: C3.z, transform: `translate(${C3.positionAbsolute.x}px,${C3.positionAbsolute.y}px)`, pointerEvents: T3 ? "all" : "none", visibility: O2 ? "visible" : "hidden", ...S2.style, ...$2 }, "data-id": e2, "data-testid": `rf__node-${e2}`, onMouseEnter: V3, onMouseMove: B2, onMouseLeave: j2, onContextMenu: H3, onClick: (t2) => {
8053
7730
  const { selectNodesOnDrag: n2, nodeDragThreshold: r2 } = I2.getState();
8054
- _3 && (!n2 || !k2 || r2 > 0) && Ha({ id: e2, store: I2, nodeRef: A3 }), o2 && o2(t2, { ...C3.userNode });
7731
+ _2 && (!n2 || !k2 || r2 > 0) && Ha({ id: e2, store: I2, nodeRef: A3 }), o2 && o2(t2, { ...C3.userNode });
8055
7732
  }, onDoubleClick: Z2, onKeyDown: z2 ? (t2) => {
8056
7733
  if (!rr(t2.nativeEvent) && !y3) {
8057
- if (io2.includes(t2.key) && _3) {
7734
+ if (io2.includes(t2.key) && _2) {
8058
7735
  const n2 = "Escape" === t2.key;
8059
7736
  Ha({ id: e2, store: I2, unselect: n2, nodeRef: A3 });
8060
7737
  } else if (k2 && S2.selected && Object.prototype.hasOwnProperty.call(Ua, t2.key)) {
@@ -8069,7 +7746,7 @@ function requireUmd() {
8069
7746
  const { transform: t2, width: n2, height: o3, autoPanOnNodeFocus: r2, setCenter: i3 } = I2.getState();
8070
7747
  if (!r2) return;
8071
7748
  Eo2(/* @__PURE__ */ new Map([[e2, S2]]), { x: 0, y: 0, width: n2, height: o3 }, t2, true).length > 0 || i3(S2.position.x + L2.width / 2, S2.position.y + L2.height / 2, { zoom: t2[2] });
8072
- } : void 0, role: S2.ariaRole ?? (z2 ? "group" : void 0), "aria-roledescription": "node", "aria-describedby": y3 ? void 0 : `${ji2}-${v2}`, "aria-label": S2.ariaLabel, ...S2.domAttributes, children: t.jsx(Wa, { value: e2, children: t.jsx(N3, { id: e2, data: S2.data, type: M2, positionAbsoluteX: C3.positionAbsolute.x, positionAbsoluteY: C3.positionAbsolute.y, selected: S2.selected ?? false, selectable: _3, draggable: k2, deletable: S2.deletable ?? true, isConnectable: P3, sourcePosition: S2.sourcePosition, targetPosition: S2.targetPosition, dragging: D3, dragHandle: S2.dragHandle, zIndex: C3.z, parentId: S2.parentId, ...L2 }) }) });
7749
+ } : void 0, role: S2.ariaRole ?? (z2 ? "group" : void 0), "aria-roledescription": "node", "aria-describedby": y3 ? void 0 : `${ji2}-${v2}`, "aria-label": S2.ariaLabel, ...S2.domAttributes, children: t.jsx(Wa, { value: e2, children: t.jsx(N2, { id: e2, data: S2.data, type: M2, positionAbsoluteX: C3.positionAbsolute.x, positionAbsoluteY: C3.positionAbsolute.y, selected: S2.selected ?? false, selectable: _2, draggable: k2, deletable: S2.deletable ?? true, isConnectable: P3, sourcePosition: S2.sourcePosition, targetPosition: S2.targetPosition, dragging: D3, dragHandle: S2.dragHandle, zIndex: C3.z, parentId: S2.parentId, ...L2 }) }) });
8073
7750
  }));
8074
7751
  const ls = (e2) => ({ nodesDraggable: e2.nodesDraggable, nodesConnectable: e2.nodesConnectable, nodesFocusable: e2.nodesFocusable, elementsSelectable: e2.elementsSelectable, onError: e2.onError });
8075
7752
  function cs(e2) {
@@ -8209,9 +7886,9 @@ function requireUmd() {
8209
7886
  let C3 = $i(((e2) => e2.edgeLookup.get(o2)));
8210
7887
  const E2 = $i(((e2) => e2.defaultEdgeOptions));
8211
7888
  C3 = E2 ? { ...E2, ...C3 } : C3;
8212
- let M2 = C3.type || "default", N3 = (x3 == null ? void 0 : x3[M2]) || Rs[M2];
8213
- void 0 === N3 && (b2 == null ? void 0 : b2("011", oo.error011(M2)), M2 = "default", N3 = (x3 == null ? void 0 : x3.default) || Rs.default);
8214
- const k2 = !!(C3.focusable || i2 && void 0 === C3.focusable), _3 = void 0 !== p2 && (C3.reconnectable || a3 && void 0 === C3.reconnectable), P3 = !!(C3.selectable || s2 && void 0 === C3.selectable), z2 = n.useRef(null), [I2, O2] = n.useState(false), [A3, D3] = n.useState(false), R3 = Ti(), { zIndex: L2, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3 } = $i(n.useCallback(((t2) => {
7889
+ let M2 = C3.type || "default", N2 = (x3 == null ? void 0 : x3[M2]) || Rs[M2];
7890
+ void 0 === N2 && (b2 == null ? void 0 : b2("011", oo.error011(M2)), M2 = "default", N2 = (x3 == null ? void 0 : x3.default) || Rs.default);
7891
+ const k2 = !!(C3.focusable || i2 && void 0 === C3.focusable), _2 = void 0 !== p2 && (C3.reconnectable || a3 && void 0 === C3.reconnectable), P3 = !!(C3.selectable || s2 && void 0 === C3.selectable), z2 = n.useRef(null), [I2, O2] = n.useState(false), [A3, D3] = n.useState(false), R3 = Ti(), { zIndex: L2, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3 } = $i(n.useCallback(((t2) => {
8215
7892
  const n2 = t2.nodeLookup.get(C3.source), r2 = t2.nodeLookup.get(C3.target);
8216
7893
  if (!n2 || !r2) return { zIndex: C3.zIndex, ...Ls };
8217
7894
  const i3 = (function(t3) {
@@ -8236,20 +7913,20 @@ function requireUmd() {
8236
7913
  d2(e2, { ...C3 });
8237
7914
  } : void 0, K3 = h2 ? (e2) => {
8238
7915
  h2(e2, { ...C3 });
8239
- } : void 0, G3 = f2 ? (e2) => {
7916
+ } : void 0, G2 = f2 ? (e2) => {
8240
7917
  f2(e2, { ...C3 });
8241
7918
  } : void 0;
8242
7919
  return t.jsx("svg", { style: { zIndex: L2 }, children: t.jsxs("g", { className: r(["react-flow__edge", `react-flow__edge-${M2}`, C3.className, w2, { selected: C3.selected, animated: C3.animated, inactive: !P3 && !l2, updating: I2, selectable: P3 }]), onClick: (e2) => {
8243
7920
  var _a2;
8244
7921
  const { addSelectedEdges: t2, unselectNodesAndEdges: n2, multiSelectionActive: r2 } = R3.getState();
8245
7922
  P3 && (R3.setState({ nodesSelectionActive: false }), C3.selected && r2 ? (n2({ nodes: [], edges: [C3] }), (_a2 = z2.current) == null ? void 0 : _a2.blur()) : t2([o2])), l2 && l2(e2, C3);
8246
- }, onDoubleClick: Y3, onContextMenu: F3, onMouseEnter: W2, onMouseMove: K3, onMouseLeave: G3, onKeyDown: k2 ? (e2) => {
7923
+ }, onDoubleClick: Y3, onContextMenu: F3, onMouseEnter: W2, onMouseMove: K3, onMouseLeave: G2, onKeyDown: k2 ? (e2) => {
8247
7924
  var _a2;
8248
7925
  if (!S2 && io2.includes(e2.key) && P3) {
8249
7926
  const { unselectNodesAndEdges: t2, addSelectedEdges: n2 } = R3.getState();
8250
7927
  "Escape" === e2.key ? ((_a2 = z2.current) == null ? void 0 : _a2.blur(), t2({ edges: [C3] })) : n2([o2]);
8251
7928
  }
8252
- } : void 0, tabIndex: k2 ? 0 : void 0, role: C3.ariaRole ?? (k2 ? "group" : "img"), "aria-roledescription": "edge", "data-id": o2, "data-testid": `rf__edge-${o2}`, "aria-label": null === C3.ariaLabel ? void 0 : C3.ariaLabel || `Edge from ${C3.source} to ${C3.target}`, "aria-describedby": k2 ? `${Hi}-${v2}` : void 0, ref: z2, ...C3.domAttributes, children: [!A3 && t.jsx(N3, { id: o2, source: C3.source, target: C3.target, type: C3.type, selected: C3.selected, animated: C3.animated, selectable: P3, deletable: C3.deletable ?? true, label: C3.label, labelStyle: C3.labelStyle, labelShowBg: C3.labelShowBg, labelBgStyle: C3.labelBgStyle, labelBgPadding: C3.labelBgPadding, labelBgBorderRadius: C3.labelBgBorderRadius, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3, data: C3.data, style: C3.style, sourceHandleId: C3.sourceHandle, targetHandleId: C3.targetHandle, markerStart: Z2, markerEnd: X3, pathOptions: "pathOptions" in C3 ? C3.pathOptions : void 0, interactionWidth: C3.interactionWidth }), _3 && t.jsx(js, { edge: C3, isReconnectable: _3, reconnectRadius: g2, onReconnect: p2, onReconnectStart: m3, onReconnectEnd: y3, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3, setUpdateHover: O2, setReconnecting: D3 })] }) });
7929
+ } : void 0, tabIndex: k2 ? 0 : void 0, role: C3.ariaRole ?? (k2 ? "group" : "img"), "aria-roledescription": "edge", "data-id": o2, "data-testid": `rf__edge-${o2}`, "aria-label": null === C3.ariaLabel ? void 0 : C3.ariaLabel || `Edge from ${C3.source} to ${C3.target}`, "aria-describedby": k2 ? `${Hi}-${v2}` : void 0, ref: z2, ...C3.domAttributes, children: [!A3 && t.jsx(N2, { id: o2, source: C3.source, target: C3.target, type: C3.type, selected: C3.selected, animated: C3.animated, selectable: P3, deletable: C3.deletable ?? true, label: C3.label, labelStyle: C3.labelStyle, labelShowBg: C3.labelShowBg, labelBgStyle: C3.labelBgStyle, labelBgPadding: C3.labelBgPadding, labelBgBorderRadius: C3.labelBgBorderRadius, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3, data: C3.data, style: C3.style, sourceHandleId: C3.sourceHandle, targetHandleId: C3.targetHandle, markerStart: Z2, markerEnd: X3, pathOptions: "pathOptions" in C3 ? C3.pathOptions : void 0, interactionWidth: C3.interactionWidth }), _2 && t.jsx(js, { edge: C3, isReconnectable: _2, reconnectRadius: g2, onReconnect: p2, onReconnectStart: m3, onReconnectEnd: y3, sourceX: $2, sourceY: T3, targetX: V3, targetY: B2, sourcePosition: j2, targetPosition: H3, setUpdateHover: O2, setReconnecting: D3 })] }) });
8253
7930
  }));
8254
7931
  const Zs = (e2) => ({ edgesFocusable: e2.edgesFocusable, edgesReconnectable: e2.edgesReconnectable, elementsSelectable: e2.elementsSelectable, connectionMode: e2.connectionMode, onError: e2.onError });
8255
7932
  function Xs({ defaultMarkerColor: e2, onlyRenderVisibleElements: o2, rfId: r2, edgeTypes: i2, noPanClassName: a3, onReconnect: s2, onEdgeContextMenu: l2, onEdgeMouseEnter: c3, onEdgeMouseMove: u2, onEdgeMouseLeave: d2, onEdgeClick: h2, reconnectRadius: f2, onEdgeDoubleClick: g2, onReconnectStart: p2, onReconnectEnd: m3, disableKeyboardA11y: y3 }) {
@@ -8323,7 +8000,7 @@ function requireUmd() {
8323
8000
  n.useRef(e2), Ti(), n.useEffect((() => {
8324
8001
  }), [e2]);
8325
8002
  }
8326
- function nl({ nodeTypes: e2, edgeTypes: o2, onInit: r2, onNodeClick: i2, onEdgeClick: a3, onNodeDoubleClick: s2, onEdgeDoubleClick: l2, onNodeMouseEnter: c3, onNodeMouseMove: u2, onNodeMouseLeave: d2, onNodeContextMenu: h2, onSelectionContextMenu: f2, onSelectionStart: g2, onSelectionEnd: p2, connectionLineType: m3, connectionLineStyle: y3, connectionLineComponent: v2, connectionLineContainerStyle: x3, selectionKeyCode: w2, selectionOnDrag: b2, selectionMode: S2, multiSelectionKeyCode: C3, panActivationKeyCode: E2, zoomActivationKeyCode: M2, deleteKeyCode: N3, onlyRenderVisibleElements: k2, elementsSelectable: _3, defaultViewport: P3, translateExtent: z2, minZoom: I2, maxZoom: O2, preventScrolling: A3, defaultMarkerColor: D3, zoomOnScroll: R3, zoomOnPinch: L2, panOnScroll: $2, panOnScrollSpeed: T3, panOnScrollMode: V3, zoomOnDoubleClick: B2, panOnDrag: j2, onPaneClick: H3, onPaneMouseEnter: Z2, onPaneMouseMove: X3, onPaneMouseLeave: Y3, onPaneScroll: F3, onPaneContextMenu: W2, paneClickDistance: K3, nodeClickDistance: G3, onEdgeContextMenu: q3, onEdgeMouseEnter: U3, onEdgeMouseMove: Q3, onEdgeMouseLeave: J2, reconnectRadius: ee2, onReconnect: te3, onReconnectStart: ne2, onReconnectEnd: oe3, noDragClassName: re3, noWheelClassName: ie3, noPanClassName: ae3, disableKeyboardA11y: se3, nodeExtent: le3, rfId: ce3, viewport: ue3, onViewportChange: de3 }) {
8003
+ function nl({ nodeTypes: e2, edgeTypes: o2, onInit: r2, onNodeClick: i2, onEdgeClick: a3, onNodeDoubleClick: s2, onEdgeDoubleClick: l2, onNodeMouseEnter: c3, onNodeMouseMove: u2, onNodeMouseLeave: d2, onNodeContextMenu: h2, onSelectionContextMenu: f2, onSelectionStart: g2, onSelectionEnd: p2, connectionLineType: m3, connectionLineStyle: y3, connectionLineComponent: v2, connectionLineContainerStyle: x3, selectionKeyCode: w2, selectionOnDrag: b2, selectionMode: S2, multiSelectionKeyCode: C3, panActivationKeyCode: E2, zoomActivationKeyCode: M2, deleteKeyCode: N2, onlyRenderVisibleElements: k2, elementsSelectable: _2, defaultViewport: P3, translateExtent: z2, minZoom: I2, maxZoom: O2, preventScrolling: A3, defaultMarkerColor: D3, zoomOnScroll: R3, zoomOnPinch: L2, panOnScroll: $2, panOnScrollSpeed: T3, panOnScrollMode: V3, zoomOnDoubleClick: B2, panOnDrag: j2, onPaneClick: H3, onPaneMouseEnter: Z2, onPaneMouseMove: X3, onPaneMouseLeave: Y3, onPaneScroll: F3, onPaneContextMenu: W2, paneClickDistance: K3, nodeClickDistance: G2, onEdgeContextMenu: q3, onEdgeMouseEnter: U3, onEdgeMouseMove: Q3, onEdgeMouseLeave: J2, reconnectRadius: ee2, onReconnect: te3, onReconnectStart: ne2, onReconnectEnd: oe3, noDragClassName: re3, noWheelClassName: ie3, noPanClassName: ae3, disableKeyboardA11y: se3, nodeExtent: le3, rfId: ce3, viewport: ue3, onViewportChange: de3 }) {
8327
8004
  return tl(e2), tl(o2), Ti(), n.useRef(false), n.useEffect((() => {
8328
8005
  }), []), (function(e3) {
8329
8006
  const t2 = Ia(), o3 = n.useRef(false);
@@ -8335,7 +8012,7 @@ function requireUmd() {
8335
8012
  n.useEffect((() => {
8336
8013
  e3 && (t2 == null ? void 0 : t2(e3), o3.setState({ transform: [e3.x, e3.y, e3.zoom] }));
8337
8014
  }), [e3, t2]);
8338
- })(ue3), t.jsx(rs, { onPaneClick: H3, onPaneMouseEnter: Z2, onPaneMouseMove: X3, onPaneMouseLeave: Y3, onPaneContextMenu: W2, onPaneScroll: F3, paneClickDistance: K3, deleteKeyCode: N3, selectionKeyCode: w2, selectionOnDrag: b2, selectionMode: S2, onSelectionStart: g2, onSelectionEnd: p2, multiSelectionKeyCode: C3, panActivationKeyCode: E2, zoomActivationKeyCode: M2, elementsSelectable: _3, zoomOnScroll: R3, zoomOnPinch: L2, zoomOnDoubleClick: B2, panOnScroll: $2, panOnScrollSpeed: T3, panOnScrollMode: V3, panOnDrag: j2, defaultViewport: P3, translateExtent: z2, minZoom: I2, maxZoom: O2, onSelectionContextMenu: f2, preventScrolling: A3, noDragClassName: re3, noWheelClassName: ie3, noPanClassName: ae3, disableKeyboardA11y: se3, onViewportChange: de3, isControlledViewport: !!ue3, children: t.jsxs(Ws, { children: [t.jsx(Ys, { edgeTypes: o2, onEdgeClick: a3, onEdgeDoubleClick: l2, onReconnect: te3, onReconnectStart: ne2, onReconnectEnd: oe3, onlyRenderVisibleElements: k2, onEdgeContextMenu: q3, onEdgeMouseEnter: U3, onEdgeMouseMove: Q3, onEdgeMouseLeave: J2, reconnectRadius: ee2, defaultMarkerColor: D3, noPanClassName: ae3, disableKeyboardA11y: se3, rfId: ce3 }), t.jsx(Qs, { style: y3, type: m3, component: v2, containerStyle: x3 }), t.jsx("div", { className: "react-flow__edgelabel-renderer" }), t.jsx(us, { nodeTypes: e2, onNodeClick: i2, onNodeDoubleClick: s2, onNodeMouseEnter: c3, onNodeMouseMove: u2, onNodeMouseLeave: d2, onNodeContextMenu: h2, nodeClickDistance: G3, onlyRenderVisibleElements: k2, noPanClassName: ae3, noDragClassName: re3, disableKeyboardA11y: se3, nodeExtent: le3, rfId: ce3 }), t.jsx("div", { className: "react-flow__viewport-portal" })] }) });
8015
+ })(ue3), t.jsx(rs, { onPaneClick: H3, onPaneMouseEnter: Z2, onPaneMouseMove: X3, onPaneMouseLeave: Y3, onPaneContextMenu: W2, onPaneScroll: F3, paneClickDistance: K3, deleteKeyCode: N2, selectionKeyCode: w2, selectionOnDrag: b2, selectionMode: S2, onSelectionStart: g2, onSelectionEnd: p2, multiSelectionKeyCode: C3, panActivationKeyCode: E2, zoomActivationKeyCode: M2, elementsSelectable: _2, zoomOnScroll: R3, zoomOnPinch: L2, zoomOnDoubleClick: B2, panOnScroll: $2, panOnScrollSpeed: T3, panOnScrollMode: V3, panOnDrag: j2, defaultViewport: P3, translateExtent: z2, minZoom: I2, maxZoom: O2, onSelectionContextMenu: f2, preventScrolling: A3, noDragClassName: re3, noWheelClassName: ie3, noPanClassName: ae3, disableKeyboardA11y: se3, onViewportChange: de3, isControlledViewport: !!ue3, children: t.jsxs(Ws, { children: [t.jsx(Ys, { edgeTypes: o2, onEdgeClick: a3, onEdgeDoubleClick: l2, onReconnect: te3, onReconnectStart: ne2, onReconnectEnd: oe3, onlyRenderVisibleElements: k2, onEdgeContextMenu: q3, onEdgeMouseEnter: U3, onEdgeMouseMove: Q3, onEdgeMouseLeave: J2, reconnectRadius: ee2, defaultMarkerColor: D3, noPanClassName: ae3, disableKeyboardA11y: se3, rfId: ce3 }), t.jsx(Qs, { style: y3, type: m3, component: v2, containerStyle: x3 }), t.jsx("div", { className: "react-flow__edgelabel-renderer" }), t.jsx(us, { nodeTypes: e2, onNodeClick: i2, onNodeDoubleClick: s2, onNodeMouseEnter: c3, onNodeMouseMove: u2, onNodeMouseLeave: d2, onNodeContextMenu: h2, nodeClickDistance: G2, onlyRenderVisibleElements: k2, noPanClassName: ae3, noDragClassName: re3, disableKeyboardA11y: se3, nodeExtent: le3, rfId: ce3 }), t.jsx("div", { className: "react-flow__viewport-portal" })] }) });
8339
8016
  }
8340
8017
  nl.displayName = "GraphView";
8341
8018
  const ol = n.memo(nl), rl = ({ nodes: t2, edges: n2, defaultNodes: o2, defaultEdges: r2, width: i2, height: a3, fitView: s2, fitViewOptions: l2, minZoom: c3 = 0.5, maxZoom: u2 = 2, nodeOrigin: d2, nodeExtent: h2, zIndexMode: f2 = "basic" } = {}) => {
@@ -8486,7 +8163,7 @@ function requireUmd() {
8486
8163
  return n.useContext(Di) ? t.jsx(t.Fragment, { children: e2 }) : t.jsx(al, { initialNodes: o2, initialEdges: r2, defaultNodes: i2, defaultEdges: a3, initialWidth: s2, initialHeight: l2, fitView: c3, initialFitViewOptions: u2, initialMinZoom: d2, initialMaxZoom: h2, nodeOrigin: f2, nodeExtent: g2, zIndexMode: p2, children: e2 });
8487
8164
  }
8488
8165
  const ll = { width: "100%", height: "100%", overflow: "hidden", position: "relative", zIndex: 0 };
8489
- var cl = Ma((function({ nodes: o2, edges: i2, defaultNodes: a3, defaultEdges: s2, className: l2, nodeTypes: c3, edgeTypes: u2, onNodeClick: d2, onEdgeClick: h2, onInit: f2, onMove: g2, onMoveStart: p2, onMoveEnd: m3, onConnect: y3, onConnectStart: v2, onConnectEnd: x3, onClickConnectStart: w2, onClickConnectEnd: b2, onNodeMouseEnter: S2, onNodeMouseMove: C3, onNodeMouseLeave: E2, onNodeContextMenu: M2, onNodeDoubleClick: N3, onNodeDragStart: k2, onNodeDrag: _3, onNodeDragStop: P3, onNodesDelete: z2, onEdgesDelete: I2, onDelete: O2, onSelectionChange: A3, onSelectionDragStart: D3, onSelectionDrag: R3, onSelectionDragStop: L2, onSelectionContextMenu: $2, onSelectionStart: T3, onSelectionEnd: V3, onBeforeDelete: B2, connectionMode: j2, connectionLineType: H3 = e.ConnectionLineType.Bezier, connectionLineStyle: Z2, connectionLineComponent: X3, connectionLineContainerStyle: Y3, deleteKeyCode: F3 = "Backspace", selectionKeyCode: W2 = "Shift", selectionOnDrag: K3 = false, selectionMode: G3 = e.SelectionMode.Full, panActivationKeyCode: q3 = "Space", multiSelectionKeyCode: U3 = Ko() ? "Meta" : "Control", zoomActivationKeyCode: Q3 = Ko() ? "Meta" : "Control", snapToGrid: J2, snapGrid: ee2, onlyRenderVisibleElements: te3 = false, selectNodesOnDrag: ne2, nodesDraggable: oe3, autoPanOnNodeFocus: re3, nodesConnectable: ie3, nodesFocusable: ae3, nodeOrigin: se3 = oa, edgesFocusable: le3, edgesReconnectable: ce3, elementsSelectable: ue3 = true, defaultViewport: de3 = ra, minZoom: he3 = 0.5, maxZoom: fe3 = 2, translateExtent: ge2 = ro2, preventScrolling: pe3 = true, nodeExtent: me2, defaultMarkerColor: ye2 = "#b1b1b7", zoomOnScroll: ve2 = true, zoomOnPinch: xe3 = true, panOnScroll: we3 = false, panOnScrollSpeed: be3 = 0.5, panOnScrollMode: Se2 = e.PanOnScrollMode.Free, zoomOnDoubleClick: Ce3 = true, panOnDrag: Ee2 = true, onPaneClick: Me3, onPaneMouseEnter: Ne3, onPaneMouseMove: ke2, onPaneMouseLeave: _e3, onPaneScroll: Pe3, onPaneContextMenu: ze3, paneClickDistance: Ie3 = 1, nodeClickDistance: Oe3 = 0, children: Ae2, onReconnect: De2, onReconnectStart: Re3, onReconnectEnd: Le3, onEdgeContextMenu: $e3, onEdgeDoubleClick: Te2, onEdgeMouseEnter: Ve3, onEdgeMouseMove: Be3, onEdgeMouseLeave: je3, reconnectRadius: He3 = 10, onNodesChange: Ze3, onEdgesChange: Xe2, noDragClassName: Ye3 = "nodrag", noWheelClassName: Fe3 = "nowheel", noPanClassName: We3 = "nopan", fitView: Ke3, fitViewOptions: Ge3, connectOnClick: qe3, attributionPosition: Ue2, proOptions: Qe3, defaultEdgeOptions: Je3, elevateNodesOnSelect: et2 = true, elevateEdgesOnSelect: tt2 = false, disableKeyboardA11y: nt2 = false, autoPanOnConnect: ot2, autoPanOnNodeDrag: rt2, autoPanSpeed: it2, connectionRadius: at2, isValidConnection: st3, onError: lt3, style: ct3, id: ut3, nodeDragThreshold: dt3, connectionDragThreshold: ht3, viewport: ft3, onViewportChange: gt2, width: pt3, height: mt3, colorMode: yt2 = "light", debug: vt2, onScroll: xt2, ariaLabelConfig: wt2, zIndexMode: bt2 = "basic", ...St2 }, Ct2) {
8166
+ var cl = Ma((function({ nodes: o2, edges: i2, defaultNodes: a3, defaultEdges: s2, className: l2, nodeTypes: c3, edgeTypes: u2, onNodeClick: d2, onEdgeClick: h2, onInit: f2, onMove: g2, onMoveStart: p2, onMoveEnd: m3, onConnect: y3, onConnectStart: v2, onConnectEnd: x3, onClickConnectStart: w2, onClickConnectEnd: b2, onNodeMouseEnter: S2, onNodeMouseMove: C3, onNodeMouseLeave: E2, onNodeContextMenu: M2, onNodeDoubleClick: N2, onNodeDragStart: k2, onNodeDrag: _2, onNodeDragStop: P3, onNodesDelete: z2, onEdgesDelete: I2, onDelete: O2, onSelectionChange: A3, onSelectionDragStart: D3, onSelectionDrag: R3, onSelectionDragStop: L2, onSelectionContextMenu: $2, onSelectionStart: T3, onSelectionEnd: V3, onBeforeDelete: B2, connectionMode: j2, connectionLineType: H3 = e.ConnectionLineType.Bezier, connectionLineStyle: Z2, connectionLineComponent: X3, connectionLineContainerStyle: Y3, deleteKeyCode: F3 = "Backspace", selectionKeyCode: W2 = "Shift", selectionOnDrag: K3 = false, selectionMode: G2 = e.SelectionMode.Full, panActivationKeyCode: q3 = "Space", multiSelectionKeyCode: U3 = Ko() ? "Meta" : "Control", zoomActivationKeyCode: Q3 = Ko() ? "Meta" : "Control", snapToGrid: J2, snapGrid: ee2, onlyRenderVisibleElements: te3 = false, selectNodesOnDrag: ne2, nodesDraggable: oe3, autoPanOnNodeFocus: re3, nodesConnectable: ie3, nodesFocusable: ae3, nodeOrigin: se3 = oa, edgesFocusable: le3, edgesReconnectable: ce3, elementsSelectable: ue3 = true, defaultViewport: de3 = ra, minZoom: he3 = 0.5, maxZoom: fe3 = 2, translateExtent: ge2 = ro2, preventScrolling: pe3 = true, nodeExtent: me2, defaultMarkerColor: ye2 = "#b1b1b7", zoomOnScroll: ve2 = true, zoomOnPinch: xe3 = true, panOnScroll: we3 = false, panOnScrollSpeed: be3 = 0.5, panOnScrollMode: Se2 = e.PanOnScrollMode.Free, zoomOnDoubleClick: Ce3 = true, panOnDrag: Ee2 = true, onPaneClick: Me3, onPaneMouseEnter: Ne3, onPaneMouseMove: ke2, onPaneMouseLeave: _e3, onPaneScroll: Pe3, onPaneContextMenu: ze3, paneClickDistance: Ie3 = 1, nodeClickDistance: Oe3 = 0, children: Ae2, onReconnect: De2, onReconnectStart: Re3, onReconnectEnd: Le3, onEdgeContextMenu: $e3, onEdgeDoubleClick: Te2, onEdgeMouseEnter: Ve3, onEdgeMouseMove: Be3, onEdgeMouseLeave: je3, reconnectRadius: He3 = 10, onNodesChange: Ze3, onEdgesChange: Xe2, noDragClassName: Ye3 = "nodrag", noWheelClassName: Fe3 = "nowheel", noPanClassName: We3 = "nopan", fitView: Ke3, fitViewOptions: Ge3, connectOnClick: qe3, attributionPosition: Ue2, proOptions: Qe3, defaultEdgeOptions: Je3, elevateNodesOnSelect: et2 = true, elevateEdgesOnSelect: tt2 = false, disableKeyboardA11y: nt2 = false, autoPanOnConnect: ot2, autoPanOnNodeDrag: rt2, autoPanSpeed: it2, connectionRadius: at2, isValidConnection: st3, onError: lt3, style: ct3, id: ut3, nodeDragThreshold: dt3, connectionDragThreshold: ht3, viewport: ft3, onViewportChange: gt2, width: pt3, height: mt3, colorMode: yt2 = "light", debug: vt2, onScroll: xt2, ariaLabelConfig: wt2, zIndexMode: bt2 = "basic", ...St2 }, Ct2) {
8490
8167
  const Et3 = ut3 || "1", Mt2 = (function(e2) {
8491
8168
  var _a2;
8492
8169
  const [t2, o3] = n.useState("system" === e2 ? null : e2);
@@ -8500,7 +8177,7 @@ function requireUmd() {
8500
8177
  })(yt2), Nt2 = n.useCallback(((e2) => {
8501
8178
  e2.currentTarget.scrollTo({ top: 0, left: 0, behavior: "instant" }), xt2 == null ? void 0 : xt2(e2);
8502
8179
  }), [xt2]);
8503
- return t.jsx("div", { "data-testid": "rf__wrapper", ...St2, onScroll: Nt2, style: { ...ct3, ...ll }, ref: Ct2, className: r(["react-flow", l2, Mt2]), id: ut3, role: "application", children: t.jsxs(sl, { nodes: o2, edges: i2, width: pt3, height: mt3, fitView: Ke3, fitViewOptions: Ge3, minZoom: he3, maxZoom: fe3, nodeOrigin: se3, nodeExtent: me2, zIndexMode: bt2, children: [t.jsx(ol, { onInit: f2, onNodeClick: d2, onEdgeClick: h2, onNodeMouseEnter: S2, onNodeMouseMove: C3, onNodeMouseLeave: E2, onNodeContextMenu: M2, onNodeDoubleClick: N3, nodeTypes: c3, edgeTypes: u2, connectionLineType: H3, connectionLineStyle: Z2, connectionLineComponent: X3, connectionLineContainerStyle: Y3, selectionKeyCode: W2, selectionOnDrag: K3, selectionMode: G3, deleteKeyCode: F3, multiSelectionKeyCode: U3, panActivationKeyCode: q3, zoomActivationKeyCode: Q3, onlyRenderVisibleElements: te3, defaultViewport: de3, translateExtent: ge2, minZoom: he3, maxZoom: fe3, preventScrolling: pe3, zoomOnScroll: ve2, zoomOnPinch: xe3, zoomOnDoubleClick: Ce3, panOnScroll: we3, panOnScrollSpeed: be3, panOnScrollMode: Se2, panOnDrag: Ee2, onPaneClick: Me3, onPaneMouseEnter: Ne3, onPaneMouseMove: ke2, onPaneMouseLeave: _e3, onPaneScroll: Pe3, onPaneContextMenu: ze3, paneClickDistance: Ie3, nodeClickDistance: Oe3, onSelectionContextMenu: $2, onSelectionStart: T3, onSelectionEnd: V3, onReconnect: De2, onReconnectStart: Re3, onReconnectEnd: Le3, onEdgeContextMenu: $e3, onEdgeDoubleClick: Te2, onEdgeMouseEnter: Ve3, onEdgeMouseMove: Be3, onEdgeMouseLeave: je3, reconnectRadius: He3, defaultMarkerColor: ye2, noDragClassName: Ye3, noWheelClassName: Fe3, noPanClassName: We3, rfId: Et3, disableKeyboardA11y: nt2, nodeExtent: me2, viewport: ft3, onViewportChange: gt2 }), t.jsx(la, { nodes: o2, edges: i2, defaultNodes: a3, defaultEdges: s2, onConnect: y3, onConnectStart: v2, onConnectEnd: x3, onClickConnectStart: w2, onClickConnectEnd: b2, nodesDraggable: oe3, autoPanOnNodeFocus: re3, nodesConnectable: ie3, nodesFocusable: ae3, edgesFocusable: le3, edgesReconnectable: ce3, elementsSelectable: ue3, elevateNodesOnSelect: et2, elevateEdgesOnSelect: tt2, minZoom: he3, maxZoom: fe3, nodeExtent: me2, onNodesChange: Ze3, onEdgesChange: Xe2, snapToGrid: J2, snapGrid: ee2, connectionMode: j2, translateExtent: ge2, connectOnClick: qe3, defaultEdgeOptions: Je3, fitView: Ke3, fitViewOptions: Ge3, onNodesDelete: z2, onEdgesDelete: I2, onDelete: O2, onNodeDragStart: k2, onNodeDrag: _3, onNodeDragStop: P3, onSelectionDrag: R3, onSelectionDragStart: D3, onSelectionDragStop: L2, onMove: g2, onMoveStart: p2, onMoveEnd: m3, noPanClassName: We3, nodeOrigin: se3, rfId: Et3, autoPanOnConnect: ot2, autoPanOnNodeDrag: rt2, autoPanSpeed: it2, onError: lt3, connectionRadius: at2, isValidConnection: st3, selectNodesOnDrag: ne2, nodeDragThreshold: dt3, connectionDragThreshold: ht3, onBeforeDelete: B2, debug: vt2, ariaLabelConfig: wt2, zIndexMode: bt2 }), t.jsx(na, { onSelectionChange: A3 }), Ae2, t.jsx(Gi, { proOptions: Qe3, position: Ue2 }), t.jsx(Wi2, { rfId: Et3, disableKeyboardA11y: nt2 })] }) });
8180
+ return t.jsx("div", { "data-testid": "rf__wrapper", ...St2, onScroll: Nt2, style: { ...ct3, ...ll }, ref: Ct2, className: r(["react-flow", l2, Mt2]), id: ut3, role: "application", children: t.jsxs(sl, { nodes: o2, edges: i2, width: pt3, height: mt3, fitView: Ke3, fitViewOptions: Ge3, minZoom: he3, maxZoom: fe3, nodeOrigin: se3, nodeExtent: me2, zIndexMode: bt2, children: [t.jsx(ol, { onInit: f2, onNodeClick: d2, onEdgeClick: h2, onNodeMouseEnter: S2, onNodeMouseMove: C3, onNodeMouseLeave: E2, onNodeContextMenu: M2, onNodeDoubleClick: N2, nodeTypes: c3, edgeTypes: u2, connectionLineType: H3, connectionLineStyle: Z2, connectionLineComponent: X3, connectionLineContainerStyle: Y3, selectionKeyCode: W2, selectionOnDrag: K3, selectionMode: G2, deleteKeyCode: F3, multiSelectionKeyCode: U3, panActivationKeyCode: q3, zoomActivationKeyCode: Q3, onlyRenderVisibleElements: te3, defaultViewport: de3, translateExtent: ge2, minZoom: he3, maxZoom: fe3, preventScrolling: pe3, zoomOnScroll: ve2, zoomOnPinch: xe3, zoomOnDoubleClick: Ce3, panOnScroll: we3, panOnScrollSpeed: be3, panOnScrollMode: Se2, panOnDrag: Ee2, onPaneClick: Me3, onPaneMouseEnter: Ne3, onPaneMouseMove: ke2, onPaneMouseLeave: _e3, onPaneScroll: Pe3, onPaneContextMenu: ze3, paneClickDistance: Ie3, nodeClickDistance: Oe3, onSelectionContextMenu: $2, onSelectionStart: T3, onSelectionEnd: V3, onReconnect: De2, onReconnectStart: Re3, onReconnectEnd: Le3, onEdgeContextMenu: $e3, onEdgeDoubleClick: Te2, onEdgeMouseEnter: Ve3, onEdgeMouseMove: Be3, onEdgeMouseLeave: je3, reconnectRadius: He3, defaultMarkerColor: ye2, noDragClassName: Ye3, noWheelClassName: Fe3, noPanClassName: We3, rfId: Et3, disableKeyboardA11y: nt2, nodeExtent: me2, viewport: ft3, onViewportChange: gt2 }), t.jsx(la, { nodes: o2, edges: i2, defaultNodes: a3, defaultEdges: s2, onConnect: y3, onConnectStart: v2, onConnectEnd: x3, onClickConnectStart: w2, onClickConnectEnd: b2, nodesDraggable: oe3, autoPanOnNodeFocus: re3, nodesConnectable: ie3, nodesFocusable: ae3, edgesFocusable: le3, edgesReconnectable: ce3, elementsSelectable: ue3, elevateNodesOnSelect: et2, elevateEdgesOnSelect: tt2, minZoom: he3, maxZoom: fe3, nodeExtent: me2, onNodesChange: Ze3, onEdgesChange: Xe2, snapToGrid: J2, snapGrid: ee2, connectionMode: j2, translateExtent: ge2, connectOnClick: qe3, defaultEdgeOptions: Je3, fitView: Ke3, fitViewOptions: Ge3, onNodesDelete: z2, onEdgesDelete: I2, onDelete: O2, onNodeDragStart: k2, onNodeDrag: _2, onNodeDragStop: P3, onSelectionDrag: R3, onSelectionDragStart: D3, onSelectionDragStop: L2, onMove: g2, onMoveStart: p2, onMoveEnd: m3, noPanClassName: We3, nodeOrigin: se3, rfId: Et3, autoPanOnConnect: ot2, autoPanOnNodeDrag: rt2, autoPanSpeed: it2, onError: lt3, connectionRadius: at2, isValidConnection: st3, selectNodesOnDrag: ne2, nodeDragThreshold: dt3, connectionDragThreshold: ht3, onBeforeDelete: B2, debug: vt2, ariaLabelConfig: wt2, zIndexMode: bt2 }), t.jsx(na, { onSelectionChange: A3 }), Ae2, t.jsx(Gi, { proOptions: Qe3, position: Ue2 }), t.jsx(Wi2, { rfId: Et3, disableKeyboardA11y: nt2 })] }) });
8504
8181
  }));
8505
8182
  const ul = (e2) => {
8506
8183
  var _a2;
@@ -8528,8 +8205,8 @@ function requireUmd() {
8528
8205
  e.BackgroundVariant = void 0, (xl = e.BackgroundVariant || (e.BackgroundVariant = {})).Lines = "lines", xl.Dots = "dots", xl.Cross = "cross";
8529
8206
  const wl = { [e.BackgroundVariant.Dots]: 1, [e.BackgroundVariant.Lines]: 1, [e.BackgroundVariant.Cross]: 6 }, bl = (e2) => ({ transform: e2.transform, patternId: `pattern-${e2.rfId}` });
8530
8207
  function Sl({ id: o2, variant: i2 = e.BackgroundVariant.Dots, gap: a3 = 20, size: s2, lineWidth: l2 = 1, offset: c3 = 0, color: u2, bgColor: d2, style: h2, className: f2, patternClassName: g2 }) {
8531
- const p2 = n.useRef(null), { transform: m3, patternId: y3 } = $i(bl, qi2), v2 = s2 || wl[i2], x3 = i2 === e.BackgroundVariant.Dots, w2 = i2 === e.BackgroundVariant.Cross, b2 = Array.isArray(a3) ? a3 : [a3, a3], S2 = [b2[0] * m3[2] || 1, b2[1] * m3[2] || 1], C3 = v2 * m3[2], E2 = Array.isArray(c3) ? c3 : [c3, c3], M2 = w2 ? [C3, C3] : S2, N3 = [E2[0] * m3[2] || 1 + M2[0] / 2, E2[1] * m3[2] || 1 + M2[1] / 2], k2 = `${y3}${o2 || ""}`;
8532
- return t.jsxs("svg", { className: r(["react-flow__background", f2]), style: { ...h2, ...Da, "--xy-background-color-props": d2, "--xy-background-pattern-color-props": u2 }, ref: p2, "data-testid": "rf__background", children: [t.jsx("pattern", { id: k2, x: m3[0] % S2[0], y: m3[1] % S2[1], width: S2[0], height: S2[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${N3[0]},-${N3[1]})`, children: x3 ? t.jsx(vl, { radius: C3 / 2, className: g2 }) : t.jsx(yl, { dimensions: M2, lineWidth: l2, variant: i2, className: g2 }) }), t.jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${k2})` })] });
8208
+ const p2 = n.useRef(null), { transform: m3, patternId: y3 } = $i(bl, qi2), v2 = s2 || wl[i2], x3 = i2 === e.BackgroundVariant.Dots, w2 = i2 === e.BackgroundVariant.Cross, b2 = Array.isArray(a3) ? a3 : [a3, a3], S2 = [b2[0] * m3[2] || 1, b2[1] * m3[2] || 1], C3 = v2 * m3[2], E2 = Array.isArray(c3) ? c3 : [c3, c3], M2 = w2 ? [C3, C3] : S2, N2 = [E2[0] * m3[2] || 1 + M2[0] / 2, E2[1] * m3[2] || 1 + M2[1] / 2], k2 = `${y3}${o2 || ""}`;
8209
+ return t.jsxs("svg", { className: r(["react-flow__background", f2]), style: { ...h2, ...Da, "--xy-background-color-props": d2, "--xy-background-pattern-color-props": u2 }, ref: p2, "data-testid": "rf__background", children: [t.jsx("pattern", { id: k2, x: m3[0] % S2[0], y: m3[1] % S2[1], width: S2[0], height: S2[1], patternUnits: "userSpaceOnUse", patternTransform: `translate(-${N2[0]},-${N2[1]})`, children: x3 ? t.jsx(vl, { radius: C3 / 2, className: g2 }) : t.jsx(yl, { dimensions: M2, lineWidth: l2, variant: i2, className: g2 }) }), t.jsx("rect", { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${k2})` })] });
8533
8210
  }
8534
8211
  Sl.displayName = "Background";
8535
8212
  const Cl = n.memo(Sl);
@@ -8586,7 +8263,7 @@ function requireUmd() {
8586
8263
  return { viewBB: t2, boundingRect: e2.nodeLookup.size > 0 ? To(Co(e2.nodeLookup, { filter: Tl }), t2) : t2, rfId: e2.rfId, panZoom: e2.panZoom, translateExtent: e2.translateExtent, flowWidth: e2.width, flowHeight: e2.height, ariaLabelConfig: e2.ariaLabelConfig };
8587
8264
  };
8588
8265
  function Bl({ style: e2, className: o2, nodeStrokeColor: i2, nodeColor: a3, nodeClassName: s2 = "", nodeBorderRadius: l2 = 5, nodeStrokeWidth: c3, nodeComponent: u2, bgColor: d2, maskColor: h2, maskStrokeColor: f2, maskStrokeWidth: g2, position: p2 = "bottom-right", onClick: m3, onNodeClick: y3, pannable: v2 = false, zoomable: x3 = false, ariaLabel: w2, inversePan: b2, zoomStep: S2 = 1, offsetScale: C3 = 5 }) {
8589
- const E2 = Ti(), M2 = n.useRef(null), { boundingRect: N3, viewBB: k2, rfId: _3, panZoom: P3, translateExtent: z2, flowWidth: I2, flowHeight: O2, ariaLabelConfig: A3 } = $i(Vl, qi2), D3 = (e2 == null ? void 0 : e2.width) ?? 200, R3 = (e2 == null ? void 0 : e2.height) ?? 150, L2 = N3.width / D3, $2 = N3.height / R3, T3 = Math.max(L2, $2), V3 = T3 * D3, B2 = T3 * R3, j2 = C3 * T3, H3 = N3.x - (V3 - N3.width) / 2 - j2, Z2 = N3.y - (B2 - N3.height) / 2 - j2, X3 = V3 + 2 * j2, Y3 = B2 + 2 * j2, F3 = `react-flow__minimap-desc-${_3}`, W2 = n.useRef(0), K3 = n.useRef();
8266
+ const E2 = Ti(), M2 = n.useRef(null), { boundingRect: N2, viewBB: k2, rfId: _2, panZoom: P3, translateExtent: z2, flowWidth: I2, flowHeight: O2, ariaLabelConfig: A3 } = $i(Vl, qi2), D3 = (e2 == null ? void 0 : e2.width) ?? 200, R3 = (e2 == null ? void 0 : e2.height) ?? 150, L2 = N2.width / D3, $2 = N2.height / R3, T3 = Math.max(L2, $2), V3 = T3 * D3, B2 = T3 * R3, j2 = C3 * T3, H3 = N2.x - (V3 - N2.width) / 2 - j2, Z2 = N2.y - (B2 - N2.height) / 2 - j2, X3 = V3 + 2 * j2, Y3 = B2 + 2 * j2, F3 = `react-flow__minimap-desc-${_2}`, W2 = n.useRef(0), K3 = n.useRef();
8590
8267
  W2.current = T3, n.useEffect((() => {
8591
8268
  if (M2.current && P3) return K3.current = (function({ domNode: e3, panZoom: t2, getTransform: n2, getViewScale: o3 }) {
8592
8269
  const r2 = Se(e3);
@@ -8618,7 +8295,7 @@ function requireUmd() {
8618
8295
  var _a2;
8619
8296
  (_a2 = K3.current) == null ? void 0 : _a2.update({ translateExtent: z2, width: I2, height: O2, inversePan: b2, pannable: v2, zoomStep: S2, zoomable: x3 });
8620
8297
  }), [v2, x3, b2, S2, z2, I2, O2]);
8621
- const G3 = m3 ? (e3) => {
8298
+ const G2 = m3 ? (e3) => {
8622
8299
  var _a2;
8623
8300
  const [t2, n2] = ((_a2 = K3.current) == null ? void 0 : _a2.pointer(e3)) || [0, 0];
8624
8301
  m3(e3, { x: t2, y: n2 });
@@ -8626,14 +8303,14 @@ function requireUmd() {
8626
8303
  const n2 = E2.getState().nodeLookup.get(t2).internals.userNode;
8627
8304
  y3(e3, n2);
8628
8305
  }), []) : void 0, U3 = w2 ?? A3["minimap.ariaLabel"];
8629
- return t.jsx(Ki2, { position: p2, style: { ...e2, "--xy-minimap-background-color-props": "string" == typeof d2 ? d2 : void 0, "--xy-minimap-mask-background-color-props": "string" == typeof h2 ? h2 : void 0, "--xy-minimap-mask-stroke-color-props": "string" == typeof f2 ? f2 : void 0, "--xy-minimap-mask-stroke-width-props": "number" == typeof g2 ? g2 * T3 : void 0, "--xy-minimap-node-background-color-props": "string" == typeof a3 ? a3 : void 0, "--xy-minimap-node-stroke-color-props": "string" == typeof i2 ? i2 : void 0, "--xy-minimap-node-stroke-width-props": "number" == typeof c3 ? c3 : void 0 }, className: r(["react-flow__minimap", o2]), "data-testid": "rf__minimap", children: t.jsxs("svg", { width: D3, height: R3, viewBox: `${H3} ${Z2} ${X3} ${Y3}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": F3, ref: M2, onClick: G3, children: [U3 && t.jsx("title", { id: F3, children: U3 }), t.jsx($l, { onClick: q3, nodeColor: a3, nodeStrokeColor: i2, nodeBorderRadius: l2, nodeClassName: s2, nodeStrokeWidth: c3, nodeComponent: u2 }), t.jsx("path", { className: "react-flow__minimap-mask", d: `M${H3 - j2},${Z2 - j2}h${X3 + 2 * j2}v${Y3 + 2 * j2}h${-X3 - 2 * j2}z
8306
+ return t.jsx(Ki2, { position: p2, style: { ...e2, "--xy-minimap-background-color-props": "string" == typeof d2 ? d2 : void 0, "--xy-minimap-mask-background-color-props": "string" == typeof h2 ? h2 : void 0, "--xy-minimap-mask-stroke-color-props": "string" == typeof f2 ? f2 : void 0, "--xy-minimap-mask-stroke-width-props": "number" == typeof g2 ? g2 * T3 : void 0, "--xy-minimap-node-background-color-props": "string" == typeof a3 ? a3 : void 0, "--xy-minimap-node-stroke-color-props": "string" == typeof i2 ? i2 : void 0, "--xy-minimap-node-stroke-width-props": "number" == typeof c3 ? c3 : void 0 }, className: r(["react-flow__minimap", o2]), "data-testid": "rf__minimap", children: t.jsxs("svg", { width: D3, height: R3, viewBox: `${H3} ${Z2} ${X3} ${Y3}`, className: "react-flow__minimap-svg", role: "img", "aria-labelledby": F3, ref: M2, onClick: G2, children: [U3 && t.jsx("title", { id: F3, children: U3 }), t.jsx($l, { onClick: q3, nodeColor: a3, nodeStrokeColor: i2, nodeBorderRadius: l2, nodeClassName: s2, nodeStrokeWidth: c3, nodeComponent: u2 }), t.jsx("path", { className: "react-flow__minimap-mask", d: `M${H3 - j2},${Z2 - j2}h${X3 + 2 * j2}v${Y3 + 2 * j2}h${-X3 - 2 * j2}z
8630
8307
  M${k2.x},${k2.y}h${k2.width}v${k2.height}h${-k2.width}z`, fillRule: "evenodd", pointerEvents: "none" })] }) });
8631
8308
  }
8632
8309
  Bl.displayName = "MiniMap";
8633
8310
  const jl = n.memo(Bl), Hl = { [e.ResizeControlVariant.Line]: "right", [e.ResizeControlVariant.Handle]: "bottom-right" };
8634
8311
  const Zl = n.memo((function({ nodeId: o2, position: i2, variant: a3 = e.ResizeControlVariant.Handle, className: s2, style: l2, children: c3, color: u2, minWidth: d2 = 10, minHeight: h2 = 10, maxWidth: f2 = Number.MAX_VALUE, maxHeight: g2 = Number.MAX_VALUE, keepAspectRatio: p2 = false, resizeDirection: m3, autoScale: y3 = true, shouldResize: v2, onResizeStart: x3, onResize: w2, onResizeEnd: b2 }) {
8635
- const S2 = Ka(), C3 = "string" == typeof o2 ? o2 : S2, E2 = Ti(), M2 = n.useRef(null), N3 = a3 === e.ResizeControlVariant.Handle, k2 = $i(n.useCallback((_3 = N3 && y3, (e2) => _3 ? `${Math.max(1 / e2.transform[2], 1)}` : void 0), [N3, y3]), qi2);
8636
- var _3;
8312
+ const S2 = Ka(), C3 = "string" == typeof o2 ? o2 : S2, E2 = Ti(), M2 = n.useRef(null), N2 = a3 === e.ResizeControlVariant.Handle, k2 = $i(n.useCallback((_2 = N2 && y3, (e2) => _2 ? `${Math.max(1 / e2.transform[2], 1)}` : void 0), [N2, y3]), qi2);
8313
+ var _2;
8637
8314
  const P3 = n.useRef(null), z2 = i2 ?? Hl[a3];
8638
8315
  n.useEffect((() => {
8639
8316
  if (M2.current && C3) return P3.current || (P3.current = xi({ domNode: M2.current, nodeId: C3, getStoreItems: () => {
@@ -8667,7 +8344,7 @@ function requireUmd() {
8667
8344
  };
8668
8345
  }), [z2, d2, h2, f2, g2, p2, x3, w2, b2, v2]);
8669
8346
  const I2 = z2.split("-");
8670
- return t.jsx("div", { className: r(["react-flow__resize-control", "nodrag", ...I2, a3, s2]), ref: M2, style: { ...l2, scale: k2, ...u2 && { [N3 ? "backgroundColor" : "borderColor"]: u2 } }, children: c3 });
8347
+ return t.jsx("div", { className: r(["react-flow__resize-control", "nodrag", ...I2, a3, s2]), ref: M2, style: { ...l2, scale: k2, ...u2 && { [N2 ? "backgroundColor" : "borderColor"]: u2 } }, children: c3 });
8671
8348
  }));
8672
8349
  const Xl = (e2) => {
8673
8350
  var _a2;
@@ -13510,6 +13187,122 @@ ${component.description}` : `# ${nodeName}`;
13510
13187
  return library.connectionRules.filter((rule) => rule.from === fromNodeType && rule.to === toNodeType).map((rule) => rule.via);
13511
13188
  }
13512
13189
  }
13190
+ class U {
13191
+ constructor() {
13192
+ __publicField(this, "files", /* @__PURE__ */ new Map());
13193
+ __publicField(this, "binaryFiles", /* @__PURE__ */ new Map());
13194
+ }
13195
+ exists(j) {
13196
+ return this.files.has(j) || this.binaryFiles.has(j) || this.isDirectory(j);
13197
+ }
13198
+ readFile(j) {
13199
+ let k = this.files.get(j);
13200
+ if (k === void 0) throw new Error(`File not found: ${j}`);
13201
+ return k;
13202
+ }
13203
+ writeFile(j, k) {
13204
+ let q2 = this.dirname(j);
13205
+ if (q2 && q2 !== "/" && q2 !== j) this.createDir(q2);
13206
+ this.files.set(j, k);
13207
+ }
13208
+ deleteFile(j) {
13209
+ this.files.delete(j), this.binaryFiles.delete(j);
13210
+ }
13211
+ readBinaryFile(j) {
13212
+ let k = this.binaryFiles.get(j);
13213
+ if (k === void 0) throw new Error(`Binary file not found: ${j}`);
13214
+ return k;
13215
+ }
13216
+ writeBinaryFile(j, k) {
13217
+ let q2 = this.dirname(j);
13218
+ if (q2 && q2 !== "/" && q2 !== j) this.createDir(q2);
13219
+ this.binaryFiles.set(j, k);
13220
+ }
13221
+ createDir(j) {
13222
+ if (!j || j === "/") return;
13223
+ this.files.set(j + "/.dir", "");
13224
+ }
13225
+ readDir(j) {
13226
+ if ((this.files.has(j) || this.binaryFiles.has(j)) && !j.endsWith("/.dir")) throw new Error(`ENOTDIR: not a directory, scandir '${j}'`);
13227
+ if (!this.isDirectory(j)) throw new Error(`ENOENT: no such file or directory, scandir '${j}'`);
13228
+ let k = j.endsWith("/") ? j.slice(0, -1) : j, q2 = k === "/" ? "" : `${k}/`, E = /* @__PURE__ */ new Set();
13229
+ for (let J of this.files.keys()) if (J.startsWith(q2)) {
13230
+ let O = J.slice(q2.length);
13231
+ if (O) {
13232
+ if (O === ".dir") continue;
13233
+ if (O.endsWith("/.dir")) {
13234
+ let X2 = O.slice(0, -5).split("/")[0];
13235
+ if (X2) E.add(X2);
13236
+ } else {
13237
+ let X2 = O.split("/")[0];
13238
+ if (X2 && X2 !== ".dir") E.add(X2);
13239
+ }
13240
+ }
13241
+ }
13242
+ for (let J of this.binaryFiles.keys()) if (J.startsWith(q2)) {
13243
+ let O = J.slice(q2.length);
13244
+ if (O) {
13245
+ let X2 = O.split("/");
13246
+ if (X2[0]) E.add(X2[0]);
13247
+ }
13248
+ }
13249
+ return Array.from(E);
13250
+ }
13251
+ deleteDir(j) {
13252
+ let k = `${j}/`;
13253
+ for (let q2 of this.files.keys()) if (q2.startsWith(k) || q2 === j + "/.dir") this.files.delete(q2);
13254
+ for (let q2 of this.binaryFiles.keys()) if (q2.startsWith(k)) this.binaryFiles.delete(q2);
13255
+ }
13256
+ join(...j) {
13257
+ return j.join("/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
13258
+ }
13259
+ dirname(j) {
13260
+ let k = j.lastIndexOf("/");
13261
+ return k <= 0 ? "/" : j.slice(0, k);
13262
+ }
13263
+ isAbsolute(j) {
13264
+ return j.startsWith("/");
13265
+ }
13266
+ relative(j, k) {
13267
+ if (k.startsWith(j)) return k.slice(j.length + 1);
13268
+ return k;
13269
+ }
13270
+ isDirectory(j) {
13271
+ if (this.files.has(j + "/.dir")) return true;
13272
+ let k = `${j}/`;
13273
+ for (let q2 of this.files.keys()) if (q2.startsWith(k)) return true;
13274
+ for (let q2 of this.binaryFiles.keys()) if (q2.startsWith(k)) return true;
13275
+ return false;
13276
+ }
13277
+ normalizeRepositoryPath(j) {
13278
+ let k = j;
13279
+ while (k && k !== "/") {
13280
+ if (this.exists(this.join(k, ".git"))) return k;
13281
+ k = this.dirname(k);
13282
+ }
13283
+ throw new Error(`Not a git repository: ${j}`);
13284
+ }
13285
+ findProjectRoot(j) {
13286
+ return this.normalizeRepositoryPath(j);
13287
+ }
13288
+ getRepositoryName(j) {
13289
+ let k = j.split("/").filter((q2) => q2);
13290
+ return k[k.length - 1] || "root";
13291
+ }
13292
+ clear() {
13293
+ this.files.clear(), this.binaryFiles.clear();
13294
+ }
13295
+ getFiles() {
13296
+ return new Map(this.files);
13297
+ }
13298
+ setupTestRepo(j) {
13299
+ this.createDir(j), this.createDir(this.join(j, ".git")), this.createDir(this.join(j, ".alexandria"));
13300
+ }
13301
+ debug() {
13302
+ console.log("InMemory FileSystem Contents:");
13303
+ for (let [j, k] of this.files.entries()) if (!j.endsWith("/.dir")) console.log(` ${j}: ${k.length} bytes`);
13304
+ }
13305
+ }
13513
13306
  function normalizeSeverity(severity) {
13514
13307
  if (typeof severity === "number") {
13515
13308
  switch (severity) {
@@ -53571,17 +53364,17 @@ function forceCenter(x2, y2) {
53571
53364
  node = nodes[i], node.x -= sx, node.y -= sy;
53572
53365
  }
53573
53366
  }
53574
- force.initialize = function(_2) {
53575
- nodes = _2;
53367
+ force.initialize = function(_) {
53368
+ nodes = _;
53576
53369
  };
53577
- force.x = function(_2) {
53578
- return arguments.length ? (x2 = +_2, force) : x2;
53370
+ force.x = function(_) {
53371
+ return arguments.length ? (x2 = +_, force) : x2;
53579
53372
  };
53580
- force.y = function(_2) {
53581
- return arguments.length ? (y2 = +_2, force) : y2;
53373
+ force.y = function(_) {
53374
+ return arguments.length ? (y2 = +_, force) : y2;
53582
53375
  };
53583
- force.strength = function(_2) {
53584
- return arguments.length ? (strength = +_2, force) : strength;
53376
+ force.strength = function(_) {
53377
+ return arguments.length ? (strength = +_, force) : strength;
53585
53378
  };
53586
53379
  return force;
53587
53380
  }
@@ -53673,8 +53466,8 @@ function tree_data() {
53673
53466
  });
53674
53467
  return data;
53675
53468
  }
53676
- function tree_extent(_2) {
53677
- return arguments.length ? this.cover(+_2[0][0], +_2[0][1]).cover(+_2[1][0], +_2[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
53469
+ function tree_extent(_) {
53470
+ return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
53678
53471
  }
53679
53472
  function Quad(node, x0, y0, x1, y1) {
53680
53473
  this.node = node;
@@ -53795,14 +53588,14 @@ function tree_visitAfter(callback) {
53795
53588
  function defaultX(d) {
53796
53589
  return d[0];
53797
53590
  }
53798
- function tree_x(_2) {
53799
- return arguments.length ? (this._x = _2, this) : this._x;
53591
+ function tree_x(_) {
53592
+ return arguments.length ? (this._x = _, this) : this._x;
53800
53593
  }
53801
53594
  function defaultY(d) {
53802
53595
  return d[1];
53803
53596
  }
53804
- function tree_y(_2) {
53805
- return arguments.length ? (this._y = _2, this) : this._y;
53597
+ function tree_y(_) {
53598
+ return arguments.length ? (this._y = _, this) : this._y;
53806
53599
  }
53807
53600
  function quadtree(nodes, x2, y2) {
53808
53601
  var tree = new Quadtree(x2 == null ? defaultX : x2, y2 == null ? defaultY : y2, NaN, NaN, NaN, NaN);
@@ -53920,14 +53713,14 @@ function forceCollide(radius) {
53920
53713
  random = _random;
53921
53714
  initialize();
53922
53715
  };
53923
- force.iterations = function(_2) {
53924
- return arguments.length ? (iterations = +_2, force) : iterations;
53716
+ force.iterations = function(_) {
53717
+ return arguments.length ? (iterations = +_, force) : iterations;
53925
53718
  };
53926
- force.strength = function(_2) {
53927
- return arguments.length ? (strength = +_2, force) : strength;
53719
+ force.strength = function(_) {
53720
+ return arguments.length ? (strength = +_, force) : strength;
53928
53721
  };
53929
- force.radius = function(_2) {
53930
- return arguments.length ? (radius = typeof _2 === "function" ? _2 : constant(+_2), initialize(), force) : radius;
53722
+ force.radius = function(_) {
53723
+ return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius;
53931
53724
  };
53932
53725
  return force;
53933
53726
  }
@@ -53994,34 +53787,34 @@ function forceLink(links) {
53994
53787
  random = _random;
53995
53788
  initialize();
53996
53789
  };
53997
- force.links = function(_2) {
53998
- return arguments.length ? (links = _2, initialize(), force) : links;
53790
+ force.links = function(_) {
53791
+ return arguments.length ? (links = _, initialize(), force) : links;
53999
53792
  };
54000
- force.id = function(_2) {
54001
- return arguments.length ? (id = _2, force) : id;
53793
+ force.id = function(_) {
53794
+ return arguments.length ? (id = _, force) : id;
54002
53795
  };
54003
- force.iterations = function(_2) {
54004
- return arguments.length ? (iterations = +_2, force) : iterations;
53796
+ force.iterations = function(_) {
53797
+ return arguments.length ? (iterations = +_, force) : iterations;
54005
53798
  };
54006
- force.strength = function(_2) {
54007
- return arguments.length ? (strength = typeof _2 === "function" ? _2 : constant(+_2), initializeStrength(), force) : strength;
53799
+ force.strength = function(_) {
53800
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength;
54008
53801
  };
54009
- force.distance = function(_2) {
54010
- return arguments.length ? (distance = typeof _2 === "function" ? _2 : constant(+_2), initializeDistance(), force) : distance;
53802
+ force.distance = function(_) {
53803
+ return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance;
54011
53804
  };
54012
53805
  return force;
54013
53806
  }
54014
53807
  var noop = { value: () => {
54015
53808
  } };
54016
53809
  function dispatch() {
54017
- for (var i = 0, n = arguments.length, _2 = {}, t; i < n; ++i) {
54018
- if (!(t = arguments[i] + "") || t in _2 || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
54019
- _2[t] = [];
53810
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
53811
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
53812
+ _[t] = [];
54020
53813
  }
54021
- return new Dispatch(_2);
53814
+ return new Dispatch(_);
54022
53815
  }
54023
- function Dispatch(_2) {
54024
- this._ = _2;
53816
+ function Dispatch(_) {
53817
+ this._ = _;
54025
53818
  }
54026
53819
  function parseTypenames(typenames, types) {
54027
53820
  return typenames.trim().split(/^|\s+/).map(function(t) {
@@ -54034,21 +53827,21 @@ function parseTypenames(typenames, types) {
54034
53827
  Dispatch.prototype = dispatch.prototype = {
54035
53828
  constructor: Dispatch,
54036
53829
  on: function(typename, callback) {
54037
- var _2 = this._, T2 = parseTypenames(typename + "", _2), t, i = -1, n = T2.length;
53830
+ var _ = this._, T2 = parseTypenames(typename + "", _), t, i = -1, n = T2.length;
54038
53831
  if (arguments.length < 2) {
54039
- while (++i < n) if ((t = (typename = T2[i]).type) && (t = get(_2[t], typename.name))) return t;
53832
+ while (++i < n) if ((t = (typename = T2[i]).type) && (t = get(_[t], typename.name))) return t;
54040
53833
  return;
54041
53834
  }
54042
53835
  if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
54043
53836
  while (++i < n) {
54044
- if (t = (typename = T2[i]).type) _2[t] = set(_2[t], typename.name, callback);
54045
- else if (callback == null) for (t in _2) _2[t] = set(_2[t], typename.name, null);
53837
+ if (t = (typename = T2[i]).type) _[t] = set(_[t], typename.name, callback);
53838
+ else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
54046
53839
  }
54047
53840
  return this;
54048
53841
  },
54049
53842
  copy: function() {
54050
- var copy = {}, _2 = this._;
54051
- for (var t in _2) copy[t] = _2[t].slice();
53843
+ var copy = {}, _ = this._;
53844
+ for (var t in _) copy[t] = _[t].slice();
54052
53845
  return new Dispatch(copy);
54053
53846
  },
54054
53847
  call: function(type2, that) {
@@ -54239,29 +54032,29 @@ function forceSimulation(nodes) {
54239
54032
  stop: function() {
54240
54033
  return stepper.stop(), simulation;
54241
54034
  },
54242
- nodes: function(_2) {
54243
- return arguments.length ? (nodes = _2, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;
54035
+ nodes: function(_) {
54036
+ return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;
54244
54037
  },
54245
- alpha: function(_2) {
54246
- return arguments.length ? (alpha = +_2, simulation) : alpha;
54038
+ alpha: function(_) {
54039
+ return arguments.length ? (alpha = +_, simulation) : alpha;
54247
54040
  },
54248
- alphaMin: function(_2) {
54249
- return arguments.length ? (alphaMin = +_2, simulation) : alphaMin;
54041
+ alphaMin: function(_) {
54042
+ return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
54250
54043
  },
54251
- alphaDecay: function(_2) {
54252
- return arguments.length ? (alphaDecay = +_2, simulation) : +alphaDecay;
54044
+ alphaDecay: function(_) {
54045
+ return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
54253
54046
  },
54254
- alphaTarget: function(_2) {
54255
- return arguments.length ? (alphaTarget = +_2, simulation) : alphaTarget;
54047
+ alphaTarget: function(_) {
54048
+ return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
54256
54049
  },
54257
- velocityDecay: function(_2) {
54258
- return arguments.length ? (velocityDecay = 1 - _2, simulation) : 1 - velocityDecay;
54050
+ velocityDecay: function(_) {
54051
+ return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
54259
54052
  },
54260
- randomSource: function(_2) {
54261
- return arguments.length ? (random = _2, forces.forEach(initializeForce), simulation) : random;
54053
+ randomSource: function(_) {
54054
+ return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;
54262
54055
  },
54263
- force: function(name, _2) {
54264
- return arguments.length > 1 ? (_2 == null ? forces.delete(name) : forces.set(name, initializeForce(_2)), simulation) : forces.get(name);
54056
+ force: function(name, _) {
54057
+ return arguments.length > 1 ? (_ == null ? forces.delete(name) : forces.set(name, initializeForce(_)), simulation) : forces.get(name);
54265
54058
  },
54266
54059
  find: function(x2, y2, radius) {
54267
54060
  var i = 0, n = nodes.length, dx, dy, d2, node, closest;
@@ -54276,16 +54069,16 @@ function forceSimulation(nodes) {
54276
54069
  }
54277
54070
  return closest;
54278
54071
  },
54279
- on: function(name, _2) {
54280
- return arguments.length > 1 ? (event.on(name, _2), simulation) : event.on(name);
54072
+ on: function(name, _) {
54073
+ return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
54281
54074
  }
54282
54075
  };
54283
54076
  }
54284
54077
  function forceManyBody() {
54285
54078
  var nodes, node, random, alpha, strength = constant(-30), strengths, distanceMin2 = 1, distanceMax2 = Infinity, theta2 = 0.81;
54286
- function force(_2) {
54079
+ function force(_) {
54287
54080
  var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);
54288
- for (alpha = _2, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
54081
+ for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
54289
54082
  }
54290
54083
  function initialize() {
54291
54084
  if (!nodes) return;
@@ -54313,7 +54106,7 @@ function forceManyBody() {
54313
54106
  }
54314
54107
  quad.value = strength2;
54315
54108
  }
54316
- function apply(quad, x1, _2, x2) {
54109
+ function apply(quad, x1, _, x2) {
54317
54110
  if (!quad.value) return true;
54318
54111
  var x3 = quad.x - node.x, y2 = quad.y - node.y, w = x2 - x1, l = x3 * x3 + y2 * y2;
54319
54112
  if (w * w / theta2 < l) {
@@ -54344,17 +54137,17 @@ function forceManyBody() {
54344
54137
  random = _random;
54345
54138
  initialize();
54346
54139
  };
54347
- force.strength = function(_2) {
54348
- return arguments.length ? (strength = typeof _2 === "function" ? _2 : constant(+_2), initialize(), force) : strength;
54140
+ force.strength = function(_) {
54141
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength;
54349
54142
  };
54350
- force.distanceMin = function(_2) {
54351
- return arguments.length ? (distanceMin2 = _2 * _2, force) : Math.sqrt(distanceMin2);
54143
+ force.distanceMin = function(_) {
54144
+ return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
54352
54145
  };
54353
- force.distanceMax = function(_2) {
54354
- return arguments.length ? (distanceMax2 = _2 * _2, force) : Math.sqrt(distanceMax2);
54146
+ force.distanceMax = function(_) {
54147
+ return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
54355
54148
  };
54356
- force.theta = function(_2) {
54357
- return arguments.length ? (theta2 = _2 * _2, force) : Math.sqrt(theta2);
54149
+ force.theta = function(_) {
54150
+ return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
54358
54151
  };
54359
54152
  return force;
54360
54153
  }
@@ -54476,12 +54269,12 @@ var pe = H((iu, fr) => {
54476
54269
  for (var f = 1, p = 0; p < r; p += 1) {
54477
54270
  var m2 = t[p], g = m2.index;
54478
54271
  this.rowByVarIndex[g] = f, this.colByVarIndex[g] = -1, this.varIndexByRow[f] = g;
54479
- var c2, b, y2, h = m2.terms, N2 = h.length, v = this.matrix[f++];
54272
+ var c2, b, y2, h = m2.terms, N = h.length, v = this.matrix[f++];
54480
54273
  if (m2.isUpperBound) {
54481
- for (c2 = 0; c2 < N2; c2 += 1) b = h[c2], y2 = this.colByVarIndex[b.variable.index], v[y2] = b.coefficient;
54274
+ for (c2 = 0; c2 < N; c2 += 1) b = h[c2], y2 = this.colByVarIndex[b.variable.index], v[y2] = b.coefficient;
54482
54275
  v[0] = m2.rhs;
54483
54276
  } else {
54484
- for (c2 = 0; c2 < N2; c2 += 1) b = h[c2], y2 = this.colByVarIndex[b.variable.index], v[y2] = -b.coefficient;
54277
+ for (c2 = 0; c2 < N; c2 += 1) b = h[c2], y2 = this.colByVarIndex[b.variable.index], v[y2] = -b.coefficient;
54485
54278
  v[0] = -m2.rhs;
54486
54279
  }
54487
54280
  }
@@ -54532,8 +54325,8 @@ var cr = H(() => {
54532
54325
  if (p === 0) return this.feasible = false, s;
54533
54326
  if (e) {
54534
54327
  t.push([this.varIndexByRow[u], this.varIndexByCol[p]]);
54535
- var N2 = this.checkForCycles(t);
54536
- if (N2.length > 0) return this.model.messages.push("Cycle in phase 1"), this.model.messages.push("Start :" + N2[0]), this.model.messages.push("Length :" + N2[1]), this.feasible = false, s;
54328
+ var N = this.checkForCycles(t);
54329
+ if (N.length > 0) return this.model.messages.push("Cycle in phase 1"), this.model.messages.push("Start :" + N[0]), this.model.messages.push("Length :" + N[1]), this.feasible = false, s;
54537
54330
  }
54538
54331
  this.pivot(u, p), s += 1;
54539
54332
  }
@@ -54554,10 +54347,10 @@ var cr = H(() => {
54554
54347
  l > g && (g = l, m2 = b, c2 = false);
54555
54348
  }
54556
54349
  if (s > 0) for (var y2 = 0; m2 === 0 && u.length > 0 && y2 < s; ) {
54557
- var h = [], N2 = this.optionalObjectives[y2].reducedCosts;
54350
+ var h = [], N = this.optionalObjectives[y2].reducedCosts;
54558
54351
  g = a2;
54559
54352
  for (var v = 0; v < u.length; v++) {
54560
- if (b = u[v], l = N2[b], f = this.unrestrictedVars[this.varIndexByCol[b]] === true, -a2 < l && l < a2) {
54353
+ if (b = u[v], l = N[b], f = this.unrestrictedVars[this.varIndexByCol[b]] === true, -a2 < l && l < a2) {
54561
54354
  h.push(b);
54562
54355
  continue;
54563
54356
  }
@@ -54606,10 +54399,10 @@ var cr = H(() => {
54606
54399
  }
54607
54400
  var y2 = this.optionalObjectives.length;
54608
54401
  if (y2 > 0) for (var h = 0; h < y2; h += 1) {
54609
- var N2 = this.optionalObjectives[h].reducedCosts;
54610
- if (f = N2[t], f !== 0) {
54611
- for (p = 0; p < d; p++) l = dn[p], m2 = u[l], m2 !== 0 && (N2[l] = N2[l] - f * m2);
54612
- N2[t] = -f / r;
54402
+ var N = this.optionalObjectives[h].reducedCosts;
54403
+ if (f = N[t], f !== 0) {
54404
+ for (p = 0; p < d; p++) l = dn[p], m2 = u[l], m2 !== 0 && (N[l] = N[l] - f * m2);
54405
+ N[t] = -f / r;
54613
54406
  }
54614
54407
  }
54615
54408
  };
@@ -54896,9 +54689,9 @@ var br = H(() => {
54896
54689
  var n = 5, r = "", i = [" "], o, a2, u, d, l, f, p, g, c2, b, y2;
54897
54690
  for (a2 = 1; a2 < this.width; a2 += 1) l = this.varIndexByCol[a2], d = this.variablesPerIndex[l], d === void 0 ? f = "c" + l : f = d.id, p = f.length, g = " ", c2 = " ", p > 5 ? g += " " : c2 += " ", i[a2] = g, r += c2 + f;
54898
54691
  console.log(r);
54899
- var h, N2 = this.matrix[this.costRowIndex], v = " ";
54900
- for (o = 1; o < this.width; o += 1) h = " ", v += h, v += i[o], v += N2[o].toFixed(n);
54901
- for (h = " ", v += h + i[0] + N2[0].toFixed(n), console.log(v + " Z"), u = 1; u < this.height; u += 1) {
54692
+ var h, N = this.matrix[this.costRowIndex], v = " ";
54693
+ for (o = 1; o < this.width; o += 1) h = " ", v += h, v += i[o], v += N[o].toFixed(n);
54694
+ for (h = " ", v += h + i[0] + N[0].toFixed(n), console.log(v + " Z"), u = 1; u < this.height; u += 1) {
54902
54695
  for (b = this.matrix[u], y2 = " ", a2 = 1; a2 < this.width; a2 += 1) h = " ", y2 += h + i[a2] + b[a2].toFixed(n);
54903
54696
  h = " ", y2 += h + i[0] + b[0].toFixed(n), l = this.varIndexByRow[u], d = this.variablesPerIndex[l], d === void 0 ? f = "c" + l : f = d.id, console.log(y2 + " " + f);
54904
54697
  }
@@ -55069,14 +54862,14 @@ var mn = H(() => {
55069
54862
  for (var c2 = 0; c2 < this.optionalObjectives.length; c2 += 1) s[c2] = this.optionalObjectives[c2].reducedCosts[0];
55070
54863
  } else {
55071
54864
  t === 1 && this.save();
55072
- for (var b = this.getMostFractionalVar(), y2 = b.index, h = [], N2 = [], v = f.length, L = 0; L < v; L += 1) {
54865
+ for (var b = this.getMostFractionalVar(), y2 = b.index, h = [], N = [], v = f.length, L = 0; L < v; L += 1) {
55073
54866
  var k = f[L];
55074
- k.varIndex === y2 ? k.type === "min" ? N2.push(k) : h.push(k) : (h.push(k), N2.push(k));
54867
+ k.varIndex === y2 ? k.type === "min" ? N.push(k) : h.push(k) : (h.push(k), N.push(k));
55075
54868
  }
55076
54869
  var w = Math.ceil(b.value), S = Math.floor(b.value), O = new Or("min", y2, w);
55077
54870
  h.push(O);
55078
54871
  var I = new Or("max", y2, S);
55079
- N2.push(I), e.push(new hn(p, h)), e.push(new hn(p, N2)), e.sort(hi);
54872
+ N.push(I), e.push(new hn(p, h)), e.push(new hn(p, N)), e.sort(hi);
55080
54873
  }
55081
54874
  }
55082
54875
  }
@@ -55189,10 +54982,10 @@ var Gr = H((Su, Tr) => {
55189
54982
  m2 && h.relax(f, p);
55190
54983
  }
55191
54984
  }
55192
- var N2 = Object.keys(t), v = N2.length;
54985
+ var N = Object.keys(t), v = N.length;
55193
54986
  this.tolerance = e.tolerance || 0, e.timeout && (this.timeout = e.timeout), e.options && (e.options.timeout && (this.timeout = e.options.timeout), this.tolerance === 0 && (this.tolerance = e.options.tolerance || 0), e.options.useMIRCuts && (this.useMIRCuts = e.options.useMIRCuts), typeof e.options.exitOnCycles == "undefined" ? this.checkForCycles = true : this.checkForCycles = e.options.exitOnCycles);
55194
54987
  for (var L = e.ints || {}, k = e.binaries || {}, w = e.unrestricted || {}, S = e.optimize, O = 0; O < v; O += 1) {
55195
- var I = N2[O], z = t[I], M = z[S] || 0, $ = !!k[I], _2 = !!L[I] || $, W = !!w[I], B = this.addVariable(M, I, _2, W);
54988
+ var I = N[O], z = t[I], M = z[S] || 0, $ = !!k[I], _ = !!L[I] || $, W = !!w[I], B = this.addVariable(M, I, _, W);
55196
54989
  $ && this.smallerThan(1).addTerm(1, B);
55197
54990
  var Z = Object.keys(z);
55198
54991
  for (s = 0; s < Z.length; s += 1) {
@@ -55472,7 +55265,7 @@ var to = H((td, eo) => {
55472
55265
  var ro = H((nd, no) => {
55473
55266
  var xn = Jr(), Gi = Kr(), Mi = Xr(), Ri = to();
55474
55267
  function zi(e, t, n, r, i, o, a2, s, u, d, l, f, p, m2 = 0, g, c2, b) {
55475
- let y2, h, N2, v, L, k, w, S, O, I, z, M, $, _2, W = Math.min(r, l), B = 2 * r + W * (W + 5) / 2 + 2 * l + 1;
55268
+ let y2, h, N, v, L, k, w, S, O, I, z, M, $, _, W = Math.min(r, l), B = 2 * r + W * (W + 5) / 2 + 2 * l + 1;
55476
55269
  for (let x2 = 1; x2 <= r; x2 += 1) c2[x2] = t[x2];
55477
55270
  for (let x2 = r + 1; x2 <= B; x2 += 1) c2[x2] = 0;
55478
55271
  for (let x2 = 1; x2 <= l; x2 += 1) p[x2] = 0, o[x2] = 0;
@@ -55486,23 +55279,23 @@ var ro = H((nd, no) => {
55486
55279
  } else {
55487
55280
  for (let x2 = 1; x2 <= r; x2 += 1) {
55488
55281
  i[x2] = 0;
55489
- for (let G2 = 1; G2 <= x2; G2 += 1) i[x2] += e[G2][x2] * t[G2];
55282
+ for (let G = 1; G <= x2; G += 1) i[x2] += e[G][x2] * t[G];
55490
55283
  }
55491
55284
  for (let x2 = 1; x2 <= r; x2 += 1) {
55492
55285
  t[x2] = 0;
55493
- for (let G2 = x2; G2 <= r; G2 += 1) t[x2] += e[x2][G2] * i[G2];
55286
+ for (let G = x2; G <= r; G += 1) t[x2] += e[x2][G] * i[G];
55494
55287
  }
55495
55288
  }
55496
55289
  a2[1] = 0;
55497
55290
  for (let x2 = 1; x2 <= r; x2 += 1) {
55498
55291
  i[x2] = t[x2], a2[1] += c2[x2] * i[x2], c2[x2] = 0;
55499
- for (let G2 = x2 + 1; G2 <= r; G2 += 1) e[G2][x2] = 0;
55292
+ for (let G = x2 + 1; G <= r; G += 1) e[G][x2] = 0;
55500
55293
  }
55501
55294
  a2[1] = -a2[1] / 2, b[1] = 0;
55502
55295
  let E = r, j = E + r, U2 = j + W, ne = U2 + W + 1, ee = ne + W * (W + 1) / 2, ve = ee + l;
55503
55296
  for (let x2 = 1; x2 <= l; x2 += 1) {
55504
55297
  k = 0;
55505
- for (let G2 = 1; G2 <= r; G2 += 1) k += s[G2][x2] * s[G2][x2];
55298
+ for (let G = 1; G <= r; G += 1) k += s[G][x2] * s[G][x2];
55506
55299
  c2[ve + x2] = Math.sqrt(k);
55507
55300
  }
55508
55301
  v = m2, g[1] = 0, g[2] = 0;
@@ -55510,17 +55303,17 @@ var ro = H((nd, no) => {
55510
55303
  g[1] += 1, B = ee;
55511
55304
  for (let x2 = 1; x2 <= l; x2 += 1) {
55512
55305
  B += 1, k = -u[x2];
55513
- for (let G2 = 1; G2 <= r; G2 += 1) k += s[G2][x2] * i[G2];
55306
+ for (let G = 1; G <= r; G += 1) k += s[G][x2] * i[G];
55514
55307
  if (Math.abs(k) < xn && (k = 0), x2 > f) c2[B] = k;
55515
55308
  else if (c2[B] = -Math.abs(k), k > 0) {
55516
- for (let G2 = 1; G2 <= r; G2 += 1) s[G2][x2] = -s[G2][x2];
55309
+ for (let G = 1; G <= r; G += 1) s[G][x2] = -s[G][x2];
55517
55310
  u[x2] = -u[x2];
55518
55311
  }
55519
55312
  }
55520
55313
  for (let x2 = 1; x2 <= v; x2 += 1) c2[ee + p[x2]] = 0;
55521
- N2 = 0, L = 0;
55522
- for (let x2 = 1; x2 <= l; x2 += 1) c2[ee + x2] < L * c2[ve + x2] && (N2 = x2, L = c2[ee + x2] / c2[ve + x2]);
55523
- if (N2 === 0) {
55314
+ N = 0, L = 0;
55315
+ for (let x2 = 1; x2 <= l; x2 += 1) c2[ee + x2] < L * c2[ve + x2] && (N = x2, L = c2[ee + x2] / c2[ve + x2]);
55316
+ if (N === 0) {
55524
55317
  for (let x2 = 1; x2 <= v; x2 += 1) o[p[x2]] = c2[U2 + x2];
55525
55318
  return 999;
55526
55319
  }
@@ -55529,16 +55322,16 @@ var ro = H((nd, no) => {
55529
55322
  function To() {
55530
55323
  for (let x2 = 1; x2 <= r; x2 += 1) {
55531
55324
  k = 0;
55532
- for (let G2 = 1; G2 <= r; G2 += 1) k += e[G2][x2] * s[G2][N2];
55325
+ for (let G = 1; G <= r; G += 1) k += e[G][x2] * s[G][N];
55533
55326
  c2[x2] = k;
55534
55327
  }
55535
55328
  y2 = E;
55536
55329
  for (let x2 = 1; x2 <= r; x2 += 1) c2[y2 + x2] = 0;
55537
- for (let x2 = v + 1; x2 <= r; x2 += 1) for (let G2 = 1; G2 <= r; G2 += 1) c2[y2 + G2] = c2[y2 + G2] + e[G2][x2] * c2[x2];
55330
+ for (let x2 = v + 1; x2 <= r; x2 += 1) for (let G = 1; G <= r; G += 1) c2[y2 + G] = c2[y2 + G] + e[G][x2] * c2[x2];
55538
55331
  M = true;
55539
55332
  for (let x2 = v; x2 >= 1; x2 -= 1) {
55540
55333
  k = c2[x2], B = ne + x2 * (x2 + 3) / 2, y2 = B - x2;
55541
- for (let G2 = x2 + 1; G2 <= v; G2 += 1) k -= c2[B] * c2[j + G2], B += G2;
55334
+ for (let G = x2 + 1; G <= v; G += 1) k -= c2[B] * c2[j + G], B += G;
55542
55335
  k /= c2[y2], c2[j + x2] = k, !(p[x2] <= f) && (k <= 0 || (M = false, h = x2));
55543
55336
  }
55544
55337
  if (!M) {
@@ -55553,32 +55346,32 @@ var ro = H((nd, no) => {
55553
55346
  return c2[U2 + v + 1] = c2[U2 + v + 1] + w, 700;
55554
55347
  }
55555
55348
  k = 0;
55556
- for (let x2 = 1; x2 <= r; x2 += 1) k += c2[E + x2] * s[x2][N2];
55557
- S = -c2[ee + N2] / k, $ = true, M || w < S && (S = w, $ = false);
55349
+ for (let x2 = 1; x2 <= r; x2 += 1) k += c2[E + x2] * s[x2][N];
55350
+ S = -c2[ee + N] / k, $ = true, M || w < S && (S = w, $ = false);
55558
55351
  for (let x2 = 1; x2 <= r; x2 += 1) i[x2] += S * c2[E + x2], Math.abs(i[x2]) < xn && (i[x2] = 0);
55559
55352
  a2[1] += S * k * (S / 2 + c2[U2 + v + 1]);
55560
55353
  for (let x2 = 1; x2 <= v; x2 += 1) c2[U2 + x2] = c2[U2 + x2] - S * c2[j + x2];
55561
55354
  if (c2[U2 + v + 1] = c2[U2 + v + 1] + S, $) {
55562
- v += 1, p[v] = N2, B = ne + (v - 1) * v / 2 + 1;
55355
+ v += 1, p[v] = N, B = ne + (v - 1) * v / 2 + 1;
55563
55356
  for (let x2 = 1; x2 <= v - 1; x2 += 1) c2[B] = c2[x2], B += 1;
55564
55357
  if (v === r) c2[B] = c2[r];
55565
55358
  else {
55566
55359
  for (let x2 = r; x2 >= v + 1; x2 -= 1) if (c2[x2] !== 0 && (O = Math.max(Math.abs(c2[x2 - 1]), Math.abs(c2[x2])), I = Math.min(Math.abs(c2[x2 - 1]), Math.abs(c2[x2])), c2[x2 - 1] >= 0 ? L = Math.abs(O * Math.sqrt(1 + I * I / (O * O))) : L = -Math.abs(O * Math.sqrt(1 + I * I / (O * O))), O = c2[x2 - 1] / L, I = c2[x2] / L, O !== 1)) if (O === 0) {
55567
55360
  c2[x2 - 1] = I * L;
55568
- for (let G2 = 1; G2 <= r; G2 += 1) L = e[G2][x2 - 1], e[G2][x2 - 1] = e[G2][x2], e[G2][x2] = L;
55361
+ for (let G = 1; G <= r; G += 1) L = e[G][x2 - 1], e[G][x2 - 1] = e[G][x2], e[G][x2] = L;
55569
55362
  } else {
55570
55363
  c2[x2 - 1] = L, z = I / (1 + O);
55571
- for (let G2 = 1; G2 <= r; G2 += 1) L = O * e[G2][x2 - 1] + I * e[G2][x2], e[G2][x2] = z * (e[G2][x2 - 1] + L) - e[G2][x2], e[G2][x2 - 1] = L;
55364
+ for (let G = 1; G <= r; G += 1) L = O * e[G][x2 - 1] + I * e[G][x2], e[G][x2] = z * (e[G][x2 - 1] + L) - e[G][x2], e[G][x2 - 1] = L;
55572
55365
  }
55573
55366
  c2[B] = c2[v];
55574
55367
  }
55575
55368
  } else {
55576
- k = -u[N2];
55577
- for (let x2 = 1; x2 <= r; x2 += 1) k += i[x2] * s[x2][N2];
55578
- if (N2 > f) c2[ee + N2] = k;
55579
- else if (c2[ee + N2] = -Math.abs(k), k > 0) {
55580
- for (let x2 = 1; x2 <= r; x2 += 1) s[x2][N2] = -s[x2][N2];
55581
- u[N2] = -u[N2];
55369
+ k = -u[N];
55370
+ for (let x2 = 1; x2 <= r; x2 += 1) k += i[x2] * s[x2][N];
55371
+ if (N > f) c2[ee + N] = k;
55372
+ else if (c2[ee + N] = -Math.abs(k), k > 0) {
55373
+ for (let x2 = 1; x2 <= r; x2 += 1) s[x2][N] = -s[x2][N];
55374
+ u[N] = -u[N];
55582
55375
  }
55583
55376
  return 700;
55584
55377
  }
@@ -55604,13 +55397,13 @@ var ro = H((nd, no) => {
55604
55397
  function Pn() {
55605
55398
  return c2[U2 + v] = c2[U2 + v + 1], c2[U2 + v + 1] = 0, p[v] = 0, v -= 1, g[2] += 1, 0;
55606
55399
  }
55607
- for (_2 = 0; ; ) {
55608
- if (_2 = Co(), _2 === 999) return;
55609
- for (; _2 = To(), _2 !== 0; ) {
55610
- if (_2 === 999) return;
55611
- if (_2 === 700) if (h === v) Pn();
55400
+ for (_ = 0; ; ) {
55401
+ if (_ = Co(), _ === 999) return;
55402
+ for (; _ = To(), _ !== 0; ) {
55403
+ if (_ === 999) return;
55404
+ if (_ === 700) if (h === v) Pn();
55612
55405
  else {
55613
- for (; Go(), _2 = Mo(), _2 === 797; ) ;
55406
+ for (; Go(), _ = Mo(), _ === 797; ) ;
55614
55407
  Pn();
55615
55408
  }
55616
55409
  }
@@ -55697,8 +55490,8 @@ function Ht(e, t, n) {
55697
55490
  if (a2.filter && (f = f.filter((m2) => a2.filter(o, m2))), f.length === 0) return "{}";
55698
55491
  r.push(o);
55699
55492
  let p = "{" + d.newline + f.map((m2, g) => {
55700
- let c2 = f.length - 1 === g ? d.newline : "," + d.newlineOrSpace, b = typeof m2 == "symbol", y2 = !b && /^[a-z$_][$\w]*$/i.test(m2), h = b || y2 ? m2 : i(m2, a2), N2 = i(o[m2], a2, s + u);
55701
- return a2.transform && (N2 = a2.transform(o, m2, N2)), d.indent + String(h) + ": " + N2 + c2;
55493
+ let c2 = f.length - 1 === g ? d.newline : "," + d.newlineOrSpace, b = typeof m2 == "symbol", y2 = !b && /^[a-z$_][$\w]*$/i.test(m2), h = b || y2 ? m2 : i(m2, a2), N = i(o[m2], a2, s + u);
55494
+ return a2.transform && (N = a2.transform(o, m2, N)), d.indent + String(h) + ": " + N + c2;
55702
55495
  }).join("") + d.pad + "}";
55703
55496
  return r.pop(), l(p);
55704
55497
  }
@@ -55814,33 +55607,33 @@ function Jn(e) {
55814
55607
  function Yn(e, t = () => {
55815
55608
  }) {
55816
55609
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), a2 = [], s = [];
55817
- function u(N2) {
55818
- return N2 === -1 / 0 ? i : N2 === 1 / 0 ? o : N2 <= 0 ? Zn(a2, -N2) : Zn(s, N2 - 1);
55610
+ function u(N) {
55611
+ return N === -1 / 0 ? i : N === 1 / 0 ? o : N <= 0 ? Zn(a2, -N) : Zn(s, N - 1);
55819
55612
  }
55820
- for (let N2 of e) {
55821
- let v = N2.nparentLinks(), L = N2.nchildLinks(), k = new Kt(N2, v, L), w = t(N2);
55822
- n.set(N2, k), w === void 0 ? (k.stat = "active", u(k.bucket()).add(k)) : ut(r, w, k);
55613
+ for (let N of e) {
55614
+ let v = N.nparentLinks(), L = N.nchildLinks(), k = new Kt(N, v, L), w = t(N);
55615
+ n.set(N, k), w === void 0 ? (k.stat = "active", u(k.bucket()).add(k)) : ut(r, w, k);
55823
55616
  }
55824
- let d = [...r].sort(([N2], [v]) => N2 - v).map(([, N2]) => N2), l = 0, f = d.length, p = d.length ? d[l++] : /* @__PURE__ */ new Set(), m2 = d.length > 1 ? d[--f] : /* @__PURE__ */ new Set();
55825
- for (let N2 of p) N2.stat = "top", u(N2.bucket()).add(N2);
55826
- for (let N2 of m2) N2.stat = "bottom", u(N2.bucket()).add(N2);
55617
+ let d = [...r].sort(([N], [v]) => N - v).map(([, N]) => N), l = 0, f = d.length, p = d.length ? d[l++] : /* @__PURE__ */ new Set(), m2 = d.length > 1 ? d[--f] : /* @__PURE__ */ new Set();
55618
+ for (let N of p) N.stat = "top", u(N.bucket()).add(N);
55619
+ for (let N of m2) N.stat = "bottom", u(N.bucket()).add(N);
55827
55620
  function g() {
55828
55621
  var k;
55829
- let N2;
55830
- if (N2 = (k = je(i)) != null ? k : je(o)) return N2;
55622
+ let N;
55623
+ if (N = (k = je(i)) != null ? k : je(o)) return N;
55831
55624
  let v = Jn(a2), L = Jn(s);
55832
55625
  if (L) return je(a2.length > s.length ? v : L);
55833
55626
  if (v) return je(v);
55834
55627
  }
55835
55628
  let c2 = Array(n.size), b = 0, y2 = n.size, h;
55836
55629
  for (; h = g(); ) {
55837
- let { node: N2 } = h, v = h.isTop() ? b++ : --y2;
55838
- h.stat = "ranked", c2[v] = N2;
55839
- for (let [L, k] of N2.parentCounts()) {
55630
+ let { node: N } = h, v = h.isTop() ? b++ : --y2;
55631
+ h.stat = "ranked", c2[v] = N;
55632
+ for (let [L, k] of N.parentCounts()) {
55840
55633
  let w = n.get(L);
55841
55634
  u(w.bucket()).delete(w), w.outdeg -= k, w.stat !== "ranked" && w.stat !== "inactive" && u(w.bucket()).add(w);
55842
55635
  }
55843
- for (let [L, k] of N2.childCounts()) {
55636
+ for (let [L, k] of N.childCounts()) {
55844
55637
  let w = n.get(L);
55845
55638
  u(w.bucket()).delete(w), w.indeg -= k, w.stat !== "ranked" && w.stat !== "inactive" && u(w.bucket()).add(w);
55846
55639
  }
@@ -56299,8 +56092,8 @@ function Pi(e, t) {
56299
56092
  if (f <= l) return;
56300
56093
  let g = Math.floor((l + f) / 2), c2 = o[g], b = i.get(c2), y2 = 0, h = [y2];
56301
56094
  for (let v = p; v < m2; ++v) y2 += i.get(r[v]) < b ? -1 : 1, h.push(y2);
56302
- let N2 = p + h.indexOf(Math.min(...h));
56303
- a2[g] = N2, s(l, g, p, N2), s(g + 1, f, N2, m2);
56095
+ let N = p + h.indexOf(Math.min(...h));
56096
+ a2[g] = N, s(l, g, p, N), s(g + 1, f, N, m2);
56304
56097
  }
56305
56098
  s(0, o.length, 0, r.length), a2.push(r.length + 1);
56306
56099
  let u = 0, d = 0;
@@ -56377,25 +56170,25 @@ function mo(e) {
56377
56170
  var b;
56378
56171
  let o = {}, a2 = {}, s = Wi(r, e.weight), u = /* @__PURE__ */ new Map(), d = 0;
56379
56172
  for (let y2 of r) for (let h of y2) if (!u.has(h)) {
56380
- let N2 = `${d++}`;
56381
- u.set(h, N2), o[N2] = {};
56173
+ let N = `${d++}`;
56174
+ u.set(h, N), o[N] = {};
56382
56175
  }
56383
56176
  function l(y2) {
56384
56177
  return u.get(y2);
56385
56178
  }
56386
- for (let y2 of r) for (let [h, N2] of Q(y2)) {
56387
- let v = l(h), L = l(N2), k = `layer ${v} -> ${L}`, w = i(h, N2);
56179
+ for (let y2 of r) for (let [h, N] of Q(y2)) {
56180
+ let v = l(h), L = l(N), k = `layer ${v} -> ${L}`, w = i(h, N);
56388
56181
  a2[k] = { min: w }, o[v][k] = -1, o[L][k] = 1;
56389
56182
  }
56390
56183
  let f = Ge(u.keys());
56391
56184
  for (let y2 of u.keys()) {
56392
56185
  let h = l(y2);
56393
- for (let N2 of y2.children()) {
56394
- let v = l(N2), L = `link ${h} -> ${v}`, k = `${L} parent`;
56186
+ for (let N of y2.children()) {
56187
+ let v = l(N), L = `link ${h} -> ${v}`, k = `${L} parent`;
56395
56188
  a2[k] = { min: 0 };
56396
56189
  let w = `${L} child`;
56397
56190
  a2[w] = { min: 0 }, o[h][k] = 1, o[h][w] = -1, o[v][k] = -1, o[v][w] = 1;
56398
- let S = s(y2, N2), O = (N2.y - y2.y) / f;
56191
+ let S = s(y2, N), O = (N.y - y2.y) / f;
56399
56192
  o[L] = { opt: S / O, [k]: 1, [w]: 1 };
56400
56193
  }
56401
56194
  }
@@ -56405,8 +56198,8 @@ function mo(e) {
56405
56198
  for (let y2 of r) {
56406
56199
  let h = y2[0];
56407
56200
  m2 = Math.min(m2, h.x - i(void 0, h));
56408
- let N2 = y2[y2.length - 1];
56409
- g = Math.max(g, N2.x + i(N2, void 0));
56201
+ let N = y2[y2.length - 1];
56202
+ g = Math.max(g, N.x + i(N, void 0));
56410
56203
  }
56411
56204
  for (let y2 of u.keys()) y2.x -= m2;
56412
56205
  let c2 = g - m2;
@@ -56556,13 +56349,13 @@ function $t(e) {
56556
56349
  f = false;
56557
56350
  for (let [c2, b] of Q(o)) {
56558
56351
  let y2 = b.slice();
56559
- e.order(c2, b, true), b.some((h, N2) => y2[N2] !== h) && (f = true);
56352
+ e.order(c2, b, true), b.some((h, N) => y2[N] !== h) && (f = true);
56560
56353
  }
56561
56354
  let m2 = Bt(o);
56562
56355
  m2 < u && (u = m2, s = o.map((c2) => c2.slice()));
56563
56356
  for (let [c2, b] of Q(a2)) {
56564
56357
  let y2 = b.slice();
56565
- e.order(b, c2, false), b.some((h, N2) => y2[N2] !== h) && (f = true);
56358
+ e.order(b, c2, false), b.some((h, N) => y2[N] !== h) && (f = true);
56566
56359
  }
56567
56360
  let g = Bt(o);
56568
56361
  g < u && (u = g, s = o.map((c2) => c2.slice()));
@@ -56603,24 +56396,24 @@ function In(e, t) {
56603
56396
  function Cn(e) {
56604
56397
  function t(i, o) {
56605
56398
  var y2;
56606
- let a2 = {}, s = {}, u = new Map(A(i.nodes(), (h, N2) => [h, N2.toString()]));
56399
+ let a2 = {}, s = {}, u = new Map(A(i.nodes(), (h, N) => [h, N.toString()]));
56607
56400
  function d(h) {
56608
56401
  return u.get(h);
56609
56402
  }
56610
56403
  function l(h) {
56611
56404
  return a2[d(h)];
56612
56405
  }
56613
- function f(h, N2, v, L, k = 0) {
56614
- let w = l(N2), S = l(v), O = `${h}: ${d(N2)} -> ${d(v)}`;
56406
+ function f(h, N, v, L, k = 0) {
56407
+ let w = l(N), S = l(v), O = `${h}: ${d(N)} -> ${d(v)}`;
56615
56408
  s[O] = { min: L }, w[O] = -1, S[O] = 1, w.opt += k, S.opt -= k;
56616
56409
  }
56617
- function p(h, N2, v) {
56618
- f(`${h} before`, N2, v, 0), f(`${h} after`, v, N2, 0);
56410
+ function p(h, N, v) {
56411
+ f(`${h} before`, N, v, 0), f(`${h} after`, v, N, 0);
56619
56412
  }
56620
56413
  let m2 = [], g = /* @__PURE__ */ new Map();
56621
56414
  for (let h of i.nodes()) {
56622
- let N2 = d(h);
56623
- a2[N2] = { opt: 0 };
56415
+ let N = d(h);
56416
+ a2[N] = { opt: 0 };
56624
56417
  let v = e.rank(h);
56625
56418
  v !== void 0 && m2.push([v, h]);
56626
56419
  let L = e.group(h);
@@ -56631,20 +56424,20 @@ function Cn(e) {
56631
56424
  }
56632
56425
  let c2 = /* @__PURE__ */ new Set();
56633
56426
  for (let h of i.topological(e.rank)) {
56634
- for (let [N2, v] of h.childCounts()) c2.has(N2) ? f("link", N2, h, o(N2, h), v) : f("link", h, N2, o(h, N2), v);
56427
+ for (let [N, v] of h.childCounts()) c2.has(N) ? f("link", N, h, o(N, h), v) : f("link", h, N, o(h, N), v);
56635
56428
  c2.add(h);
56636
56429
  }
56637
- let b = m2.sort(([h], [N2]) => h - N2);
56638
- for (let [[h, N2], [v, L]] of Q(b)) h < v ? f("rank", N2, L, o(N2, L)) : p("rank", N2, L);
56639
- for (let h of g.values()) for (let [N2, v] of Q(h)) p("group", N2, v);
56430
+ let b = m2.sort(([h], [N]) => h - N);
56431
+ for (let [[h, N], [v, L]] of Q(b)) h < v ? f("rank", N, L, o(N, L)) : p("rank", N, L);
56432
+ for (let h of g.values()) for (let [N, v] of Q(h)) p("group", N, v);
56640
56433
  try {
56641
- let h = fe("opt", "max", a2, s, {}), N2 = 0, v = 0;
56434
+ let h = fe("opt", "max", a2, s, {}), N = 0, v = 0;
56642
56435
  for (let L of i.nodes()) {
56643
56436
  let k = (y2 = h[d(L)]) != null ? y2 : 0;
56644
- L.y = k, N2 = Math.min(N2, k - o(void 0, L)), v = Math.max(v, k + o(L, void 0));
56437
+ L.y = k, N = Math.min(N, k - o(void 0, L)), v = Math.max(v, k + o(L, void 0));
56645
56438
  }
56646
- for (let L of i.nodes()) L.y -= N2;
56647
- return v - N2;
56439
+ for (let L of i.nodes()) L.y -= N;
56440
+ return v - N;
56648
56441
  } catch (h) {
56649
56442
  throw g.size ? D`could not find a feasible simplex layout; this is likely due to group constraints producing an infeasible layout, try relaxing the functions you're passing to \`layeringSimplex().group(...)\`` : te`could not find a feasible simplex solution`;
56650
56443
  }
@@ -56764,8 +56557,8 @@ function Me(e, t) {
56764
56557
  else {
56765
56558
  let [f, p] = bn(Tt(e.nodeSize)), [m2, g] = t.gap, c2 = e.layering(d, In) + 1, [b, y2] = Gn(d, p, g, c2, e.layering);
56766
56559
  e.decross(b);
56767
- let h = Sn(Rn(f), m2), N2 = e.coord(b, h);
56768
- xo(b, h, N2, e.coord), Mn(b), l = { width: N2, height: y2 };
56560
+ let h = Sn(Rn(f), m2), N = e.coord(b, h);
56561
+ xo(b, h, N, e.coord), Mn(b), l = { width: N, height: y2 };
56769
56562
  }
56770
56563
  for (let f of e.tweaks) l = f(d, l);
56771
56564
  return l;
@@ -56891,8 +56684,8 @@ function Bn(e) {
56891
56684
  for (let z of w) if (z === S) I = false;
56892
56685
  else if (z.data.role !== "node" || z.data.bottomLayer === k) {
56893
56686
  let M = s.get(z), $ = I ? d(M, O) : d(O, M);
56894
- for (let _2 of z.children()) {
56895
- let W = s.get(_2), B = I ? d(W, O) : d(O, W);
56687
+ for (let _ of z.children()) {
56688
+ let W = s.get(_), B = I ? d(W, O) : d(O, W);
56896
56689
  l.set(B, $);
56897
56690
  }
56898
56691
  }
@@ -56922,7 +56715,7 @@ function Bn(e) {
56922
56715
  for (let [I, z] of K(q(k, w + 1))) {
56923
56716
  let M = s.get(z);
56924
56717
  for (let $ of k.slice(w + I + 2)) {
56925
- let _2 = s.get($), W = d(O, M), B = d(O, _2), Z = d(M, _2), E = `tri: ${O} - ${M} - ${_2}`, j = `${E} +`, U2 = `${E} -`;
56718
+ let _ = s.get($), W = d(O, M), B = d(O, _), Z = d(M, _), E = `tri: ${O} - ${M} - ${_}`, j = `${E} +`, U2 = `${E} -`;
56926
56719
  b[j] = { max: 1 }, c2[W][j] = 1, c2[B][j] = -1, c2[Z][j] = 1, b[U2] = { min: 0 }, c2[W][U2] = 1, c2[B][U2] = -1, c2[Z][U2] = 1;
56927
56720
  }
56928
56721
  }
@@ -56933,16 +56726,16 @@ function Bn(e) {
56933
56726
  let I = s.get(O);
56934
56727
  for (let z of q(w, S + 1)) {
56935
56728
  if (z.data.role === "node" && z.data.bottomLayer !== k) continue;
56936
- let M = s.get(z), $ = d(I, M), _2 = /* @__PURE__ */ new Map();
56729
+ let M = s.get(z), $ = d(I, M), _ = /* @__PURE__ */ new Map();
56937
56730
  for (let [W, B] of O.childCounts()) {
56938
56731
  let Z = s.get(W);
56939
56732
  for (let [E, j] of z.childCounts()) {
56940
56733
  if (W === E) continue;
56941
- let U2 = s.get(E), ne = Math.sign(Z - U2), ee = ne < 0 ? d(Z, U2) : d(U2, Z), ve = (L = _2.get(ee)) != null ? L : 0;
56942
- _2.set(ee, ne * B * j + ve);
56734
+ let U2 = s.get(E), ne = Math.sign(Z - U2), ee = ne < 0 ? d(Z, U2) : d(U2, Z), ve = (L = _.get(ee)) != null ? L : 0;
56735
+ _.set(ee, ne * B * j + ve);
56943
56736
  }
56944
56737
  }
56945
- for (let [W, B] of _2) {
56738
+ for (let [W, B] of _) {
56946
56739
  let Z = `slack: ${$} : ${W}`, E = `${Z} +`, j = `${Z} -`;
56947
56740
  B < 0 ? (c2[Z] = { opt: -B, [E]: 1, [j]: 1 }, b[E] = { min: 0 }, c2[$][E] = 1, c2[W][E] = -1, b[j] = { min: 0 }, c2[$][j] = -1, c2[W][j] = 1) : B > 0 && (c2[Z] = { opt: B, [E]: 1, [j]: 1 }, b[E] = { min: 1 }, c2[$][E] = 1, c2[W][E] = 1, b[j] = { min: -1 }, c2[$][j] = -1, c2[W][j] = -1);
56948
56741
  }
@@ -56952,8 +56745,8 @@ function Bn(e) {
56952
56745
  let O = s.get(S);
56953
56746
  for (let I of w) for (let [z, M] of K(I)) {
56954
56747
  let $ = s.get(M);
56955
- for (let _2 of q(I, z + 1)) {
56956
- let W = s.get(_2), B = `dist: ${$} - ${O} - ${W}`, Z = `${B} :normal`, E = `${B} :reversed`;
56748
+ for (let _ of q(I, z + 1)) {
56749
+ let W = s.get(_), B = `dist: ${$} - ${O} - ${W}`, Z = `${B} :normal`, E = `${B} :reversed`;
56957
56750
  c2[B] = { opt: m2, [Z]: 1, [E]: 1 };
56958
56751
  let j = 0;
56959
56752
  for (let [U2, ne] of [[$, O], [$, W], [O, W]]) {
@@ -56964,9 +56757,9 @@ function Bn(e) {
56964
56757
  }
56965
56758
  }
56966
56759
  }
56967
- let h = Object.keys(c2).length, N2 = Object.keys(b).length;
56760
+ let h = Object.keys(c2).length, N = Object.keys(b).length;
56968
56761
  if (e.check !== "oom" && h > 2e3) throw D`size of dag to decrossOpt is too large and will likely crash instead of complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("oom"))\``;
56969
- if (e.check === "fast" && (h > 1e3 || N2 > 5e3)) throw D`size of dag to decrossOpt is too large and will likely not complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("slow"))\``;
56762
+ if (e.check === "fast" && (h > 1e3 || N > 5e3)) throw D`size of dag to decrossOpt is too large and will likely not complete; you probably want to use a cheaper decrossing strategy for sugiyama like \`sugiyama().decross(decrossTwoLayer())\`, but if you still want to continue you can suppress this check with \`sugiyama().decross(decrossOp().check("slow"))\``;
56970
56763
  let v = fe("opt", "min", c2, b, y2);
56971
56764
  if (!v.bounded) throw te`optimization result was not bounded`;
56972
56765
  for (let k of i) k.sort((w, S) => {