import { addDays as T } from "./addDays.js";
import { addMonths as D } from "./addMonths.js";
import { constructFrom as i } from "./constructFrom.js";
import { toDate as M } from "./toDate.js";
function F(t, a, d) {
  const {
    years: s = 0,
    months: r = 0,
    weeks: e = 0,
    days: c = 0,
    hours: n = 0,
    minutes: u = 0,
    seconds: f = 0
  } = a, m = M(t, d == null ? void 0 : d.in), o = r || s ? D(m, r + s * 12) : m, h = c || e ? T(o, c + e * 7) : o, y = u + n * 60, A = (f + y * 60) * 1e3;
  return i((d == null ? void 0 : d.in) || t, +h + A);
}
export {
  F as add,
  F as default
};
