livebook/static/assets/chunk-OAJ6LBAA.js
2024-10-15 08:33:30 +00:00

1 line
510 B
JavaScript

import{D as i,e as o,s as t}from"./chunk-UEXLG4I5.js";function m(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:u(e),edges:f(e)};return i(e.graph())||(n.value=o(e.graph())),n}function u(e){return t(e.nodes(),function(n){var r=e.node(n),a=e.parent(n),d={v:n};return i(r)||(d.value=r),i(a)||(d.parent=a),d})}function f(e){return t(e.edges(),function(n){var r=e.edge(n),a={v:n.v,w:n.w};return i(n.name)||(a.name=n.name),i(r)||(a.value=r),a})}export{m as a};