import { l as e, n as t, o as n, r, t as i } from "./src-DI0MZP4m.js";
import { i as a, n as o, r as s, t as c } from "./defaultLocale-CS9riXxY.js";
import { t as l } from "./init-B4NvJPDj.js";
//#region node_modules/d3-array/src/ascending.js
function u(e, t) {
	return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/descending.js
function d(e, t) {
	return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-array/src/bisector.js
function f(e) {
	let t, n, r;
	e.length === 2 ? (t = e === u || e === d ? e : p, n = e, r = e) : (t = u, n = (t, n) => u(e(t), n), r = (t, n) => e(t) - n);
	function i(e, r, i = 0, a = e.length) {
		if (i < a) {
			if (t(r, r) !== 0) return a;
			do {
				let t = i + a >>> 1;
				n(e[t], r) < 0 ? i = t + 1 : a = t;
			} while (i < a);
		}
		return i;
	}
	function a(e, r, i = 0, a = e.length) {
		if (i < a) {
			if (t(r, r) !== 0) return a;
			do {
				let t = i + a >>> 1;
				n(e[t], r) <= 0 ? i = t + 1 : a = t;
			} while (i < a);
		}
		return i;
	}
	function o(e, t, n = 0, a = e.length) {
		let o = i(e, t, n, a - 1);
		return o > n && r(e[o - 1], t) > -r(e[o], t) ? o - 1 : o;
	}
	return {
		left: i,
		center: o,
		right: a
	};
}
function p() {
	return 0;
}
//#endregion
//#region node_modules/d3-array/src/number.js
function m(e) {
	return e === null ? NaN : +e;
}
//#endregion
//#region node_modules/d3-array/src/bisect.js
var h = f(u), g = h.right;
h.left, f(m).center;
//#endregion
//#region node_modules/d3-array/src/ticks.js
var _ = Math.sqrt(50), v = Math.sqrt(10), y = Math.sqrt(2);
function b(e, t, n) {
	let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / 10 ** i, o = a >= _ ? 10 : a >= v ? 5 : a >= y ? 2 : 1, s, c, l;
	return i < 0 ? (l = 10 ** -i / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = 10 ** i * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? b(e, t, n * 2) : [
		s,
		c,
		l
	];
}
function x(e, t, n) {
	if (t = +t, e = +e, n = +n, !(n > 0)) return [];
	if (e === t) return [e];
	let r = t < e, [i, a, o] = r ? b(t, e, n) : b(e, t, n);
	if (!(a >= i)) return [];
	let s = a - i + 1, c = Array(s);
	if (r) if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
	else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
	else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
	else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
	return c;
}
function S(e, t, n) {
	return t = +t, e = +e, n = +n, b(e, t, n)[2];
}
function C(e, t, n) {
	t = +t, e = +e, n = +n;
	let r = t < e, i = r ? S(t, e, n) : S(e, t, n);
	return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
}
//#endregion
//#region node_modules/d3-interpolate/src/numberArray.js
function w(e, t) {
	t ||= [];
	var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
	return function(a) {
		for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
		return r;
	};
}
function T(e) {
	return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/d3-interpolate/src/array.js
function E(e, t) {
	var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
	for (o = 0; o < r; ++o) i[o] = k(e[o], t[o]);
	for (; o < n; ++o) a[o] = t[o];
	return function(e) {
		for (o = 0; o < r; ++o) a[o] = i[o](e);
		return a;
	};
}
//#endregion
//#region node_modules/d3-interpolate/src/date.js
function D(e, t) {
	var n = /* @__PURE__ */ new Date();
	return e = +e, t = +t, function(r) {
		return n.setTime(e * (1 - r) + t * r), n;
	};
}
//#endregion
//#region node_modules/d3-interpolate/src/object.js
function O(e, t) {
	var n = {}, r = {}, i;
	for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = k(e[i], t[i]) : r[i] = t[i];
	return function(e) {
		for (i in n) r[i] = n[i](e);
		return r;
	};
}
//#endregion
//#region node_modules/d3-interpolate/src/value.js
function k(a, o) {
	var s = typeof o, c;
	return o == null || s === "boolean" ? n(o) : (s === "number" ? t : s === "string" ? (c = e(o)) ? (o = c, r) : i : o instanceof e ? r : o instanceof Date ? D : T(o) ? w : Array.isArray(o) ? E : typeof o.valueOf != "function" && typeof o.toString != "function" || isNaN(o) ? O : t)(a, o);
}
//#endregion
//#region node_modules/d3-interpolate/src/round.js
function A(e, t) {
	return e = +e, t = +t, function(n) {
		return Math.round(e * (1 - n) + t * n);
	};
}
//#endregion
//#region node_modules/d3-format/src/precisionFixed.js
function j(e) {
	return Math.max(0, -a(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionPrefix.js
function M(e, t) {
	return Math.max(0, Math.max(-8, Math.min(8, Math.floor(a(t) / 3))) * 3 - a(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionRound.js
function N(e, t) {
	return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, a(t) - a(e)) + 1;
}
//#endregion
//#region node_modules/d3-scale/src/constant.js
function P(e) {
	return function() {
		return e;
	};
}
//#endregion
//#region node_modules/d3-scale/src/number.js
function F(e) {
	return +e;
}
//#endregion
//#region node_modules/d3-scale/src/continuous.js
var I = [0, 1];
function L(e) {
	return e;
}
function R(e, t) {
	return (t -= e = +e) ? function(n) {
		return (n - e) / t;
	} : P(isNaN(t) ? NaN : .5);
}
function z(e, t) {
	var n;
	return e > t && (n = e, e = t, t = n), function(n) {
		return Math.max(e, Math.min(t, n));
	};
}
function B(e, t, n) {
	var r = e[0], i = e[1], a = t[0], o = t[1];
	return i < r ? (r = R(i, r), a = n(o, a)) : (r = R(r, i), a = n(a, o)), function(e) {
		return a(r(e));
	};
}
function V(e, t, n) {
	var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
	for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = R(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
	return function(t) {
		var n = g(e, t, 1, r) - 1;
		return a[n](i[n](t));
	};
}
function H(e, t) {
	return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
}
function U() {
	var e = I, n = I, r = k, i, a, o, s = L, c, l, u;
	function d() {
		var t = Math.min(e.length, n.length);
		return s !== L && (s = z(e[0], e[t - 1])), c = t > 2 ? V : B, l = u = null, f;
	}
	function f(t) {
		return t == null || isNaN(t = +t) ? o : (l ||= c(e.map(i), n, r))(i(s(t)));
	}
	return f.invert = function(r) {
		return s(a((u ||= c(n, e.map(i), t))(r)));
	}, f.domain = function(t) {
		return arguments.length ? (e = Array.from(t, F), d()) : e.slice();
	}, f.range = function(e) {
		return arguments.length ? (n = Array.from(e), d()) : n.slice();
	}, f.rangeRound = function(e) {
		return n = Array.from(e), r = A, d();
	}, f.clamp = function(e) {
		return arguments.length ? (s = e ? !0 : L, d()) : s !== L;
	}, f.interpolate = function(e) {
		return arguments.length ? (r = e, d()) : r;
	}, f.unknown = function(e) {
		return arguments.length ? (o = e, f) : o;
	}, function(e, t) {
		return i = e, a = t, d();
	};
}
function W() {
	return U()(L, L);
}
//#endregion
//#region node_modules/d3-scale/src/tickFormat.js
function G(e, t, n, r) {
	var i = C(e, t, n), a;
	switch (r = s(r ?? ",f"), r.type) {
		case "s":
			var l = Math.max(Math.abs(e), Math.abs(t));
			return r.precision == null && !isNaN(a = M(i, l)) && (r.precision = a), o(r, l);
		case "":
		case "e":
		case "g":
		case "p":
		case "r":
			r.precision == null && !isNaN(a = N(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
			break;
		case "f":
		case "%":
			r.precision == null && !isNaN(a = j(i)) && (r.precision = a - (r.type === "%") * 2);
			break;
	}
	return c(r);
}
//#endregion
//#region node_modules/d3-scale/src/linear.js
function K(e) {
	var t = e.domain;
	return e.ticks = function(e) {
		var n = t();
		return x(n[0], n[n.length - 1], e ?? 10);
	}, e.tickFormat = function(e, n) {
		var r = t();
		return G(r[0], r[r.length - 1], e ?? 10, n);
	}, e.nice = function(n) {
		n ??= 10;
		var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
		for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
			if (l = S(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
			if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
			else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
			else break;
			c = l;
		}
		return e;
	}, e;
}
function q() {
	var e = W();
	return e.copy = function() {
		return H(e, q());
	}, l.apply(e, arguments), K(e);
}
//#endregion
export { f as a, C as i, W as n, H as r, q as t };
