import e from "../../d3-array/src/bisector.js";
import { tickStep as t } from "../../d3-array/src/ticks.js";
import { millisecond as n } from "./millisecond.js";
import { durationDay as r, durationHour as i, durationMinute as a, durationMonth as o, durationSecond as s, durationWeek as c, durationYear as l } from "./duration.js";
import { second as u } from "./second.js";
import { timeMinute as d, utcMinute as f } from "./minute.js";
import { timeHour as p, utcHour as m } from "./hour.js";
import { timeDay as h, unixDay as g } from "./day.js";
import { timeSunday as _, utcSunday as v } from "./week.js";
import { timeMonth as y, utcMonth as b } from "./month.js";
import { timeYear as x, utcYear as S } from "./year.js";
//#region ../../node_modules/d3-time/src/ticks.js
function C(d, f, p, m, h, g) {
	let _ = [
		[
			u,
			1,
			s
		],
		[
			u,
			5,
			5 * s
		],
		[
			u,
			15,
			15 * s
		],
		[
			u,
			30,
			30 * s
		],
		[
			g,
			1,
			a
		],
		[
			g,
			5,
			5 * a
		],
		[
			g,
			15,
			15 * a
		],
		[
			g,
			30,
			30 * a
		],
		[
			h,
			1,
			i
		],
		[
			h,
			3,
			3 * i
		],
		[
			h,
			6,
			6 * i
		],
		[
			h,
			12,
			12 * i
		],
		[
			m,
			1,
			r
		],
		[
			m,
			2,
			2 * r
		],
		[
			p,
			1,
			c
		],
		[
			f,
			1,
			o
		],
		[
			f,
			3,
			3 * o
		],
		[
			d,
			1,
			l
		]
	];
	function v(e, t, n) {
		let r = t < e;
		r && ([e, t] = [t, e]);
		let i = n && typeof n.range == "function" ? n : y(e, t, n), a = i ? i.range(e, +t + 1) : [];
		return r ? a.reverse() : a;
	}
	function y(r, i, a) {
		let o = Math.abs(i - r) / a, s = e(([, , e]) => e).right(_, o);
		if (s === _.length) return d.every(t(r / l, i / l, a));
		if (s === 0) return n.every(Math.max(t(r, i, a), 1));
		let [c, u] = _[o / _[s - 1][2] < _[s][2] / o ? s - 1 : s];
		return c.every(u);
	}
	return [v, y];
}
var [w, T] = C(S, b, v, g, m, f), [E, D] = C(x, y, _, h, p, d);
//#endregion
export { D as timeTickInterval, E as timeTicks };
