import { initRange as e } from "./init.js";
import t, { copy as n } from "./continuous.js";
import r from "./nice.js";
import { second as i } from "../../d3-time/src/second.js";
import { timeMinute as a } from "../../d3-time/src/minute.js";
import { timeHour as o } from "../../d3-time/src/hour.js";
import { timeDay as s } from "../../d3-time/src/day.js";
import { timeSunday as c } from "../../d3-time/src/week.js";
import { timeMonth as l } from "../../d3-time/src/month.js";
import { timeYear as u } from "../../d3-time/src/year.js";
import { timeTickInterval as d, timeTicks as f } from "../../d3-time/src/ticks.js";
import { timeFormat as p } from "../../d3-time-format/src/defaultLocale.js";
//#region ../../node_modules/d3-scale/src/time.js
function m(e) {
	return new Date(e);
}
function h(e) {
	return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
}
function g(e, i, a, o, s, c, l, u, d, f) {
	var p = t(), _ = p.invert, v = p.domain, y = f(".%L"), b = f(":%S"), x = f("%I:%M"), S = f("%I %p"), C = f("%a %d"), w = f("%b %d"), T = f("%B"), E = f("%Y");
	function D(e) {
		return (d(e) < e ? y : u(e) < e ? b : l(e) < e ? x : c(e) < e ? S : o(e) < e ? s(e) < e ? C : w : a(e) < e ? T : E)(e);
	}
	return p.invert = function(e) {
		return new Date(_(e));
	}, p.domain = function(e) {
		return arguments.length ? v(Array.from(e, h)) : v().map(m);
	}, p.ticks = function(t) {
		var n = v();
		return e(n[0], n[n.length - 1], t ?? 10);
	}, p.tickFormat = function(e, t) {
		return t == null ? D : f(t);
	}, p.nice = function(e) {
		var t = v();
		return (!e || typeof e.range != "function") && (e = i(t[0], t[t.length - 1], e ?? 10)), e ? v(r(t, e)) : p;
	}, p.copy = function() {
		return n(p, g(e, i, a, o, s, c, l, u, d, f));
	}, p;
}
function _() {
	return e.apply(g(f, d, u, l, c, s, o, a, i, p).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
//#endregion
export { _ as default };
