@burdenoff/microfe-vibecontrols 2026.601.12 → 2026.601.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +5 -2
  2. package/dist/components/actions/ActionForm.js +270 -255
  3. package/dist/components/actions/ActionForm.js.map +1 -1
  4. package/dist/components/actions/RemoteExecutionEnableNotice.js +85 -0
  5. package/dist/components/actions/RemoteExecutionEnableNotice.js.map +1 -0
  6. package/dist/components/agents/AgentConnectionRecovery.js +123 -0
  7. package/dist/components/agents/AgentConnectionRecovery.js.map +1 -0
  8. package/dist/components/agents/RemoteTaskPermissionsCard.js +37 -36
  9. package/dist/components/agents/RemoteTaskPermissionsCard.js.map +1 -1
  10. package/dist/components/graph/MeshAgentNode.js +74 -0
  11. package/dist/components/graph/MeshAgentNode.js.map +1 -0
  12. package/dist/components/graph/MeshDeployWizard.js +393 -0
  13. package/dist/components/graph/MeshDeployWizard.js.map +1 -0
  14. package/dist/components/graph/MeshGraphView.js +190 -0
  15. package/dist/components/graph/MeshGraphView.js.map +1 -0
  16. package/dist/components/graph/MeshNodeActions.js +70 -0
  17. package/dist/components/graph/MeshNodeActions.js.map +1 -0
  18. package/dist/components/graph/MeshRequestPanel.js +240 -0
  19. package/dist/components/graph/MeshRequestPanel.js.map +1 -0
  20. package/dist/components/graph/meshTypes.js +11 -0
  21. package/dist/components/graph/meshTypes.js.map +1 -0
  22. package/dist/components/graph/nodeIcons.js +31 -0
  23. package/dist/components/graph/nodeIcons.js.map +1 -0
  24. package/dist/components/shared/EnableRemoteTaskDialog.js +48 -0
  25. package/dist/components/shared/EnableRemoteTaskDialog.js.map +1 -0
  26. package/dist/components/shared/index.js +1 -0
  27. package/dist/generated/wspace-operations.js +1896 -1649
  28. package/dist/generated/wspace-operations.js.map +1 -1
  29. package/dist/generated/wspace-types.js +14 -12
  30. package/dist/generated/wspace-types.js.map +1 -1
  31. package/dist/index.js +10 -10
  32. package/dist/node_modules/dagre/index.js +24 -0
  33. package/dist/node_modules/dagre/index.js.map +1 -0
  34. package/dist/node_modules/dagre/lib/acyclic.js +47 -0
  35. package/dist/node_modules/dagre/lib/acyclic.js.map +1 -0
  36. package/dist/node_modules/dagre/lib/add-border-segments.js +32 -0
  37. package/dist/node_modules/dagre/lib/add-border-segments.js.map +1 -0
  38. package/dist/node_modules/dagre/lib/coordinate-system.js +57 -0
  39. package/dist/node_modules/dagre/lib/coordinate-system.js.map +1 -0
  40. package/dist/node_modules/dagre/lib/data/list.js +30 -0
  41. package/dist/node_modules/dagre/lib/data/list.js.map +1 -0
  42. package/dist/node_modules/dagre/lib/debug.js +31 -0
  43. package/dist/node_modules/dagre/lib/debug.js.map +1 -0
  44. package/dist/node_modules/dagre/lib/graphlib.js +15 -0
  45. package/dist/node_modules/dagre/lib/graphlib.js.map +1 -0
  46. package/dist/node_modules/dagre/lib/greedy-fas.js +74 -0
  47. package/dist/node_modules/dagre/lib/greedy-fas.js.map +1 -0
  48. package/dist/node_modules/dagre/lib/layout.js +305 -0
  49. package/dist/node_modules/dagre/lib/layout.js.map +1 -0
  50. package/dist/node_modules/dagre/lib/lodash.js +67 -0
  51. package/dist/node_modules/dagre/lib/lodash.js.map +1 -0
  52. package/dist/node_modules/dagre/lib/nesting-graph.js +76 -0
  53. package/dist/node_modules/dagre/lib/nesting-graph.js.map +1 -0
  54. package/dist/node_modules/dagre/lib/normalize.js +45 -0
  55. package/dist/node_modules/dagre/lib/normalize.js.map +1 -0
  56. package/dist/node_modules/dagre/lib/order/add-subgraph-constraints.js +24 -0
  57. package/dist/node_modules/dagre/lib/order/add-subgraph-constraints.js.map +1 -0
  58. package/dist/node_modules/dagre/lib/order/barycenter.js +34 -0
  59. package/dist/node_modules/dagre/lib/order/barycenter.js.map +1 -0
  60. package/dist/node_modules/dagre/lib/order/build-layer-graph.js +32 -0
  61. package/dist/node_modules/dagre/lib/order/build-layer-graph.js.map +1 -0
  62. package/dist/node_modules/dagre/lib/order/cross-count.js +39 -0
  63. package/dist/node_modules/dagre/lib/order/cross-count.js.map +1 -0
  64. package/dist/node_modules/dagre/lib/order/index.js +50 -0
  65. package/dist/node_modules/dagre/lib/order/index.js.map +1 -0
  66. package/dist/node_modules/dagre/lib/order/init-order.js +28 -0
  67. package/dist/node_modules/dagre/lib/order/init-order.js.map +1 -0
  68. package/dist/node_modules/dagre/lib/order/resolve-conflicts.js +61 -0
  69. package/dist/node_modules/dagre/lib/order/resolve-conflicts.js.map +1 -0
  70. package/dist/node_modules/dagre/lib/order/sort-subgraph.js +50 -0
  71. package/dist/node_modules/dagre/lib/order/sort-subgraph.js.map +1 -0
  72. package/dist/node_modules/dagre/lib/order/sort.js +34 -0
  73. package/dist/node_modules/dagre/lib/order/sort.js.map +1 -0
  74. package/dist/node_modules/dagre/lib/parent-dummy-chains.js +50 -0
  75. package/dist/node_modules/dagre/lib/parent-dummy-chains.js.map +1 -0
  76. package/dist/node_modules/dagre/lib/position/bk.js +212 -0
  77. package/dist/node_modules/dagre/lib/position/bk.js.map +1 -0
  78. package/dist/node_modules/dagre/lib/position/index.js +30 -0
  79. package/dist/node_modules/dagre/lib/position/index.js.map +1 -0
  80. package/dist/node_modules/dagre/lib/rank/feasible-tree.js +39 -0
  81. package/dist/node_modules/dagre/lib/rank/feasible-tree.js.map +1 -0
  82. package/dist/node_modules/dagre/lib/rank/index.js +35 -0
  83. package/dist/node_modules/dagre/lib/rank/index.js.map +1 -0
  84. package/dist/node_modules/dagre/lib/rank/network-simplex.js +90 -0
  85. package/dist/node_modules/dagre/lib/rank/network-simplex.js.map +1 -0
  86. package/dist/node_modules/dagre/lib/rank/util.js +31 -0
  87. package/dist/node_modules/dagre/lib/rank/util.js.map +1 -0
  88. package/dist/node_modules/dagre/lib/util.js +151 -0
  89. package/dist/node_modules/dagre/lib/util.js.map +1 -0
  90. package/dist/node_modules/dagre/lib/version.js +10 -0
  91. package/dist/node_modules/dagre/lib/version.js.map +1 -0
  92. package/dist/node_modules/graphlib/index.js +19 -0
  93. package/dist/node_modules/graphlib/index.js.map +1 -0
  94. package/dist/node_modules/graphlib/lib/alg/components.js +21 -0
  95. package/dist/node_modules/graphlib/lib/alg/components.js.map +1 -0
  96. package/dist/node_modules/graphlib/lib/alg/dfs.js +25 -0
  97. package/dist/node_modules/graphlib/lib/alg/dfs.js.map +1 -0
  98. package/dist/node_modules/graphlib/lib/alg/dijkstra-all.js +18 -0
  99. package/dist/node_modules/graphlib/lib/alg/dijkstra-all.js.map +1 -0
  100. package/dist/node_modules/graphlib/lib/alg/dijkstra.js +31 -0
  101. package/dist/node_modules/graphlib/lib/alg/dijkstra.js.map +1 -0
  102. package/dist/node_modules/graphlib/lib/alg/find-cycles.js +18 -0
  103. package/dist/node_modules/graphlib/lib/alg/find-cycles.js.map +1 -0
  104. package/dist/node_modules/graphlib/lib/alg/floyd-warshall.js +41 -0
  105. package/dist/node_modules/graphlib/lib/alg/floyd-warshall.js.map +1 -0
  106. package/dist/node_modules/graphlib/lib/alg/index.js +33 -0
  107. package/dist/node_modules/graphlib/lib/alg/index.js.map +1 -0
  108. package/dist/node_modules/graphlib/lib/alg/is-acyclic.js +21 -0
  109. package/dist/node_modules/graphlib/lib/alg/is-acyclic.js.map +1 -0
  110. package/dist/node_modules/graphlib/lib/alg/postorder.js +15 -0
  111. package/dist/node_modules/graphlib/lib/alg/postorder.js.map +1 -0
  112. package/dist/node_modules/graphlib/lib/alg/preorder.js +15 -0
  113. package/dist/node_modules/graphlib/lib/alg/preorder.js.map +1 -0
  114. package/dist/node_modules/graphlib/lib/alg/prim.js +35 -0
  115. package/dist/node_modules/graphlib/lib/alg/prim.js.map +1 -0
  116. package/dist/node_modules/graphlib/lib/alg/tarjan.js +34 -0
  117. package/dist/node_modules/graphlib/lib/alg/tarjan.js.map +1 -0
  118. package/dist/node_modules/graphlib/lib/alg/topsort.js +23 -0
  119. package/dist/node_modules/graphlib/lib/alg/topsort.js.map +1 -0
  120. package/dist/node_modules/graphlib/lib/data/priority-queue.js +56 -0
  121. package/dist/node_modules/graphlib/lib/data/priority-queue.js.map +1 -0
  122. package/dist/node_modules/graphlib/lib/graph.js +196 -0
  123. package/dist/node_modules/graphlib/lib/graph.js.map +1 -0
  124. package/dist/node_modules/graphlib/lib/index.js +15 -0
  125. package/dist/node_modules/graphlib/lib/index.js.map +1 -0
  126. package/dist/node_modules/graphlib/lib/json.js +55 -0
  127. package/dist/node_modules/graphlib/lib/json.js.map +1 -0
  128. package/dist/node_modules/graphlib/lib/lodash.js +47 -0
  129. package/dist/node_modules/graphlib/lib/lodash.js.map +1 -0
  130. package/dist/node_modules/graphlib/lib/version.js +10 -0
  131. package/dist/node_modules/graphlib/lib/version.js.map +1 -0
  132. package/dist/node_modules/lodash/_arrayEach.js +14 -0
  133. package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
  134. package/dist/node_modules/lodash/_arrayReduce.js +15 -0
  135. package/dist/node_modules/lodash/_arrayReduce.js.map +1 -0
  136. package/dist/node_modules/lodash/_asciiSize.js +11 -0
  137. package/dist/node_modules/lodash/_asciiSize.js.map +1 -0
  138. package/dist/node_modules/lodash/_assignMergeValue.js +16 -0
  139. package/dist/node_modules/lodash/_assignMergeValue.js.map +1 -0
  140. package/dist/node_modules/lodash/_assignValue.js +17 -0
  141. package/dist/node_modules/lodash/_assignValue.js.map +1 -0
  142. package/dist/node_modules/lodash/_baseAssign.js +16 -0
  143. package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
  144. package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
  145. package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
  146. package/dist/node_modules/lodash/_baseClone.js +64 -0
  147. package/dist/node_modules/lodash/_baseClone.js.map +1 -0
  148. package/dist/node_modules/lodash/_baseCreate.js +21 -0
  149. package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
  150. package/dist/node_modules/lodash/_baseFilter.js +18 -0
  151. package/dist/node_modules/lodash/_baseFilter.js.map +1 -0
  152. package/dist/node_modules/lodash/_baseHas.js +14 -0
  153. package/dist/node_modules/lodash/_baseHas.js.map +1 -0
  154. package/dist/node_modules/lodash/_baseIsMap.js +16 -0
  155. package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
  156. package/dist/node_modules/lodash/_baseIsSet.js +16 -0
  157. package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
  158. package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
  159. package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
  160. package/dist/node_modules/lodash/_baseMerge.js +27 -0
  161. package/dist/node_modules/lodash/_baseMerge.js.map +1 -0
  162. package/dist/node_modules/lodash/_baseMergeDeep.js +39 -0
  163. package/dist/node_modules/lodash/_baseMergeDeep.js.map +1 -0
  164. package/dist/node_modules/lodash/_basePick.js +18 -0
  165. package/dist/node_modules/lodash/_basePick.js.map +1 -0
  166. package/dist/node_modules/lodash/_basePickBy.js +21 -0
  167. package/dist/node_modules/lodash/_basePickBy.js.map +1 -0
  168. package/dist/node_modules/lodash/_baseReduce.js +15 -0
  169. package/dist/node_modules/lodash/_baseReduce.js.map +1 -0
  170. package/dist/node_modules/lodash/_baseSet.js +30 -0
  171. package/dist/node_modules/lodash/_baseSet.js.map +1 -0
  172. package/dist/node_modules/lodash/_baseValues.js +17 -0
  173. package/dist/node_modules/lodash/_baseValues.js.map +1 -0
  174. package/dist/node_modules/lodash/_baseZipObject.js +17 -0
  175. package/dist/node_modules/lodash/_baseZipObject.js.map +1 -0
  176. package/dist/node_modules/lodash/_castFunction.js +15 -0
  177. package/dist/node_modules/lodash/_castFunction.js.map +1 -0
  178. package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
  179. package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
  180. package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
  181. package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
  182. package/dist/node_modules/lodash/_cloneDataView.js +16 -0
  183. package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
  184. package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
  185. package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
  186. package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
  187. package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
  188. package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
  189. package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
  190. package/dist/node_modules/lodash/_copyArray.js +15 -0
  191. package/dist/node_modules/lodash/_copyArray.js.map +1 -0
  192. package/dist/node_modules/lodash/_copyObject.js +22 -0
  193. package/dist/node_modules/lodash/_copyObject.js.map +1 -0
  194. package/dist/node_modules/lodash/_copySymbols.js +16 -0
  195. package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
  196. package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
  197. package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
  198. package/dist/node_modules/lodash/_createAssigner.js +23 -0
  199. package/dist/node_modules/lodash/_createAssigner.js.map +1 -0
  200. package/dist/node_modules/lodash/_flatRest.js +17 -0
  201. package/dist/node_modules/lodash/_flatRest.js.map +1 -0
  202. package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
  203. package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
  204. package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
  205. package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
  206. package/dist/node_modules/lodash/_initCloneArray.js +15 -0
  207. package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
  208. package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
  209. package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
  210. package/dist/node_modules/lodash/_initCloneObject.js +17 -0
  211. package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
  212. package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
  213. package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
  214. package/dist/node_modules/lodash/_safeGet.js +13 -0
  215. package/dist/node_modules/lodash/_safeGet.js.map +1 -0
  216. package/dist/node_modules/lodash/_stringSize.js +17 -0
  217. package/dist/node_modules/lodash/_stringSize.js.map +1 -0
  218. package/dist/node_modules/lodash/_unicodeSize.js +25 -0
  219. package/dist/node_modules/lodash/_unicodeSize.js.map +1 -0
  220. package/dist/node_modules/lodash/clone.js +15 -0
  221. package/dist/node_modules/lodash/clone.js.map +1 -0
  222. package/dist/node_modules/lodash/cloneDeep.js +15 -0
  223. package/dist/node_modules/lodash/cloneDeep.js.map +1 -0
  224. package/dist/node_modules/lodash/defaults.js +23 -0
  225. package/dist/node_modules/lodash/defaults.js.map +1 -0
  226. package/dist/node_modules/lodash/each.js +11 -0
  227. package/dist/node_modules/lodash/each.js.map +1 -0
  228. package/dist/node_modules/lodash/filter.js +18 -0
  229. package/dist/node_modules/lodash/filter.js.map +1 -0
  230. package/dist/node_modules/lodash/flatten.js +15 -0
  231. package/dist/node_modules/lodash/flatten.js.map +1 -0
  232. package/dist/node_modules/lodash/forEach.js +18 -0
  233. package/dist/node_modules/lodash/forEach.js.map +1 -0
  234. package/dist/node_modules/lodash/forIn.js +17 -0
  235. package/dist/node_modules/lodash/forIn.js.map +1 -0
  236. package/dist/node_modules/lodash/has.js +16 -0
  237. package/dist/node_modules/lodash/has.js.map +1 -0
  238. package/dist/node_modules/lodash/isArrayLikeObject.js +16 -0
  239. package/dist/node_modules/lodash/isArrayLikeObject.js.map +1 -0
  240. package/dist/node_modules/lodash/isEmpty.js +28 -0
  241. package/dist/node_modules/lodash/isEmpty.js.map +1 -0
  242. package/dist/node_modules/lodash/isMap.js +14 -0
  243. package/dist/node_modules/lodash/isMap.js.map +1 -0
  244. package/dist/node_modules/lodash/isSet.js +14 -0
  245. package/dist/node_modules/lodash/isSet.js.map +1 -0
  246. package/dist/node_modules/lodash/isUndefined.js +13 -0
  247. package/dist/node_modules/lodash/isUndefined.js.map +1 -0
  248. package/dist/node_modules/lodash/keysIn.js +17 -0
  249. package/dist/node_modules/lodash/keysIn.js.map +1 -0
  250. package/dist/node_modules/lodash/merge.js +15 -0
  251. package/dist/node_modules/lodash/merge.js.map +1 -0
  252. package/dist/node_modules/lodash/pick.js +15 -0
  253. package/dist/node_modules/lodash/pick.js.map +1 -0
  254. package/dist/node_modules/lodash/reduce.js +20 -0
  255. package/dist/node_modules/lodash/reduce.js.map +1 -0
  256. package/dist/node_modules/lodash/size.js +22 -0
  257. package/dist/node_modules/lodash/size.js.map +1 -0
  258. package/dist/node_modules/lodash/toPlainObject.js +16 -0
  259. package/dist/node_modules/lodash/toPlainObject.js.map +1 -0
  260. package/dist/node_modules/lodash/transform.js +31 -0
  261. package/dist/node_modules/lodash/transform.js.map +1 -0
  262. package/dist/node_modules/lodash/union.js +17 -0
  263. package/dist/node_modules/lodash/union.js.map +1 -0
  264. package/dist/node_modules/lodash/uniqueId.js +16 -0
  265. package/dist/node_modules/lodash/uniqueId.js.map +1 -0
  266. package/dist/node_modules/lodash/values.js +16 -0
  267. package/dist/node_modules/lodash/values.js.map +1 -0
  268. package/dist/node_modules/lodash/zipObject.js +16 -0
  269. package/dist/node_modules/lodash/zipObject.js.map +1 -0
  270. package/dist/pages/ActionsPage.js +269 -230
  271. package/dist/pages/ActionsPage.js.map +1 -1
  272. package/dist/pages/AgentDetailsPage.js +442 -436
  273. package/dist/pages/AgentDetailsPage.js.map +1 -1
  274. package/dist/pages/AgentGraphPage.js +251 -118
  275. package/dist/pages/AgentGraphPage.js.map +1 -1
  276. package/dist/pages/VibeDeckPage.js +268 -224
  277. package/dist/pages/VibeDeckPage.js.map +1 -1
  278. package/dist/services/agentRemoteTaskGates.js +29 -0
  279. package/dist/services/agentRemoteTaskGates.js.map +1 -0
  280. package/package.json +3 -1
  281. package/dist/components/graph/AgentGraphView.js +0 -237
  282. package/dist/components/graph/AgentGraphView.js.map +0 -1
  283. package/dist/components/graph/AgentNode.js +0 -54
  284. package/dist/components/graph/AgentNode.js.map +0 -1
  285. package/dist/components/graph/TargetNode.js +0 -76
  286. package/dist/components/graph/TargetNode.js.map +0 -1
