import { __commonJSMin } from "../../../_virtual/rolldown_runtime.js";
var require_isoWeek = /* @__PURE__ */ __commonJSMin(((e, t) => {
	(function(n, r) {
		typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_isoWeek = r();
	})(e, (function() {
		var e = "day";
		return function(t, n, r) {
			var i = function(t) {
				return t.add(4 - t.isoWeekday(), e);
			}, a = n.prototype;
			a.isoWeekYear = function() {
				return i(this).year();
			}, a.isoWeek = function(t) {
				if (!this.$utils().u(t)) return this.add(7 * (t - this.isoWeek()), e);
				var n, a, o, s, c = i(this), l = (n = this.isoWeekYear(), a = this.$u, o = (a ? r.utc : r)().year(n).startOf("year"), s = 4 - o.isoWeekday(), o.isoWeekday() > 4 && (s += 7), o.add(s, e));
				return c.diff(l, "week") + 1;
			}, a.isoWeekday = function(e) {
				return this.$utils().u(e) ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7);
			};
			var o = a.startOf;
			a.startOf = function(e, t) {
				var n = this.$utils(), r = !!n.u(t) || t;
				return n.p(e) === "isoweek" ? r ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : o.bind(this)(e, t);
			};
		};
	}));
}));
export default require_isoWeek();
export { require_isoWeek };
