import{r as e}from"./_baseUniq-gTUuvs71.js";import{s as t}from"./_basePickBy-BuVphSgv.js";import{t as n}from"./clone-CvGsTWUN.js";function r(t){var r={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:i(t),edges:a(t)};return e(t.graph())||(r.value=n(t.graph())),r}function i(n){return t(n.nodes(),function(t){var r=n.node(t),i=n.parent(t),a={v:t};return e(r)||(a.value=r),e(i)||(a.parent=i),a})}function a(n){return t(n.edges(),function(t){var r=n.edge(t),i={v:t.v,w:t.w};return e(t.name)||(i.name=t.name),e(r)||(i.value=r),i})}export{r as t};