@@ -0,0 +1,212 @@
1
+ import { __commonJSMin as e } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_graphlib as t } from "../graphlib.js";
3
+ import { require_lodash as n } from "../lodash.js";
4
+ import { require_util as r } from "../util.js";
5
+ //#region node_modules/dagre/lib/position/bk.js
6
+ var i = /* @__PURE__ */ e(((e, i) => {
7
+ var a = n(), o = t().Graph, s = r();
8
+ i.exports = {
9
+ positionX: y,
10
+ findType1Conflicts: c,
11
+ findType2Conflicts: l,
12
+ addConflict: d,
13
+ hasConflict: f,
14
+ verticalAlignment: p,
15
+ horizontalCompaction: m,
16
+ alignCoordinates: _,
17
+ findSmallestWidthAlignment: g,
18
+ balance: v
19
+ };
20
+ function c(e, t) {
21
+ var n = {};
22
+ function r(t, r) {
23
+ var i = 0, o = 0, s = t.length, c = a.last(r);
24
+ return a.forEach(r, function(t, l) {
25
+ var f = u(e, t), p = f ? e.node(f).order : s;
26
+ (f || t === c) && (a.forEach(r.slice(o, l + 1), function(t) {
27
+ a.forEach(e.predecessors(t), function(r) {
28
+ var a = e.node(r), o = a.order;
29
+ (o < i || p < o) && !(a.dummy && e.node(t).dummy) && d(n, r, t);
30
+ });
31
+ }), o = l + 1, i = p);
32
+ }), r;
33
+ }
34
+ return a.reduce(t, r), n;
35
+ }
36
+ function l(e, t) {
37
+ var n = {};
38
+ function r(t, r, i, o, s) {
39
+ var c;
40
+ a.forEach(a.range(r, i), function(r) {
41
+ c = t[r], e.node(c).dummy && a.forEach(e.predecessors(c), function(t) {
42
+ var r = e.node(t);
43
+ r.dummy && (r.order < o || r.order > s) && d(n, t, c);
44
+ });
45
+ });
46
+ }
47
+ function i(t, n) {
48
+ var i = -1, o, s = 0;
49
+ return a.forEach(n, function(a, c) {
50
+ if (e.node(a).dummy === "border") {
51
+ var l = e.predecessors(a);
52
+ l.length && (o = e.node(l[0]).order, r(n, s, c, i, o), s = c, i = o);
53
+ }
54
+ r(n, s, n.length, o, t.length);
55
+ }), n;
56
+ }
57
+ return a.reduce(t, i), n;
58
+ }
59
+ function u(e, t) {
60
+ if (e.node(t).dummy) return a.find(e.predecessors(t), function(t) {
61
+ return e.node(t).dummy;
62
+ });
63
+ }
64
+ function d(e, t, n) {
65
+ if (t > n) {
66
+ var r = t;
67
+ t = n, n = r;
68
+ }
69
+ var i = e[t];
70
+ i || (e[t] = i = {}), i[n] = !0;
71
+ }
72
+ function f(e, t, n) {
73
+ if (t > n) {
74
+ var r = t;
75
+ t = n, n = r;
76
+ }
77
+ return a.has(e[t], n);
78
+ }
79
+ function p(e, t, n, r) {
80
+ var i = {}, o = {}, s = {};
81
+ return a.forEach(t, function(e) {
82
+ a.forEach(e, function(e, t) {
83
+ i[e] = e, o[e] = e, s[e] = t;
84
+ });
85
+ }), a.forEach(t, function(e) {
86
+ var t = -1;
87
+ a.forEach(e, function(e) {
88
+ var c = r(e);
89
+ if (c.length) {
90
+ c = a.sortBy(c, function(e) {
91
+ return s[e];
92
+ });
93
+ for (var l = (c.length - 1) / 2, u = Math.floor(l), d = Math.ceil(l); u <= d; ++u) {
94
+ var p = c[u];
95
+ o[e] === e && t < s[p] && !f(n, e, p) && (o[p] = e, o[e] = i[e] = i[p], t = s[p]);
96
+ }
97
+ }
98
+ });
99
+ }), {
100
+ root: i,
101
+ align: o
102
+ };
103
+ }
104
+ function m(e, t, n, r, i) {
105
+ var o = {}, s = h(e, t, n, i), c = i ? "borderLeft" : "borderRight";
106
+ function l(e, t) {
107
+ for (var n = s.nodes(), r = n.pop(), i = {}; r;) i[r] ? e(r) : (i[r] = !0, n.push(r), n = n.concat(t(r))), r = n.pop();
108
+ }
109
+ function u(e) {
110
+ o[e] = s.inEdges(e).reduce(function(e, t) {
111
+ return Math.max(e, o[t.v] + s.edge(t));
112
+ }, 0);
113
+ }
114
+ function d(t) {
115
+ var n = s.outEdges(t).reduce(function(e, t) {
116
+ return Math.min(e, o[t.w] - s.edge(t));
117
+ }, Infinity), r = e.node(t);
118
+ n !== Infinity && r.borderType !== c && (o[t] = Math.max(o[t], n));
119
+ }
120
+ return l(u, s.predecessors.bind(s)), l(d, s.successors.bind(s)), a.forEach(r, function(e) {
121
+ o[e] = o[n[e]];
122
+ }), o;
123
+ }
124
+ function h(e, t, n, r) {
125
+ var i = new o(), s = e.graph(), c = b(s.nodesep, s.edgesep, r);
126
+ return a.forEach(t, function(t) {
127
+ var r;
128
+ a.forEach(t, function(t) {
129
+ var a = n[t];
130
+ if (i.setNode(a), r) {
131
+ var o = n[r], s = i.edge(o, a);
132
+ i.setEdge(o, a, Math.max(c(e, t, r), s || 0));
133
+ }
134
+ r = t;
135
+ });
136
+ }), i;
137
+ }
138
+ function g(e, t) {
139
+ return a.minBy(a.values(t), function(t) {
140
+ var n = -Infinity, r = Infinity;
141
+ return a.forIn(t, function(t, i) {
142
+ var a = x(e, i) / 2;
143
+ n = Math.max(t + a, n), r = Math.min(t - a, r);
144
+ }), n - r;
145
+ });
146
+ }
147
+ function _(e, t) {
148
+ var n = a.values(t), r = a.min(n), i = a.max(n);
149
+ a.forEach(["u", "d"], function(n) {
150
+ a.forEach(["l", "r"], function(o) {
151
+ var s = n + o, c = e[s], l;
152
+ if (c !== t) {
153
+ var u = a.values(c);
154
+ l = o === "l" ? r - a.min(u) : i - a.max(u), l && (e[s] = a.mapValues(c, function(e) {
155
+ return e + l;
156
+ }));
157
+ }
158
+ });
159
+ });
160
+ }
161
+ function v(e, t) {
162
+ return a.mapValues(e.ul, function(n, r) {
163
+ if (t) return e[t.toLowerCase()][r];
164
+ var i = a.sortBy(a.map(e, r));
165
+ return (i[1] + i[2]) / 2;
166
+ });
167
+ }
168
+ function y(e) {
169
+ var t = s.buildLayerMatrix(e), n = a.merge(c(e, t), l(e, t)), r = {}, i;
170
+ return a.forEach(["u", "d"], function(o) {
171
+ i = o === "u" ? t : a.values(t).reverse(), a.forEach(["l", "r"], function(t) {
172
+ t === "r" && (i = a.map(i, function(e) {
173
+ return a.values(e).reverse();
174
+ }));
175
+ var s = (o === "u" ? e.predecessors : e.successors).bind(e), c = p(e, i, n, s), l = m(e, i, c.root, c.align, t === "r");
176
+ t === "r" && (l = a.mapValues(l, function(e) {
177
+ return -e;
178
+ })), r[o + t] = l;
179
+ });
180
+ }), _(r, g(e, r)), v(r, e.graph().align);
181
+ }
182
+ function b(e, t, n) {
183
+ return function(r, i, o) {
184
+ var s = r.node(i), c = r.node(o), l = 0, u;
185
+ if (l += s.width / 2, a.has(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
186
+ case "l":
187
+ u = -s.width / 2;
188
+ break;
189
+ case "r":
190
+ u = s.width / 2;
191
+ break;
192
+ }
193
+ if (u && (l += n ? u : -u), u = 0, l += (s.dummy ? t : e) / 2, l += (c.dummy ? t : e) / 2, l += c.width / 2, a.has(c, "labelpos")) switch (c.labelpos.toLowerCase()) {
194
+ case "l":
195
+ u = c.width / 2;
196
+ break;
197
+ case "r":
198
+ u = -c.width / 2;
199
+ break;
200
+ }
201
+ return u && (l += n ? u : -u), u = 0, l;
202
+ };
203
+ }
204
+ function x(e, t) {
205
+ return e.node(t).width;
206
+ }
207
+ }));
208
+ //#endregion
209
+ export default i();
210
+ export { i as require_bk };
211
+
212
+ //# sourceMappingURL=bk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bk.js","names":[],"sources":["../../../../../node_modules/dagre/lib/position/bk.js"],"sourcesContent":["\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar Graph = require(\"../graphlib\").Graph;\nvar util = require(\"../util\");\n\n/*\n * This module provides coordinate assignment based on Brandes and Köpf, \"Fast\n * and Simple Horizontal Coordinate Assignment.\"\n */\n\nmodule.exports = {\n positionX: positionX,\n findType1Conflicts: findType1Conflicts,\n findType2Conflicts: findType2Conflicts,\n addConflict: addConflict,\n hasConflict: hasConflict,\n verticalAlignment: verticalAlignment,\n horizontalCompaction: horizontalCompaction,\n alignCoordinates: alignCoordinates,\n findSmallestWidthAlignment: findSmallestWidthAlignment,\n balance: balance\n};\n\n/*\n * Marks all edges in the graph with a type-1 conflict with the \"type1Conflict\"\n * property. A type-1 conflict is one where a non-inner segment crosses an\n * inner segment. An inner segment is an edge with both incident nodes marked\n * with the \"dummy\" property.\n *\n * This algorithm scans layer by layer, starting with the second, for type-1\n * conflicts between the current layer and the previous layer. For each layer\n * it scans the nodes from left to right until it reaches one that is incident\n * on an inner segment. It then scans predecessors to determine if they have\n * edges that cross that inner segment. At the end a final scan is done for all\n * nodes on the current rank to see if they cross the last visited inner\n * segment.\n *\n * This algorithm (safely) assumes that a dummy node will only be incident on a\n * single node in the layers being scanned.\n */\nfunction findType1Conflicts(g, layering) {\n var conflicts = {};\n\n function visitLayer(prevLayer, layer) {\n var\n // last visited node in the previous layer that is incident on an inner\n // segment.\n k0 = 0,\n // Tracks the last node in this layer scanned for crossings with a type-1\n // segment.\n scanPos = 0,\n prevLayerLength = prevLayer.length,\n lastNode = _.last(layer);\n\n _.forEach(layer, function(v, i) {\n var w = findOtherInnerSegmentNode(g, v),\n k1 = w ? g.node(w).order : prevLayerLength;\n\n if (w || v === lastNode) {\n _.forEach(layer.slice(scanPos, i +1), function(scanNode) {\n _.forEach(g.predecessors(scanNode), function(u) {\n var uLabel = g.node(u),\n uPos = uLabel.order;\n if ((uPos < k0 || k1 < uPos) &&\n !(uLabel.dummy && g.node(scanNode).dummy)) {\n addConflict(conflicts, u, scanNode);\n }\n });\n });\n scanPos = i + 1;\n k0 = k1;\n }\n });\n\n return layer;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findType2Conflicts(g, layering) {\n var conflicts = {};\n\n function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {\n var v;\n _.forEach(_.range(southPos, southEnd), function(i) {\n v = south[i];\n if (g.node(v).dummy) {\n _.forEach(g.predecessors(v), function(u) {\n var uNode = g.node(u);\n if (uNode.dummy &&\n (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {\n addConflict(conflicts, u, v);\n }\n });\n }\n });\n }\n\n\n function visitLayer(north, south) {\n var prevNorthPos = -1,\n nextNorthPos,\n southPos = 0;\n\n _.forEach(south, function(v, southLookahead) {\n if (g.node(v).dummy === \"border\") {\n var predecessors = g.predecessors(v);\n if (predecessors.length) {\n nextNorthPos = g.node(predecessors[0]).order;\n scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);\n southPos = southLookahead;\n prevNorthPos = nextNorthPos;\n }\n }\n scan(south, southPos, south.length, nextNorthPos, north.length);\n });\n\n return south;\n }\n\n _.reduce(layering, visitLayer);\n return conflicts;\n}\n\nfunction findOtherInnerSegmentNode(g, v) {\n if (g.node(v).dummy) {\n return _.find(g.predecessors(v), function(u) {\n return g.node(u).dummy;\n });\n }\n}\n\nfunction addConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n var conflictsV = conflicts[v];\n if (!conflictsV) {\n conflicts[v] = conflictsV = {};\n }\n conflictsV[w] = true;\n}\n\nfunction hasConflict(conflicts, v, w) {\n if (v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n return _.has(conflicts[v], w);\n}\n\n/*\n * Try to align nodes into vertical \"blocks\" where possible. This algorithm\n * attempts to align a node with one of its median neighbors. If the edge\n * connecting a neighbor is a type-1 conflict then we ignore that possibility.\n * If a previous node has already formed a block with a node after the node\n * we're trying to form a block with, we also ignore that possibility - our\n * blocks would be split in that scenario.\n */\nfunction verticalAlignment(g, layering, conflicts, neighborFn) {\n var root = {},\n align = {},\n pos = {};\n\n // We cache the position here based on the layering because the graph and\n // layering may be out of sync. The layering matrix is manipulated to\n // generate different extreme alignments.\n _.forEach(layering, function(layer) {\n _.forEach(layer, function(v, order) {\n root[v] = v;\n align[v] = v;\n pos[v] = order;\n });\n });\n\n _.forEach(layering, function(layer) {\n var prevIdx = -1;\n _.forEach(layer, function(v) {\n var ws = neighborFn(v);\n if (ws.length) {\n ws = _.sortBy(ws, function(w) { return pos[w]; });\n var mp = (ws.length - 1) / 2;\n for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {\n var w = ws[i];\n if (align[v] === v &&\n prevIdx < pos[w] &&\n !hasConflict(conflicts, v, w)) {\n align[w] = v;\n align[v] = root[v] = root[w];\n prevIdx = pos[w];\n }\n }\n }\n });\n });\n\n return { root: root, align: align };\n}\n\nfunction horizontalCompaction(g, layering, root, align, reverseSep) {\n // This portion of the algorithm differs from BK due to a number of problems.\n // Instead of their algorithm we construct a new block graph and do two\n // sweeps. The first sweep places blocks with the smallest possible\n // coordinates. The second sweep removes unused space by moving blocks to the\n // greatest coordinates without violating separation.\n var xs = {},\n blockG = buildBlockGraph(g, layering, root, reverseSep),\n borderType = reverseSep ? \"borderLeft\" : \"borderRight\";\n\n function iterate(setXsFunc, nextNodesFunc) {\n var stack = blockG.nodes();\n var elem = stack.pop();\n var visited = {};\n while (elem) {\n if (visited[elem]) {\n setXsFunc(elem);\n } else {\n visited[elem] = true;\n stack.push(elem);\n stack = stack.concat(nextNodesFunc(elem));\n }\n\n elem = stack.pop();\n }\n }\n\n // First pass, assign smallest coordinates\n function pass1(elem) {\n xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) {\n return Math.max(acc, xs[e.v] + blockG.edge(e));\n }, 0);\n }\n\n // Second pass, assign greatest coordinates\n function pass2(elem) {\n var min = blockG.outEdges(elem).reduce(function(acc, e) {\n return Math.min(acc, xs[e.w] - blockG.edge(e));\n }, Number.POSITIVE_INFINITY);\n\n var node = g.node(elem);\n if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {\n xs[elem] = Math.max(xs[elem], min);\n }\n }\n\n iterate(pass1, blockG.predecessors.bind(blockG));\n iterate(pass2, blockG.successors.bind(blockG));\n\n // Assign x coordinates to all nodes\n _.forEach(align, function(v) {\n xs[v] = xs[root[v]];\n });\n\n return xs;\n}\n\n\nfunction buildBlockGraph(g, layering, root, reverseSep) {\n var blockGraph = new Graph(),\n graphLabel = g.graph(),\n sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);\n\n _.forEach(layering, function(layer) {\n var u;\n _.forEach(layer, function(v) {\n var vRoot = root[v];\n blockGraph.setNode(vRoot);\n if (u) {\n var uRoot = root[u],\n prevMax = blockGraph.edge(uRoot, vRoot);\n blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));\n }\n u = v;\n });\n });\n\n return blockGraph;\n}\n\n/*\n * Returns the alignment that has the smallest width of the given alignments.\n */\nfunction findSmallestWidthAlignment(g, xss) {\n return _.minBy(_.values(xss), function (xs) {\n var max = Number.NEGATIVE_INFINITY;\n var min = Number.POSITIVE_INFINITY;\n\n _.forIn(xs, function (x, v) {\n var halfWidth = width(g, v) / 2;\n\n max = Math.max(x + halfWidth, max);\n min = Math.min(x - halfWidth, min);\n });\n\n return max - min;\n });\n}\n\n/*\n * Align the coordinates of each of the layout alignments such that\n * left-biased alignments have their minimum coordinate at the same point as\n * the minimum coordinate of the smallest width alignment and right-biased\n * alignments have their maximum coordinate at the same point as the maximum\n * coordinate of the smallest width alignment.\n */\nfunction alignCoordinates(xss, alignTo) {\n var alignToVals = _.values(alignTo),\n alignToMin = _.min(alignToVals),\n alignToMax = _.max(alignToVals);\n\n _.forEach([\"u\", \"d\"], function(vert) {\n _.forEach([\"l\", \"r\"], function(horiz) {\n var alignment = vert + horiz,\n xs = xss[alignment],\n delta;\n if (xs === alignTo) return;\n\n var xsVals = _.values(xs);\n delta = horiz === \"l\" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);\n\n if (delta) {\n xss[alignment] = _.mapValues(xs, function(x) { return x + delta; });\n }\n });\n });\n}\n\nfunction balance(xss, align) {\n return _.mapValues(xss.ul, function(ignore, v) {\n if (align) {\n return xss[align.toLowerCase()][v];\n } else {\n var xs = _.sortBy(_.map(xss, v));\n return (xs[1] + xs[2]) / 2;\n }\n });\n}\n\nfunction positionX(g) {\n var layering = util.buildLayerMatrix(g);\n var conflicts = _.merge(\n findType1Conflicts(g, layering),\n findType2Conflicts(g, layering));\n\n var xss = {};\n var adjustedLayering;\n _.forEach([\"u\", \"d\"], function(vert) {\n adjustedLayering = vert === \"u\" ? layering : _.values(layering).reverse();\n _.forEach([\"l\", \"r\"], function(horiz) {\n if (horiz === \"r\") {\n adjustedLayering = _.map(adjustedLayering, function(inner) {\n return _.values(inner).reverse();\n });\n }\n\n var neighborFn = (vert === \"u\" ? g.predecessors : g.successors).bind(g);\n var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);\n var xs = horizontalCompaction(g, adjustedLayering,\n align.root, align.align, horiz === \"r\");\n if (horiz === \"r\") {\n xs = _.mapValues(xs, function(x) { return -x; });\n }\n xss[vert + horiz] = xs;\n });\n });\n\n var smallestWidth = findSmallestWidthAlignment(g, xss);\n alignCoordinates(xss, smallestWidth);\n return balance(xss, g.graph().align);\n}\n\nfunction sep(nodeSep, edgeSep, reverseSep) {\n return function(g, v, w) {\n var vLabel = g.node(v);\n var wLabel = g.node(w);\n var sum = 0;\n var delta;\n\n sum += vLabel.width / 2;\n if (_.has(vLabel, \"labelpos\")) {\n switch (vLabel.labelpos.toLowerCase()) {\n case \"l\": delta = -vLabel.width / 2; break;\n case \"r\": delta = vLabel.width / 2; break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;\n sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;\n\n sum += wLabel.width / 2;\n if (_.has(wLabel, \"labelpos\")) {\n switch (wLabel.labelpos.toLowerCase()) {\n case \"l\": delta = wLabel.width / 2; break;\n case \"r\": delta = -wLabel.width / 2; break;\n }\n }\n if (delta) {\n sum += reverseSep ? delta : -delta;\n }\n delta = 0;\n\n return sum;\n };\n}\n\nfunction width(g, v) {\n return g.node(v).width;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,IAAI,IAAA,GAAA,EACA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../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_lodash as t } from "../lodash.js";
3
+ import { require_util as n } from "../util.js";
4
+ import { require_bk as r } from "./bk.js";
5
+ //#region node_modules/dagre/lib/position/index.js
6
+ var i = /* @__PURE__ */ e(((e, i) => {
7
+ var a = t(), o = n(), s = r().positionX;
8
+ i.exports = c;
9
+ function c(e) {
10
+ e = o.asNonCompoundGraph(e), l(e), a.forEach(s(e), function(t, n) {
11
+ e.node(n).x = t;
12
+ });
13
+ }
14
+ function l(e) {
15
+ var t = o.buildLayerMatrix(e), n = e.graph().ranksep, r = 0;
16
+ a.forEach(t, function(t) {
17
+ var i = a.max(a.map(t, function(t) {
18
+ return e.node(t).height;
19
+ }));
20
+ a.forEach(t, function(t) {
21
+ e.node(t).y = r + i / 2;
22
+ }), r += i + n;
23
+ });
24
+ }
25
+ }));
26
+ //#endregion
27
+ export default i();
28
+ export { i as require_position };
29
+
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../node_modules/dagre/lib/position/index.js"],"sourcesContent":["\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar util = require(\"../util\");\nvar positionX = require(\"./bk\").positionX;\n\nmodule.exports = position;\n\nfunction position(g) {\n g = util.asNonCompoundGraph(g);\n\n positionY(g);\n _.forEach(positionX(g), function(x, v) {\n g.node(v).x = x;\n });\n}\n\nfunction positionY(g) {\n var layering = util.buildLayerMatrix(g);\n var rankSep = g.graph().ranksep;\n var prevY = 0;\n _.forEach(layering, function(layer) {\n var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; }));\n _.forEach(layer, function(v) {\n g.node(v).y = prevY + maxHeight / 2;\n });\n prevY += maxHeight + rankSep;\n });\n}\n\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,IAAI,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,CAA4B;AAEhC,GAAO,UAAU;CAEjB,SAAS,EAAS,GAAG;AAInB,EAHA,IAAI,EAAK,mBAAmB,EAAE,EAE9B,EAAU,EAAE,EACZ,EAAE,QAAQ,EAAU,EAAE,EAAE,SAAS,GAAG,GAAG;AACrC,KAAE,KAAK,EAAE,CAAC,IAAI;IACd;;CAGJ,SAAS,EAAU,GAAG;EACpB,IAAI,IAAW,EAAK,iBAAiB,EAAE,EACnC,IAAU,EAAE,OAAO,CAAC,SACpB,IAAQ;AACZ,IAAE,QAAQ,GAAU,SAAS,GAAO;GAClC,IAAI,IAAY,EAAE,IAAI,EAAE,IAAI,GAAO,SAAS,GAAG;AAAE,WAAO,EAAE,KAAK,EAAE,CAAC;KAAU,CAAC;AAI7E,GAHA,EAAE,QAAQ,GAAO,SAAS,GAAG;AAC3B,MAAE,KAAK,EAAE,CAAC,IAAI,IAAQ,IAAY;KAClC,EACF,KAAS,IAAY;IACrB"}
@@ -0,0 +1,39 @@
1
+ import { __commonJSMin as e } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_graphlib as t } from "../graphlib.js";
3
+ import { require_lodash as n } from "../lodash.js";
4
+ import { require_util as r } from "./util.js";
5
+ //#region node_modules/dagre/lib/rank/feasible-tree.js
6
+ var i = /* @__PURE__ */ e(((e, i) => {
7
+ var a = n(), o = t().Graph, s = r().slack;
8
+ i.exports = c;
9
+ function c(e) {
10
+ var t = new o({ directed: !1 }), n = e.nodes()[0], r = e.nodeCount();
11
+ t.setNode(n, {});
12
+ for (var i, a; l(t, e) < r;) i = u(t, e), a = t.hasNode(i.v) ? s(e, i) : -s(e, i), d(t, e, a);
13
+ return t;
14
+ }
15
+ function l(e, t) {
16
+ function n(r) {
17
+ a.forEach(t.nodeEdges(r), function(i) {
18
+ var a = i.v, o = r === a ? i.w : a;
19
+ !e.hasNode(o) && !s(t, i) && (e.setNode(o, {}), e.setEdge(r, o, {}), n(o));
20
+ });
21
+ }
22
+ return a.forEach(e.nodes(), n), e.nodeCount();
23
+ }
24
+ function u(e, t) {
25
+ return a.minBy(t.edges(), function(n) {
26
+ if (e.hasNode(n.v) !== e.hasNode(n.w)) return s(t, n);
27
+ });
28
+ }
29
+ function d(e, t, n) {
30
+ a.forEach(e.nodes(), function(e) {
31
+ t.node(e).rank += n;
32
+ });
33
+ }
34
+ }));
35
+ //#endregion
36
+ export default i();
37
+ export { i as require_feasible_tree };
38
+
39
+ //# sourceMappingURL=feasible-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feasible-tree.js","names":[],"sources":["../../../../../node_modules/dagre/lib/rank/feasible-tree.js"],"sourcesContent":["\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar Graph = require(\"../graphlib\").Graph;\nvar slack = require(\"./util\").slack;\n\nmodule.exports = feasibleTree;\n\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\nfunction feasibleTree(g) {\n var t = new Graph({ directed: false });\n\n // Choose arbitrary node from which to start our tree\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n\n var edge, delta;\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n shiftRanks(t, g, delta);\n }\n\n return t;\n}\n\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\nfunction tightTree(t, g) {\n function dfs(v) {\n _.forEach(g.nodeEdges(v), function(e) {\n var edgeV = e.v,\n w = (v === edgeV) ? e.w : edgeV;\n if (!t.hasNode(w) && !slack(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n }\n\n _.forEach(t.nodes(), dfs);\n return t.nodeCount();\n}\n\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\nfunction findMinSlackEdge(t, g) {\n return _.minBy(g.edges(), function(e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return slack(g, e);\n }\n });\n}\n\nfunction shiftRanks(t, g, delta) {\n _.forEach(t.nodes(), function(v) {\n g.node(v).rank += delta;\n });\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAEA,IAAI,IAAA,GAAA,EACA,IAAA,GAAA,CAA+B,OAC/B,IAAA,GAAA,CAA0B;AAE9B,GAAO,UAAU;CA2BjB,SAAS,EAAa,GAAG;EACvB,IAAI,IAAI,IAAI,EAAM,EAAE,UAAU,IAAO,CAAC,EAGlC,IAAQ,EAAE,OAAO,CAAC,IAClB,IAAO,EAAE,WAAW;AACxB,IAAE,QAAQ,GAAO,EAAE,CAAC;AAGpB,OADA,IAAI,GAAM,GACH,EAAU,GAAG,EAAE,GAAG,GAGvB,CAFA,IAAO,EAAiB,GAAG,EAAE,EAC7B,IAAQ,EAAE,QAAQ,EAAK,EAAE,GAAG,EAAM,GAAG,EAAK,GAAG,CAAC,EAAM,GAAG,EAAK,EAC5D,EAAW,GAAG,GAAG,EAAM;AAGzB,SAAO;;CAOT,SAAS,EAAU,GAAG,GAAG;EACvB,SAAS,EAAI,GAAG;AACd,KAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,SAAS,GAAG;IACpC,IAAI,IAAQ,EAAE,GACZ,IAAK,MAAM,IAAS,EAAE,IAAI;AAC5B,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAM,GAAG,EAAE,KAC/B,EAAE,QAAQ,GAAG,EAAE,CAAC,EAChB,EAAE,QAAQ,GAAG,GAAG,EAAE,CAAC,EACnB,EAAI,EAAE;KAER;;AAIJ,SADA,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAI,EAClB,EAAE,WAAW;;CAOtB,SAAS,EAAiB,GAAG,GAAG;AAC9B,SAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG;AACpC,OAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CACnC,QAAO,EAAM,GAAG,EAAE;IAEpB;;CAGJ,SAAS,EAAW,GAAG,GAAG,GAAO;AAC/B,IAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,GAAG;AAC/B,KAAE,KAAK,EAAE,CAAC,QAAQ;IAClB"}
@@ -0,0 +1,35 @@
1
+ import { __commonJSMin as e } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_util as t } from "./util.js";
3
+ import { require_feasible_tree as n } from "./feasible-tree.js";
4
+ import { require_network_simplex as r } from "./network-simplex.js";
5
+ //#region node_modules/dagre/lib/rank/index.js
6
+ var i = /* @__PURE__ */ e(((e, i) => {
7
+ var a = t().longestPath, o = n(), s = r();
8
+ i.exports = c;
9
+ function c(e) {
10
+ switch (e.graph().ranker) {
11
+ case "network-simplex":
12
+ d(e);
13
+ break;
14
+ case "tight-tree":
15
+ u(e);
16
+ break;
17
+ case "longest-path":
18
+ l(e);
19
+ break;
20
+ default: d(e);
21
+ }
22
+ }
23
+ var l = a;
24
+ function u(e) {
25
+ a(e), o(e);
26
+ }
27
+ function d(e) {
28
+ s(e);
29
+ }
30
+ }));
31
+ //#endregion
32
+ export default i();
33
+ export { i as require_rank };
34
+
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../node_modules/dagre/lib/rank/index.js"],"sourcesContent":["\"use strict\";\n\nvar rankUtil = require(\"./util\");\nvar longestPath = rankUtil.longestPath;\nvar feasibleTree = require(\"./feasible-tree\");\nvar networkSimplex = require(\"./network-simplex\");\n\nmodule.exports = rank;\n\n/*\n * Assigns a rank to each node in the input graph that respects the \"minlen\"\n * constraint specified on edges between nodes.\n *\n * This basic structure is derived from Gansner, et al., \"A Technique for\n * Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a connected DAG\n * 2. Graph nodes must be objects\n * 3. Graph edges must have \"weight\" and \"minlen\" attributes\n *\n * Post-conditions:\n *\n * 1. Graph nodes will have a \"rank\" attribute based on the results of the\n * algorithm. Ranks can start at any index (including negative), we'll\n * fix them up later.\n */\nfunction rank(g) {\n switch(g.graph().ranker) {\n case \"network-simplex\": networkSimplexRanker(g); break;\n case \"tight-tree\": tightTreeRanker(g); break;\n case \"longest-path\": longestPathRanker(g); break;\n default: networkSimplexRanker(g);\n }\n}\n\n// A fast and simple ranker, but results are far from optimal.\nvar longestPathRanker = longestPath;\n\nfunction tightTreeRanker(g) {\n longestPath(g);\n feasibleTree(g);\n}\n\nfunction networkSimplexRanker(g) {\n networkSimplex(g);\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CAGA,IAAI,IAAA,GAAA,CAAuB,aACvB,IAAA,GAAA,EACA,IAAA,GAAA;AAEJ,GAAO,UAAU;CAqBjB,SAAS,EAAK,GAAG;AACf,UAAO,EAAE,OAAO,CAAC,QAAjB;GACA,KAAK;AAAmB,MAAqB,EAAE;AAAE;GACjD,KAAK;AAAc,MAAgB,EAAE;AAAE;GACvC,KAAK;AAAgB,MAAkB,EAAE;AAAE;GAC3C,QAAS,GAAqB,EAAE;;;CAKlC,IAAI,IAAoB;CAExB,SAAS,EAAgB,GAAG;AAE1B,EADA,EAAY,EAAE,EACd,EAAa,EAAE;;CAGjB,SAAS,EAAqB,GAAG;AAC/B,IAAe,EAAE"}
@@ -0,0 +1,90 @@
1
+ import { __commonJSMin as e } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_graphlib as t } from "../graphlib.js";
3
+ import { require_lodash as n } from "../lodash.js";
4
+ import { require_util as r } from "../util.js";
5
+ import { require_util as i } from "./util.js";
6
+ import { require_feasible_tree as a } from "./feasible-tree.js";
7
+ //#region node_modules/dagre/lib/rank/network-simplex.js
8
+ var o = /* @__PURE__ */ e(((e, o) => {
9
+ var s = n(), c = a(), l = i().slack, u = i().longestPath, d = t().alg.preorder, f = t().alg.postorder, p = r().simplify;
10
+ o.exports = m, m.initLowLimValues = v, m.initCutValues = h, m.calcCutValue = _, m.leaveEdge = b, m.enterEdge = x, m.exchangeEdges = S;
11
+ function m(e) {
12
+ e = p(e), u(e);
13
+ var t = c(e);
14
+ v(t), h(t, e);
15
+ for (var n, r; n = b(t);) r = x(t, e, n), S(t, e, n, r);
16
+ }
17
+ function h(e, t) {
18
+ var n = f(e, e.nodes());
19
+ n = n.slice(0, n.length - 1), s.forEach(n, function(n) {
20
+ g(e, t, n);
21
+ });
22
+ }
23
+ function g(e, t, n) {
24
+ var r = e.node(n).parent;
25
+ e.edge(n, r).cutvalue = _(e, t, n);
26
+ }
27
+ function _(e, t, n) {
28
+ var r = e.node(n).parent, i = !0, a = t.edge(n, r), o = 0;
29
+ return a ||= (i = !1, t.edge(r, n)), o = a.weight, s.forEach(t.nodeEdges(n), function(a) {
30
+ var s = a.v === n, c = s ? a.w : a.v;
31
+ if (c !== r) {
32
+ var l = s === i, u = t.edge(a).weight;
33
+ if (o += l ? u : -u, w(e, n, c)) {
34
+ var d = e.edge(n, c).cutvalue;
35
+ o += l ? -d : d;
36
+ }
37
+ }
38
+ }), o;
39
+ }
40
+ function v(e, t) {
41
+ arguments.length < 2 && (t = e.nodes()[0]), y(e, {}, 1, t);
42
+ }
43
+ function y(e, t, n, r, i) {
44
+ var a = n, o = e.node(r);
45
+ return t[r] = !0, s.forEach(e.neighbors(r), function(i) {
46
+ s.has(t, i) || (n = y(e, t, n, i, r));
47
+ }), o.low = a, o.lim = n++, i ? o.parent = i : delete o.parent, n;
48
+ }
49
+ function b(e) {
50
+ return s.find(e.edges(), function(t) {
51
+ return e.edge(t).cutvalue < 0;
52
+ });
53
+ }
54
+ function x(e, t, n) {
55
+ var r = n.v, i = n.w;
56
+ t.hasEdge(r, i) || (r = n.w, i = n.v);
57
+ var a = e.node(r), o = e.node(i), c = a, u = !1;
58
+ a.lim > o.lim && (c = o, u = !0);
59
+ var d = s.filter(t.edges(), function(t) {
60
+ return u === T(e, e.node(t.v), c) && u !== T(e, e.node(t.w), c);
61
+ });
62
+ return s.minBy(d, function(e) {
63
+ return l(t, e);
64
+ });
65
+ }
66
+ function S(e, t, n, r) {
67
+ var i = n.v, a = n.w;
68
+ e.removeEdge(i, a), e.setEdge(r.v, r.w, {}), v(e), h(e, t), C(e, t);
69
+ }
70
+ function C(e, t) {
71
+ var n = d(e, s.find(e.nodes(), function(e) {
72
+ return !t.node(e).parent;
73
+ }));
74
+ n = n.slice(1), s.forEach(n, function(n) {
75
+ var r = e.node(n).parent, i = t.edge(n, r), a = !1;
76
+ i || (i = t.edge(r, n), a = !0), t.node(n).rank = t.node(r).rank + (a ? i.minlen : -i.minlen);
77
+ });
78
+ }
79
+ function w(e, t, n) {
80
+ return e.hasEdge(t, n);
81
+ }
82
+ function T(e, t, n) {
83
+ return n.low <= t.lim && t.lim <= n.lim;
84
+ }
85
+ }));
86
+ //#endregion
87
+ export default o();
88
+ export { o as require_network_simplex };
89
+
90
+ //# sourceMappingURL=network-simplex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-simplex.js","names":[],"sources":["../../../../../node_modules/dagre/lib/rank/network-simplex.js"],"sourcesContent":["\"use strict\";\n\nvar _ = require(\"../lodash\");\nvar feasibleTree = require(\"./feasible-tree\");\nvar slack = require(\"./util\").slack;\nvar initRank = require(\"./util\").longestPath;\nvar preorder = require(\"../graphlib\").alg.preorder;\nvar postorder = require(\"../graphlib\").alg.postorder;\nvar simplify = require(\"../util\").simplify;\n\nmodule.exports = networkSimplex;\n\n// Expose some internals for testing purposes\nnetworkSimplex.initLowLimValues = initLowLimValues;\nnetworkSimplex.initCutValues = initCutValues;\nnetworkSimplex.calcCutValue = calcCutValue;\nnetworkSimplex.leaveEdge = leaveEdge;\nnetworkSimplex.enterEdge = enterEdge;\nnetworkSimplex.exchangeEdges = exchangeEdges;\n\n/*\n * The network simplex algorithm assigns ranks to each node in the input graph\n * and iteratively improves the ranking to reduce the length of edges.\n *\n * Preconditions:\n *\n * 1. The input graph must be a DAG.\n * 2. All nodes in the graph must have an object value.\n * 3. All edges in the graph must have \"minlen\" and \"weight\" attributes.\n *\n * Postconditions:\n *\n * 1. All nodes in the graph will have an assigned \"rank\" attribute that has\n * been optimized by the network simplex algorithm. Ranks start at 0.\n *\n *\n * A rough sketch of the algorithm is as follows:\n *\n * 1. Assign initial ranks to each node. We use the longest path algorithm,\n * which assigns ranks to the lowest position possible. In general this\n * leads to very wide bottom ranks and unnecessarily long edges.\n * 2. Construct a feasible tight tree. A tight tree is one such that all\n * edges in the tree have no slack (difference between length of edge\n * and minlen for the edge). This by itself greatly improves the assigned\n * rankings by shorting edges.\n * 3. Iteratively find edges that have negative cut values. Generally a\n * negative cut value indicates that the edge could be removed and a new\n * tree edge could be added to produce a more compact graph.\n *\n * Much of the algorithms here are derived from Gansner, et al., \"A Technique\n * for Drawing Directed Graphs.\" The structure of the file roughly follows the\n * structure of the overall algorithm.\n */\nfunction networkSimplex(g) {\n g = simplify(g);\n initRank(g);\n var t = feasibleTree(g);\n initLowLimValues(t);\n initCutValues(t, g);\n\n var e, f;\n while ((e = leaveEdge(t))) {\n f = enterEdge(t, g, e);\n exchangeEdges(t, g, e, f);\n }\n}\n\n/*\n * Initializes cut values for all edges in the tree.\n */\nfunction initCutValues(t, g) {\n var vs = postorder(t, t.nodes());\n vs = vs.slice(0, vs.length - 1);\n _.forEach(vs, function(v) {\n assignCutValue(t, g, v);\n });\n}\n\nfunction assignCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n t.edge(child, parent).cutvalue = calcCutValue(t, g, child);\n}\n\n/*\n * Given the tight tree, its graph, and a child in the graph calculate and\n * return the cut value for the edge between the child and its parent.\n */\nfunction calcCutValue(t, g, child) {\n var childLab = t.node(child);\n var parent = childLab.parent;\n // True if the child is on the tail end of the edge in the directed graph\n var childIsTail = true;\n // The graph's view of the tree edge we're inspecting\n var graphEdge = g.edge(child, parent);\n // The accumulated cut value for the edge between this node and its parent\n var cutValue = 0;\n\n if (!graphEdge) {\n childIsTail = false;\n graphEdge = g.edge(parent, child);\n }\n\n cutValue = graphEdge.weight;\n\n _.forEach(g.nodeEdges(child), function(e) {\n var isOutEdge = e.v === child,\n other = isOutEdge ? e.w : e.v;\n\n if (other !== parent) {\n var pointsToHead = isOutEdge === childIsTail,\n otherWeight = g.edge(e).weight;\n\n cutValue += pointsToHead ? otherWeight : -otherWeight;\n if (isTreeEdge(t, child, other)) {\n var otherCutValue = t.edge(child, other).cutvalue;\n cutValue += pointsToHead ? -otherCutValue : otherCutValue;\n }\n }\n });\n\n return cutValue;\n}\n\nfunction initLowLimValues(tree, root) {\n if (arguments.length < 2) {\n root = tree.nodes()[0];\n }\n dfsAssignLowLim(tree, {}, 1, root);\n}\n\nfunction dfsAssignLowLim(tree, visited, nextLim, v, parent) {\n var low = nextLim;\n var label = tree.node(v);\n\n visited[v] = true;\n _.forEach(tree.neighbors(v), function(w) {\n if (!_.has(visited, w)) {\n nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);\n }\n });\n\n label.low = low;\n label.lim = nextLim++;\n if (parent) {\n label.parent = parent;\n } else {\n // TODO should be able to remove this when we incrementally update low lim\n delete label.parent;\n }\n\n return nextLim;\n}\n\nfunction leaveEdge(tree) {\n return _.find(tree.edges(), function(e) {\n return tree.edge(e).cutvalue < 0;\n });\n}\n\nfunction enterEdge(t, g, edge) {\n var v = edge.v;\n var w = edge.w;\n\n // For the rest of this function we assume that v is the tail and w is the\n // head, so if we don't have this edge in the graph we should flip it to\n // match the correct orientation.\n if (!g.hasEdge(v, w)) {\n v = edge.w;\n w = edge.v;\n }\n\n var vLabel = t.node(v);\n var wLabel = t.node(w);\n var tailLabel = vLabel;\n var flip = false;\n\n // If the root is in the tail of the edge then we need to flip the logic that\n // checks for the head and tail nodes in the candidates function below.\n if (vLabel.lim > wLabel.lim) {\n tailLabel = wLabel;\n flip = true;\n }\n\n var candidates = _.filter(g.edges(), function(edge) {\n return flip === isDescendant(t, t.node(edge.v), tailLabel) &&\n flip !== isDescendant(t, t.node(edge.w), tailLabel);\n });\n\n return _.minBy(candidates, function(edge) { return slack(g, edge); });\n}\n\nfunction exchangeEdges(t, g, e, f) {\n var v = e.v;\n var w = e.w;\n t.removeEdge(v, w);\n t.setEdge(f.v, f.w, {});\n initLowLimValues(t);\n initCutValues(t, g);\n updateRanks(t, g);\n}\n\nfunction updateRanks(t, g) {\n var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; });\n var vs = preorder(t, root);\n vs = vs.slice(1);\n _.forEach(vs, function(v) {\n var parent = t.node(v).parent,\n edge = g.edge(v, parent),\n flipped = false;\n\n if (!edge) {\n edge = g.edge(parent, v);\n flipped = true;\n }\n\n g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);\n });\n}\n\n/*\n * Returns true if the edge is in the tree.\n */\nfunction isTreeEdge(tree, u, v) {\n return tree.hasEdge(u, v);\n}\n\n/*\n * Returns true if the specified node is descendant of the root node per the\n * assigned low and lim attributes in the tree.\n */\nfunction isDescendant(tree, vLabel, rootLabel) {\n return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;CAEA,IAAI,IAAA,GAAA,EACA,IAAA,GAAA,EACA,IAAA,GAAA,CAA0B,OAC1B,IAAA,GAAA,CAA6B,aAC7B,IAAA,GAAA,CAAkC,IAAI,UACtC,IAAA,GAAA,CAAmC,IAAI,WACvC,IAAA,GAAA,CAA8B;AAUlC,CARA,EAAO,UAAU,GAGjB,EAAe,mBAAmB,GAClC,EAAe,gBAAgB,GAC/B,EAAe,eAAe,GAC9B,EAAe,YAAY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I;;CAGvE,SAAS,EAAc,GAAG,GAAG,GAAG,GAAG;EACjC,IAAI,IAAI,EAAE,GACN,IAAI,EAAE;AAKV,EAJA,EAAE,WAAW,GAAG,EAAE,EAClB,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EACvB,EAAiB,EAAE,EACnB,EAAc,GAAG,EAAE,EACnB,EAAY,GAAG,EAAE;;CAGnB,SAAS,EAAY,GAAG,GAAG;EAEzB,IAAI,IAAK,EAAS,GADP,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,GAAG;AAAE,UAAO,CAAC,EAAE,KAAK,EAAE,CAAC;IAAU,CAC7C;AAE1B,EADA,IAAK,EAAG,MAAM,EAAE,EAChB,EAAE,QAAQ,GAAI,SAAS,GAAG;GACxB,IAAI,IAAS,EAAE,KAAK,EAAE,CAAC,QACrB,IAAO,EAAE,KAAK,GAAG,EAAO,EACxB,IAAU;AAOZ,GALK,MACH,IAAO,EAAE,KAAK,GAAQ,EAAE,EACxB,IAAU,KAGZ,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,EAAO,CAAC,QAAQ,IAAU,EAAK,SAAS,CAAC,EAAK;IACtE;;CAMJ,SAAS,EAAW,GAAM,GAAG,GAAG;AAC9B,SAAO,EAAK,QAAQ,GAAG,EAAE;;CAO3B,SAAS,EAAa,GAAM,GAAQ,GAAW;AAC7C,SAAO,EAAU,OAAO,EAAO,OAAO,EAAO,OAAO,EAAU"}
@@ -0,0 +1,31 @@
1
+ import { __commonJSMin as e } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_lodash as t } from "../lodash.js";
3
+ //#region node_modules/dagre/lib/rank/util.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ var r = t();
6
+ n.exports = {
7
+ longestPath: i,
8
+ slack: a
9
+ };
10
+ function i(e) {
11
+ var t = {};
12
+ function n(i) {
13
+ var a = e.node(i);
14
+ if (r.has(t, i)) return a.rank;
15
+ t[i] = !0;
16
+ var o = r.min(r.map(e.outEdges(i), function(t) {
17
+ return n(t.w) - e.edge(t).minlen;
18
+ }));
19
+ return (o === Infinity || o == null) && (o = 0), a.rank = o;
20
+ }
21
+ r.forEach(e.sources(), n);
22
+ }
23
+ function a(e, t) {
24
+ return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
25
+ }
26
+ }));
27
+ //#endregion
28
+ export default n();
29
+ export { n as require_util };
30
+
31
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","names":[],"sources":["../../../../../node_modules/dagre/lib/rank/util.js"],"sourcesContent":["\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = {\n longestPath: longestPath,\n slack: slack\n};\n\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\nfunction longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n if (_.has(visited, v)) {\n return label.rank;\n }\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function(e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) { // return value of _.map([null])\n rank = 0;\n }\n\n return (label.rank = rank);\n }\n\n _.forEach(g.sources(), dfs);\n}\n\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\nfunction slack(g, e) {\n return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;CAEA,IAAI,IAAA,GAAA;AAEJ,GAAO,UAAU;EACF;EACN;EACR;CAuBD,SAAS,EAAY,GAAG;EACtB,IAAI,IAAU,EAAE;EAEhB,SAAS,EAAI,GAAG;GACd,IAAI,IAAQ,EAAE,KAAK,EAAE;AACrB,OAAI,EAAE,IAAI,GAAS,EAAE,CACnB,QAAO,EAAM;AAEf,KAAQ,KAAK;GAEb,IAAI,IAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG;AAChD,WAAO,EAAI,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;KAC5B,CAAC;AAQH,WANI,MAAS,YACT,KACS,UACX,IAAO,IAGD,EAAM,OAAO;;AAGvB,IAAE,QAAQ,EAAE,SAAS,EAAE,EAAI;;CAO7B,SAAS,EAAM,GAAG,GAAG;AACnB,SAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC"}