import { asNonCompoundGraph as f, buildLayerMatrix as e } from "../util.js";
import { positionX as u } from "./bk.js";
import c from "../../../../../../lodash-es@4.17.22/node_modules/lodash-es/forOwn.js";
import a from "../../../../../../lodash-es@4.17.22/node_modules/lodash-es/forEach.js";
import h from "../../../../../../lodash-es@4.17.22/node_modules/lodash-es/max.js";
import d from "../../../../../../lodash-es@4.17.22/node_modules/lodash-es/map.js";
function l(o) {
  o = f(o), s(o), c(u(o), function(r, n) {
    o.node(n).x = r;
  });
}
function s(o) {
  var r = e(o), n = o.graph().ranksep, t = 0;
  a(r, function(p) {
    var m = h(
      d(p, function(i) {
        return o.node(i).height;
      })
    );
    a(p, function(i) {
      o.node(i).y = t + m / 2;
    }), t += m + n;
  });
}
export {
  l as position
};
