import k from "./index-getUTCWeekYear.js";
import W from "./index-requiredArgs.js";
import p from "./index-startOfUTCWeek.js";
import _ from "./index-toInteger.js";
import { getDefaultOptions as c } from "./index-defaultOptions.js";
function U(v, e) {
  var t, o, r, l, i, a, n, f;
  W(1, arguments);
  var s = c(), u = _((t = (o = (r = (l = e == null ? void 0 : e.firstWeekContainsDate) !== null && l !== void 0 ? l : e == null || (i = e.locale) === null || i === void 0 || (a = i.options) === null || a === void 0 ? void 0 : a.firstWeekContainsDate) !== null && r !== void 0 ? r : s.firstWeekContainsDate) !== null && o !== void 0 ? o : (n = s.locale) === null || n === void 0 || (f = n.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), m = k(v, e), d = /* @__PURE__ */ new Date(0);
  d.setUTCFullYear(m, 0, u), d.setUTCHours(0, 0, 0, 0);
  var C = p(d, e);
  return C;
}
export {
  U as default
};
