2024-09-08 22:05:57 +08:00
|
|
|
import"./graph-KXTbaKYb.js";import{aA as i,ah as d}from"./index-DEkCliAN.js";import{m as t}from"./min-NlK9eGES.js";function v(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:u(e),edges:s(e)};return i(e.graph())||(r.value=d(e.graph())),r}function u(e){return t(e.nodes(),function(r){var a=e.node(r),n=e.parent(r),o={v:r};return i(a)||(o.value=a),i(n)||(o.parent=n),o})}function s(e){return t(e.edges(),function(r){var a=e.edge(r),n={v:r.v,w:r.w};return i(r.name)||(n.name=r.name),i(a)||(n.value=a),n})}export{v as w};
|