import e from "../../../d3-path/src/path.js";
import t from "../constant.js";
import { x as n, y as r } from "../point.js";
import { slice as i } from "../array.js";
//#region ../../node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js
function a(e) {
	return e.source;
}
function o(e) {
	return e.target;
}
function s(s) {
	var c = a, l = o, u = n, d = r, f = null;
	function p() {
		var t, n = i.call(arguments), r = c.apply(this, n), a = l.apply(this, n);
		if (f ||= t = e(), s(f, +u.apply(this, (n[0] = r, n)), +d.apply(this, n), +u.apply(this, (n[0] = a, n)), +d.apply(this, n)), t) return f = null, t + "" || null;
	}
	return p.source = function(e) {
		return arguments.length ? (c = e, p) : c;
	}, p.target = function(e) {
		return arguments.length ? (l = e, p) : l;
	}, p.x = function(e) {
		return arguments.length ? (u = typeof e == "function" ? e : t(+e), p) : u;
	}, p.y = function(e) {
		return arguments.length ? (d = typeof e == "function" ? e : t(+e), p) : d;
	}, p.context = function(e) {
		return arguments.length ? (f = e ?? null, p) : f;
	}, p;
}
function c(e, t, n, r, i) {
	e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
}
function l() {
	return s(c);
}
//#endregion
export { l as linkHorizontal };
