import e from "../../../lodash-es/forEach.js";
//#region ../../node_modules/dagre-d3-es/src/dagre/coordinate-system.js
function t(e) {
	var t = e.graph().rankdir.toLowerCase();
	(t === "lr" || t === "rl") && r(e);
}
function n(e) {
	var t = e.graph().rankdir.toLowerCase();
	(t === "bt" || t === "rl") && a(e), (t === "lr" || t === "rl") && (s(e), r(e));
}
function r(t) {
	e(t.nodes(), function(e) {
		i(t.node(e));
	}), e(t.edges(), function(e) {
		i(t.edge(e));
	});
}
function i(e) {
	var t = e.width;
	e.width = e.height, e.height = t;
}
function a(t) {
	e(t.nodes(), function(e) {
		o(t.node(e));
	}), e(t.edges(), function(n) {
		var r = t.edge(n);
		e(r.points, o), Object.prototype.hasOwnProperty.call(r, "y") && o(r);
	});
}
function o(e) {
	e.y = -e.y;
}
function s(t) {
	e(t.nodes(), function(e) {
		c(t.node(e));
	}), e(t.edges(), function(n) {
		var r = t.edge(n);
		e(r.points, c), Object.prototype.hasOwnProperty.call(r, "x") && c(r);
	});
}
function c(e) {
	var t = e.x;
	e.x = e.y, e.y = t;
}
//#endregion
export { t as adjust, n as undo };
