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