import e from "../../../d3-selection/src/namespace.js";
import { interpolateTransformSvg as t } from "../../../d3-interpolate/src/transform/index.js";
import { tweenValue as n } from "./tween.js";
import r from "./interpolate.js";
//#region ../../node_modules/d3-transition/src/transition/attr.js
function i(e) {
	return function() {
		this.removeAttribute(e);
	};
}
function a(e) {
	return function() {
		this.removeAttributeNS(e.space, e.local);
	};
}
function o(e, t, n) {
	var r, i = n + "", a;
	return function() {
		var o = this.getAttribute(e);
		return o === i ? null : o === r ? a : a = t(r = o, n);
	};
}
function s(e, t, n) {
	var r, i = n + "", a;
	return function() {
		var o = this.getAttributeNS(e.space, e.local);
		return o === i ? null : o === r ? a : a = t(r = o, n);
	};
}
function c(e, t, n) {
	var r, i, a;
	return function() {
		var o, s = n(this), c;
		return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
	};
}
function l(e, t, n) {
	var r, i, a;
	return function() {
		var o, s = n(this), c;
		return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
	};
}
function u(u, d) {
	var f = e(u), p = f === "transform" ? t : r;
	return this.attrTween(u, typeof d == "function" ? (f.local ? l : c)(f, p, n(this, "attr." + u, d)) : d == null ? (f.local ? a : i)(f) : (f.local ? s : o)(f, p, d));
}
//#endregion
export { u as default };
