UNPKG

bootstrap-vue-next

Version:

Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development

3,679 lines 129 kB
import { c as getActiveElement, o as injectConfigProviderContext } from "./VisuallyHidden-BYzyjJiY.js";
import { n as defu, t as useKbd } from "./useKbd-DRsaFU_f.js";
import { computed, ref } from "vue";
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/clamp.js
/**
* The function `roundToStepPrecision` rounds a number to a specified precision step.
* @param {number} value - The `value` parameter is the number that you want to round to a specific
* precision based on the `step` parameter.
* @param {number} step - The `step` parameter in the `roundToStepPrecision` function represents the
* interval at which you want to round the `value`. For example, if `step` is 0.5, the `value` will be
* rounded to the nearest half.
* @returns the `roundedValue` after rounding it to the precision specified by the `step`.
*/
function roundToStepPrecision(value, step) {
	let roundedValue = value;
	const stepString = step.toString();
	const pointIndex = stepString.indexOf(".");
	const precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
	if (precision > 0) {
		const pow = 10 ** precision;
		roundedValue = Math.round(roundedValue * pow) / pow;
	}
	return roundedValue;
}
/**
* The function `snapValueToStep` snaps a given value to the nearest step within a specified range.
* @param {number} value - The `value` parameter represents the number that you want to snap to the
* nearest step value.
* @param {number | undefined} min - The `min` parameter represents the minimum value that the `value`
* should be snapped to. If `value` is less than `min`, it will be snapped to `min`. If `min` is not
* provided (undefined), then the snapping will not consider a minimum value.
* @param {number | undefined} max - The `max` parameter represents the maximum value that the `value`
* should be snapped to. It ensures that the snapped value does not exceed this maximum value.
* @param {number} step - The `step` parameter in the `snapValueToStep` function represents the
* interval at which the `value` should be snapped to. It determines the granularity of the snapping
* operation. For example, if `step` is 5, the `value` will be snapped to the nearest multiple of
* @returns a number that has been snapped to the nearest step value within the specified range of minimum and maximum values.
*/
function snapValueToStep(value, min, max, step) {
	min = Number(min);
	max = Number(max);
	const remainder = (value - (Number.isNaN(min) ? 0 : min)) % step;
	let snappedValue = roundToStepPrecision(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
	if (!Number.isNaN(min)) {
		if (snappedValue < min) snappedValue = min;
		else if (!Number.isNaN(max) && snappedValue > max) snappedValue = min + Math.floor(roundToStepPrecision((max - min) / step, step)) * step;
	} else if (!Number.isNaN(max) && snappedValue > max) snappedValue = Math.floor(roundToStepPrecision(max / step, step)) * step;
	snappedValue = roundToStepPrecision(snappedValue, step);
	return snappedValue;
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/utils.mjs
function $09ec6a572d60460f$export$842a2cf37af977e1(amount, numerator) {
	return amount - numerator * Math.floor(amount / numerator);
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.mjs
var $93635573935797de$var$EPOCH = 1721426;
function $93635573935797de$export$f297eb839006d339(era, year, month, day) {
	year = $93635573935797de$export$c36e0ecb2d4fa69d(era, year);
	let y1 = year - 1;
	let monthOffset = -2;
	if (month <= 2) monthOffset = 0;
	else if ($93635573935797de$export$553d7fa8e3805fc0(year)) monthOffset = -1;
	return 1721425 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
}
function $93635573935797de$export$553d7fa8e3805fc0(year) {
	return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function $93635573935797de$export$c36e0ecb2d4fa69d(era, year) {
	return era === "BC" ? 1 - year : year;
}
function $93635573935797de$export$4475b7e617eb123c(year) {
	let era = "AD";
	if (year <= 0) {
		era = "BC";
		year = 1 - year;
	}
	return [era, year];
}
var $93635573935797de$var$daysInMonth = {
	standard: [
		31,
		28,
		31,
		30,
		31,
		30,
		31,
		31,
		30,
		31,
		30,
		31
	],
	leapyear: [
		31,
		29,
		31,
		30,
		31,
		30,
		31,
		31,
		30,
		31,
		30,
		31
	]
};
var $93635573935797de$export$80ee6245ec4f29ec = class {
	fromJulianDay(jd) {
		let jd0 = jd;
		let depoch = jd0 - $93635573935797de$var$EPOCH;
		let quadricent = Math.floor(depoch / 146097);
		let dqc = $09ec6a572d60460f$export$842a2cf37af977e1(depoch, 146097);
		let cent = Math.floor(dqc / 36524);
		let dcent = $09ec6a572d60460f$export$842a2cf37af977e1(dqc, 36524);
		let quad = Math.floor(dcent / 1461);
		let dquad = $09ec6a572d60460f$export$842a2cf37af977e1(dcent, 1461);
		let yindex = Math.floor(dquad / 365);
		let [era, year] = $93635573935797de$export$4475b7e617eb123c(quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0));
		let yearDay = jd0 - $93635573935797de$export$f297eb839006d339(era, year, 1, 1);
		let leapAdj = 2;
		if (jd0 < $93635573935797de$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
		else if ($93635573935797de$export$553d7fa8e3805fc0(year)) leapAdj = 1;
		let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, month, jd0 - $93635573935797de$export$f297eb839006d339(era, year, month, 1) + 1);
	}
	toJulianDay(date) {
		return $93635573935797de$export$f297eb839006d339(date.era, date.year, date.month, date.day);
	}
	getDaysInMonth(date) {
		return $93635573935797de$var$daysInMonth[$93635573935797de$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
	}
	getMonthsInYear(date) {
		return 12;
	}
	getDaysInYear(date) {
		return $93635573935797de$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
	}
	getMaximumMonthsInYear() {
		return 12;
	}
	getMaximumDaysInMonth() {
		return 31;
	}
	getYearsInEra(date) {
		return 9999;
	}
	getEras() {
		return ["BC", "AD"];
	}
	isInverseEra(date) {
		return date.era === "BC";
	}
	balanceDate(date) {
		if (date.year <= 0) {
			date.era = date.era === "BC" ? "AD" : "BC";
			date.year = 1 - date.year;
		}
	}
	constructor() {
		this.identifier = "gregory";
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/weekStartData.mjs
var $d2ca8165c9aa885a$export$7a5acbd77d414bd9 = {
	"001": 1,
	AD: 1,
	AE: 6,
	AF: 6,
	AI: 1,
	AL: 1,
	AM: 1,
	AN: 1,
	AR: 1,
	AT: 1,
	AU: 1,
	AX: 1,
	AZ: 1,
	BA: 1,
	BE: 1,
	BG: 1,
	BH: 6,
	BM: 1,
	BN: 1,
	BY: 1,
	CH: 1,
	CL: 1,
	CM: 1,
	CN: 1,
	CR: 1,
	CY: 1,
	CZ: 1,
	DE: 1,
	DJ: 6,
	DK: 1,
	DZ: 6,
	EC: 1,
	EE: 1,
	EG: 6,
	ES: 1,
	FI: 1,
	FJ: 1,
	FO: 1,
	FR: 1,
	GB: 1,
	GE: 1,
	GF: 1,
	GP: 1,
	GR: 1,
	HR: 1,
	HU: 1,
	IE: 1,
	IQ: 6,
	IR: 6,
	IS: 1,
	IT: 1,
	JO: 6,
	KG: 1,
	KW: 6,
	KZ: 1,
	LB: 1,
	LI: 1,
	LK: 1,
	LT: 1,
	LU: 1,
	LV: 1,
	LY: 6,
	MC: 1,
	MD: 1,
	ME: 1,
	MK: 1,
	MN: 1,
	MQ: 1,
	MV: 5,
	MY: 1,
	NL: 1,
	NO: 1,
	NZ: 1,
	OM: 6,
	PL: 1,
	QA: 6,
	RE: 1,
	RO: 1,
	RS: 1,
	RU: 1,
	SD: 6,
	SE: 1,
	SI: 1,
	SK: 1,
	SM: 1,
	SY: 6,
	TJ: 1,
	TM: 1,
	TR: 1,
	UA: 1,
	UY: 1,
	UZ: 1,
	VA: 1,
	VN: 1,
	XK: 1
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/queries.mjs
function $ad063034c8620db8$export$ea39ec197993aef0(a, b) {
	b = $d07e34cce18680fd$export$b4a036af3fc0b032(b, a.calendar);
	return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
}
function $ad063034c8620db8$export$a18c89cbd24170ff(a, b) {
	b = $d07e34cce18680fd$export$b4a036af3fc0b032(b, a.calendar);
	a = $ad063034c8620db8$export$a5a3b454ada2268e(a);
	b = $ad063034c8620db8$export$a5a3b454ada2268e(b);
	return a.era === b.era && a.year === b.year && a.month === b.month;
}
function $ad063034c8620db8$export$91b62ebf2ba703ee(a, b) {
	return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$ea39ec197993aef0(a, b);
}
function $ad063034c8620db8$export$5a8da0c44a3afdf2(a, b) {
	return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$a18c89cbd24170ff(a, b);
}
function $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {
	return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;
}
function $ad063034c8620db8$export$629b0a497aa65267(date, timeZone) {
	return $ad063034c8620db8$export$ea39ec197993aef0(date, $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone));
}
var $ad063034c8620db8$var$DAY_MAP = {
	sun: 0,
	mon: 1,
	tue: 2,
	wed: 3,
	thu: 4,
	fri: 5,
	sat: 6
};
function $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek) {
	let julian = date.calendar.toJulianDay(date);
	let weekStart = firstDayOfWeek ? $ad063034c8620db8$var$DAY_MAP[firstDayOfWeek] : $ad063034c8620db8$var$getWeekStart(locale);
	let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;
	if (dayOfWeek < 0) dayOfWeek += 7;
	return dayOfWeek;
}
function $ad063034c8620db8$export$461939dd4422153(timeZone) {
	return $d07e34cce18680fd$export$1b96692a1ba042ac(Date.now(), timeZone);
}
function $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {
	return $d07e34cce18680fd$export$93522d1a439f3617($ad063034c8620db8$export$461939dd4422153(timeZone));
}
function $ad063034c8620db8$export$68781ddf31c0090f(a, b) {
	return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
}
function $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {
	return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);
}
function $ad063034c8620db8$var$timeToMs(a) {
	return a.hour * 36e5 + a.minute * 6e4 + a.second * 1e3 + a.millisecond;
}
var $ad063034c8620db8$var$localTimeZone = null;
var $ad063034c8620db8$var$localTimeZoneOverride = false;
function $ad063034c8620db8$export$aa8b41735afcabd2() {
	if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
	return $ad063034c8620db8$var$localTimeZone;
}
function $ad063034c8620db8$export$6ab69b273755230b() {
	return $ad063034c8620db8$var$localTimeZoneOverride;
}
function $ad063034c8620db8$export$a5a3b454ada2268e(date) {
	return date.subtract({ days: date.day - 1 });
}
function $ad063034c8620db8$export$a2258d9c4118825c(date) {
	return date.add({ days: date.calendar.getDaysInMonth(date) - date.day });
}
var $ad063034c8620db8$var$cachedRegions = /* @__PURE__ */ new Map();
var $ad063034c8620db8$var$cachedWeekInfo = /* @__PURE__ */ new Map();
function $ad063034c8620db8$var$getRegion(locale) {
	if (Intl.Locale) {
		let region = $ad063034c8620db8$var$cachedRegions.get(locale);
		if (!region) {
			region = new Intl.Locale(locale).maximize().region;
			if (region) $ad063034c8620db8$var$cachedRegions.set(locale, region);
		}
		return region;
	}
	let part = locale.split("-")[1];
	return part === "u" ? void 0 : part;
}
function $ad063034c8620db8$var$getWeekStart(locale) {
	let weekInfo = $ad063034c8620db8$var$cachedWeekInfo.get(locale);
	if (!weekInfo) {
		if (Intl.Locale) {
			let localeInst = new Intl.Locale(locale);
			if ("getWeekInfo" in localeInst) {
				weekInfo = localeInst.getWeekInfo();
				if (weekInfo) {
					$ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);
					return weekInfo.firstDay;
				}
			}
		}
		let region = $ad063034c8620db8$var$getRegion(locale);
		if (locale.includes("-fw-")) {
			let day = locale.split("-fw-")[1].split("-")[0];
			if (day === "mon") weekInfo = { firstDay: 1 };
			else if (day === "tue") weekInfo = { firstDay: 2 };
			else if (day === "wed") weekInfo = { firstDay: 3 };
			else if (day === "thu") weekInfo = { firstDay: 4 };
			else if (day === "fri") weekInfo = { firstDay: 5 };
			else if (day === "sat") weekInfo = { firstDay: 6 };
			else weekInfo = { firstDay: 0 };
		} else if (locale.includes("-ca-iso8601")) weekInfo = { firstDay: 1 };
		else weekInfo = { firstDay: region ? $d2ca8165c9aa885a$export$7a5acbd77d414bd9[region] || 0 : 0 };
		$ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);
	}
	return weekInfo.firstDay;
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.mjs
function $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) {
	date = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
	return $d07e34cce18680fd$var$epochFromParts($93635573935797de$export$c36e0ecb2d4fa69d(date.era, date.year), date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
}
function $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
	let date = /* @__PURE__ */ new Date();
	date.setUTCHours(hour, minute, second, millisecond);
	date.setUTCFullYear(year, month - 1, day);
	return date.getTime();
}
function $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone) {
	if (timeZone === "UTC") return 0;
	if (ms > 0 && timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && !$ad063034c8620db8$export$6ab69b273755230b()) return new Date(ms).getTimezoneOffset() * -6e4;
	let { year, month, day, hour, minute, second } = $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone);
	return $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, 0) - Math.floor(ms / 1e3) * 1e3;
}
var $d07e34cce18680fd$var$formattersByTimeZone = /* @__PURE__ */ new Map();
function $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone) {
	let formatter = $d07e34cce18680fd$var$formattersByTimeZone.get(timeZone);
	if (!formatter) {
		formatter = new Intl.DateTimeFormat("en-US", {
			timeZone,
			hour12: false,
			era: "short",
			year: "numeric",
			month: "numeric",
			day: "numeric",
			hour: "numeric",
			minute: "numeric",
			second: "numeric"
		});
		$d07e34cce18680fd$var$formattersByTimeZone.set(timeZone, formatter);
	}
	let parts = formatter.formatToParts(new Date(ms));
	let namedParts = {};
	for (let part of parts) if (part.type !== "literal") namedParts[part.type] = part.value;
	return {
		year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
		month: +namedParts.month,
		day: +namedParts.day,
		hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
		minute: +namedParts.minute,
		second: +namedParts.second
	};
}
var $d07e34cce18680fd$var$DAYMILLIS = 864e5;
function $d07e34cce18680fd$var$getValidWallTimes(date, timeZone, earlier, later) {
	return (earlier === later ? [earlier] : [earlier, later]).filter((absolute) => $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute));
}
function $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute) {
	let parts = $d07e34cce18680fd$var$getTimeZoneParts(absolute, timeZone);
	return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
}
function $d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
	let dateTime = $d07e34cce18680fd$export$b21e0b124e224484(date);
	if (timeZone === "UTC") return $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
	if (timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && disambiguation === "compatible" && !$ad063034c8620db8$export$6ab69b273755230b()) {
		dateTime = $d07e34cce18680fd$export$b4a036af3fc0b032(dateTime, new $93635573935797de$export$80ee6245ec4f29ec());
		let date = /* @__PURE__ */ new Date();
		let year = $93635573935797de$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
		date.setFullYear(year, dateTime.month - 1, dateTime.day);
		date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
		return date.getTime();
	}
	let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
	let offsetBefore = $d07e34cce18680fd$export$59c99f3515d3493f(ms - $d07e34cce18680fd$var$DAYMILLIS, timeZone);
	let offsetAfter = $d07e34cce18680fd$export$59c99f3515d3493f(ms + $d07e34cce18680fd$var$DAYMILLIS, timeZone);
	let valid = $d07e34cce18680fd$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
	if (valid.length === 1) return valid[0];
	if (valid.length > 1) switch (disambiguation) {
		case "compatible":
		case "earlier": return valid[0];
		case "later": return valid[valid.length - 1];
		case "reject": throw new RangeError("Multiple possible absolute times found");
	}
	switch (disambiguation) {
		case "earlier": return Math.min(ms - offsetBefore, ms - offsetAfter);
		case "compatible":
		case "later": return Math.max(ms - offsetBefore, ms - offsetAfter);
		case "reject": throw new RangeError("No such absolute time found");
	}
}
function $d07e34cce18680fd$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
	return new Date($d07e34cce18680fd$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
}
function $d07e34cce18680fd$export$1b96692a1ba042ac(ms, timeZone) {
	let offset = $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone);
	let date = new Date(ms + offset);
	let year = date.getUTCFullYear();
	let month = date.getUTCMonth() + 1;
	let day = date.getUTCDate();
	let hour = date.getUTCHours();
	let minute = date.getUTCMinutes();
	let second = date.getUTCSeconds();
	let millisecond = date.getUTCMilliseconds();
	return new $2aaf608024c21ca1$export$d3b7288e7994edea(year < 1 ? "BC" : "AD", year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
}
function $d07e34cce18680fd$export$93522d1a439f3617(dateTime) {
	return new $2aaf608024c21ca1$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
}
function $d07e34cce18680fd$export$b21e0b124e224484(date, time) {
	let hour = 0, minute = 0, second = 0, millisecond = 0;
	if ("timeZone" in date) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = date);
	else if ("hour" in date && !time) return date;
	if (time) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = time);
	return new $2aaf608024c21ca1$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
}
function $d07e34cce18680fd$export$b4a036af3fc0b032(date, calendar) {
	if ($ad063034c8620db8$export$dbc69fd56b53d5e(date.calendar, calendar)) return date;
	let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
	let copy = date.copy();
	copy.calendar = calendar;
	copy.era = calendarDate.era;
	copy.year = calendarDate.year;
	copy.month = calendarDate.month;
	copy.day = calendarDate.day;
	$435a2ceaa8778ed8$export$c4e2ecac49351ef2(copy);
	return copy;
}
function $d07e34cce18680fd$export$84c95a83c799e074(date, timeZone, disambiguation) {
	if (date instanceof $2aaf608024c21ca1$export$d3b7288e7994edea) {
		if (date.timeZone === timeZone) return date;
		return $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone);
	}
	return $d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation), timeZone);
}
function $d07e34cce18680fd$export$83aac07b4c37b25(date) {
	let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset;
	return new Date(ms);
}
function $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone) {
	return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset, timeZone), date.calendar);
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.mjs
var $435a2ceaa8778ed8$var$ONE_HOUR = 36e5;
function $435a2ceaa8778ed8$export$e16d8520af44a096(date, duration) {
	let mutableDate = date.copy();
	let days = "hour" in mutableDate ? $435a2ceaa8778ed8$var$addTimeFields(mutableDate, duration) : 0;
	$435a2ceaa8778ed8$var$addYears(mutableDate, duration.years || 0);
	if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
	mutableDate.month += duration.months || 0;
	$435a2ceaa8778ed8$var$balanceYearMonth(mutableDate);
	$435a2ceaa8778ed8$var$constrainMonthDay(mutableDate);
	mutableDate.day += (duration.weeks || 0) * 7;
	mutableDate.day += duration.days || 0;
	mutableDate.day += days;
	$435a2ceaa8778ed8$var$balanceDay(mutableDate);
	if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
	if (mutableDate.year < 1) {
		mutableDate.year = 1;
		mutableDate.month = 1;
		mutableDate.day = 1;
	}
	let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
	if (mutableDate.year > maxYear) {
		let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);
		mutableDate.year = maxYear;
		mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
		mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
	}
	if (mutableDate.month < 1) {
		mutableDate.month = 1;
		mutableDate.day = 1;
	}
	let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
	if (mutableDate.month > maxMonth) {
		mutableDate.month = maxMonth;
		mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
	}
	mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
	return mutableDate;
}
function $435a2ceaa8778ed8$var$addYears(date, years) {
	if (date.calendar.isInverseEra?.(date)) years = -years;
	date.year += years;
}
function $435a2ceaa8778ed8$var$balanceYearMonth(date) {
	while (date.month < 1) {
		$435a2ceaa8778ed8$var$addYears(date, -1);
		date.month += date.calendar.getMonthsInYear(date);
	}
	let monthsInYear = 0;
	while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
		date.month -= monthsInYear;
		$435a2ceaa8778ed8$var$addYears(date, 1);
	}
}
function $435a2ceaa8778ed8$var$balanceDay(date) {
	while (date.day < 1) {
		date.month--;
		$435a2ceaa8778ed8$var$balanceYearMonth(date);
		date.day += date.calendar.getDaysInMonth(date);
	}
	while (date.day > date.calendar.getDaysInMonth(date)) {
		date.day -= date.calendar.getDaysInMonth(date);
		date.month++;
		$435a2ceaa8778ed8$var$balanceYearMonth(date);
	}
}
function $435a2ceaa8778ed8$var$constrainMonthDay(date) {
	date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
	date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
}
function $435a2ceaa8778ed8$export$c4e2ecac49351ef2(date) {
	if (date.calendar.constrainDate) date.calendar.constrainDate(date);
	date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
	$435a2ceaa8778ed8$var$constrainMonthDay(date);
}
function $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration) {
	let inverseDuration = {};
	for (let key in duration) if (typeof duration[key] === "number") inverseDuration[key] = -duration[key];
	return inverseDuration;
}
function $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(date, duration) {
	return $435a2ceaa8778ed8$export$e16d8520af44a096(date, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
}
function $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(date, fields) {
	let mutableDate = date.copy();
	if (fields.era != null) mutableDate.era = fields.era;
	if (fields.year != null) mutableDate.year = fields.year;
	if (fields.month != null) mutableDate.month = fields.month;
	if (fields.day != null) mutableDate.day = fields.day;
	$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutableDate);
	return mutableDate;
}
function $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(value, fields) {
	let mutableValue = value.copy();
	if (fields.hour != null) mutableValue.hour = fields.hour;
	if (fields.minute != null) mutableValue.minute = fields.minute;
	if (fields.second != null) mutableValue.second = fields.second;
	if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
	$435a2ceaa8778ed8$export$7555de1e070510cb(mutableValue);
	return mutableValue;
}
function $435a2ceaa8778ed8$var$balanceTime(time) {
	time.second += Math.floor(time.millisecond / 1e3);
	time.millisecond = $435a2ceaa8778ed8$var$nonNegativeMod(time.millisecond, 1e3);
	time.minute += Math.floor(time.second / 60);
	time.second = $435a2ceaa8778ed8$var$nonNegativeMod(time.second, 60);
	time.hour += Math.floor(time.minute / 60);
	time.minute = $435a2ceaa8778ed8$var$nonNegativeMod(time.minute, 60);
	let days = Math.floor(time.hour / 24);
	time.hour = $435a2ceaa8778ed8$var$nonNegativeMod(time.hour, 24);
	return days;
}
function $435a2ceaa8778ed8$export$7555de1e070510cb(time) {
	time.millisecond = Math.max(0, Math.min(time.millisecond, 999));
	time.second = Math.max(0, Math.min(time.second, 59));
	time.minute = Math.max(0, Math.min(time.minute, 59));
	time.hour = Math.max(0, Math.min(time.hour, 23));
}
function $435a2ceaa8778ed8$var$nonNegativeMod(a, b) {
	let result = a % b;
	if (result < 0) result += b;
	return result;
}
function $435a2ceaa8778ed8$var$addTimeFields(time, duration) {
	time.hour += duration.hours || 0;
	time.minute += duration.minutes || 0;
	time.second += duration.seconds || 0;
	time.millisecond += duration.milliseconds || 0;
	return $435a2ceaa8778ed8$var$balanceTime(time);
}
function $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, duration) {
	let res = time.copy();
	$435a2ceaa8778ed8$var$addTimeFields(res, duration);
	return res;
}
function $435a2ceaa8778ed8$export$fe34d3a381cd7501(time, duration) {
	return $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
}
function $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {
	let mutable = value.copy();
	switch (field) {
		case "era": {
			let eras = value.calendar.getEras();
			let eraIndex = eras.indexOf(value.era);
			if (eraIndex < 0) throw new Error("Invalid era: " + value.era);
			eraIndex = $435a2ceaa8778ed8$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);
			mutable.era = eras[eraIndex];
			$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
			break;
		}
		case "year":
			if (mutable.calendar.isInverseEra?.(mutable)) amount = -amount;
			mutable.year = $435a2ceaa8778ed8$var$cycleValue(value.year, amount, -Infinity, 9999, options?.round);
			if (mutable.year === -Infinity) mutable.year = 1;
			if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
			break;
		case "month":
			mutable.month = $435a2ceaa8778ed8$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options?.round);
			break;
		case "day":
			mutable.day = $435a2ceaa8778ed8$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options?.round);
			break;
		default: throw new Error("Unsupported field " + field);
	}
	if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
	$435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
	return mutable;
}
function $435a2ceaa8778ed8$export$dd02b3e0007dfe28(value, field, amount, options) {
	let mutable = value.copy();
	switch (field) {
		case "hour": {
			let hours = value.hour;
			let min = 0;
			let max = 23;
			if (options?.hourCycle === 12) {
				let isPM = hours >= 12;
				min = isPM ? 12 : 0;
				max = isPM ? 23 : 11;
			}
			mutable.hour = $435a2ceaa8778ed8$var$cycleValue(hours, amount, min, max, options?.round);
			break;
		}
		case "minute":
			mutable.minute = $435a2ceaa8778ed8$var$cycleValue(value.minute, amount, 0, 59, options?.round);
			break;
		case "second":
			mutable.second = $435a2ceaa8778ed8$var$cycleValue(value.second, amount, 0, 59, options?.round);
			break;
		case "millisecond":
			mutable.millisecond = $435a2ceaa8778ed8$var$cycleValue(value.millisecond, amount, 0, 999, options?.round);
			break;
		default: throw new Error("Unsupported field " + field);
	}
	return mutable;
}
function $435a2ceaa8778ed8$var$cycleValue(value, amount, min, max, round = false) {
	if (round) {
		value += Math.sign(amount);
		if (value < min) value = max;
		let div = Math.abs(amount);
		if (amount > 0) value = Math.ceil(value / div) * div;
		else value = Math.floor(value / div) * div;
		if (value > max) value = min;
	} else {
		value += amount;
		if (value < min) value = max - (min - value - 1);
		else if (value > max) value = min + (value - max - 1);
	}
	return value;
}
function $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, duration) {
	let ms;
	if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) ms = $d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$e16d8520af44a096($d07e34cce18680fd$export$b21e0b124e224484(dateTime), {
		years: duration.years,
		months: duration.months,
		weeks: duration.weeks,
		days: duration.days
	}), dateTime.timeZone);
	else ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
	ms += duration.milliseconds || 0;
	ms += (duration.seconds || 0) * 1e3;
	ms += (duration.minutes || 0) * 6e4;
	ms += (duration.hours || 0) * 36e5;
	return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
}
function $435a2ceaa8778ed8$export$6814caac34ca03c7(dateTime, duration) {
	return $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
}
function $435a2ceaa8778ed8$export$9a297d111fc86b79(dateTime, field, amount, options) {
	switch (field) {
		case "hour": {
			let min = 0;
			let max = 23;
			if (options?.hourCycle === 12) {
				let isPM = dateTime.hour >= 12;
				min = isPM ? 12 : 0;
				max = isPM ? 23 : 11;
			}
			let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
			let minDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: min }), new $93635573935797de$export$80ee6245ec4f29ec());
			let minAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === minDate.day)[0];
			let maxDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: max }), new $93635573935797de$export$80ee6245ec4f29ec());
			let maxAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === maxDate.day).pop();
			let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
			let hours = Math.floor(ms / $435a2ceaa8778ed8$var$ONE_HOUR);
			let remainder = ms % $435a2ceaa8778ed8$var$ONE_HOUR;
			ms = $435a2ceaa8778ed8$var$cycleValue(hours, amount, Math.floor(minAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), Math.floor(maxAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), options?.round) * $435a2ceaa8778ed8$var$ONE_HOUR + remainder;
			return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
		}
		case "minute":
		case "second":
		case "millisecond": return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(dateTime, field, amount, options);
		case "era":
		case "year":
		case "month":
		case "day": return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$d52ced6badfb9a4c($d07e34cce18680fd$export$b21e0b124e224484(dateTime), field, amount, options), dateTime.timeZone), dateTime.timeZone), dateTime.calendar);
		default: throw new Error("Unsupported field " + field);
	}
}
function $435a2ceaa8778ed8$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
	let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
	let res = $435a2ceaa8778ed8$export$e5d5e1c1822b6e56($435a2ceaa8778ed8$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
	if (res.compare(plainDateTime) === 0) return dateTime;
	return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation), dateTime.timeZone), dateTime.calendar);
}
function $58246871e4652552$export$f59dee82248f5ad4(time) {
	return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
}
function $58246871e4652552$export$60dfd74aa96791bd(date) {
	let gregorianDate = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
	let year;
	if (gregorianDate.era === "BC") year = gregorianDate.year === 1 ? "0000" : "-" + String(Math.abs(1 - gregorianDate.year)).padStart(6, "00");
	else year = String(gregorianDate.year).padStart(4, "0");
	return `${year}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
}
function $58246871e4652552$export$4223de14708adc63(date) {
	return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;
}
function $58246871e4652552$var$offsetToString(offset) {
	let sign = Math.sign(offset) < 0 ? "-" : "+";
	offset = Math.abs(offset);
	let offsetHours = Math.floor(offset / 36e5);
	let offsetMinutes = Math.floor(offset % 36e5 / 6e4);
	let offsetSeconds = Math.floor(offset % 36e5 % 6e4 / 1e3);
	let stringOffset = `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
	if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, "0")}`;
	return stringOffset;
}
function $58246871e4652552$export$bf79f1ebf4b18792(date) {
	return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.mjs
function $2aaf608024c21ca1$var$shiftArgs(args) {
	let calendar = typeof args[0] === "object" ? args.shift() : new $93635573935797de$export$80ee6245ec4f29ec();
	let era;
	if (typeof args[0] === "string") era = args.shift();
	else {
		let eras = calendar.getEras();
		era = eras[eras.length - 1];
	}
	let year = args.shift();
	let month = args.shift();
	let day = args.shift();
	return [
		calendar,
		era,
		year,
		month,
		day
	];
}
var $2aaf608024c21ca1$export$99faa760c7908e4f = class $2aaf608024c21ca1$export$99faa760c7908e4f {
	#type;
	constructor(...args) {
		let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
		this.calendar = calendar;
		this.era = era;
		this.year = year;
		this.month = month;
		this.day = day;
		$435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
	}
	/** Returns a copy of this date. */ copy() {
		if (this.era) return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
		else return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
	}
	/** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
		return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
	}
	/** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
		return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
	}
	/**
	* Returns a new `CalendarDate` with the given fields set to the provided values. Other fields
	* will be constrained accordingly.
	*/ set(fields) {
		return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(this, fields);
	}
	/**
	* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
	* When the resulting value reaches the limits of the field, it wraps around.
	*/ cycle(field, amount, options) {
		return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
	}
	/**
	* Converts the date to a native JavaScript Date object, with the time set to midnight in the
	* given time zone.
	*/ toDate(timeZone) {
		return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone);
	}
	/** Converts the date to an ISO 8601 formatted string. */ toString() {
		return $58246871e4652552$export$60dfd74aa96791bd(this);
	}
	/**
	* Compares this date with another. A negative result indicates that this date is before the given
	* one, and a positive date indicates that it is after.
	*/ compare(b) {
		return $ad063034c8620db8$export$68781ddf31c0090f(this, b);
	}
};
var $2aaf608024c21ca1$export$680ea196effce5f = class $2aaf608024c21ca1$export$680ea196effce5f {
	#type;
	constructor(hour = 0, minute = 0, second = 0, millisecond = 0) {
		this.hour = hour;
		this.minute = minute;
		this.second = second;
		this.millisecond = millisecond;
		$435a2ceaa8778ed8$export$7555de1e070510cb(this);
	}
	/** Returns a copy of this time. */ copy() {
		return new $2aaf608024c21ca1$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
	}
	/** Returns a new `Time` with the given duration added to it. */ add(duration) {
		return $435a2ceaa8778ed8$export$7ed87b6bc2506470(this, duration);
	}
	/** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
		return $435a2ceaa8778ed8$export$fe34d3a381cd7501(this, duration);
	}
	/**
	* Returns a new `Time` with the given fields set to the provided values. Other fields will be
	* constrained accordingly.
	*/ set(fields) {
		return $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields);
	}
	/**
	* Returns a new `Time` with the given field adjusted by a specified amount.
	* When the resulting value reaches the limits of the field, it wraps around.
	*/ cycle(field, amount, options) {
		return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
	}
	/** Converts the time to an ISO 8601 formatted string. */ toString() {
		return $58246871e4652552$export$f59dee82248f5ad4(this);
	}
	/**
	* Compares this time with another. A negative result indicates that this time is before the given
	* one, and a positive time indicates that it is after.
	*/ compare(b) {
		return $ad063034c8620db8$export$c19a80a9721b80f6(this, b);
	}
};
var $2aaf608024c21ca1$export$ca871e8dbb80966f = class $2aaf608024c21ca1$export$ca871e8dbb80966f {
	#type;
	constructor(...args) {
		let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
		this.calendar = calendar;
		this.era = era;
		this.year = year;
		this.month = month;
		this.day = day;
		this.hour = args.shift() || 0;
		this.minute = args.shift() || 0;
		this.second = args.shift() || 0;
		this.millisecond = args.shift() || 0;
		$435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
	}
	/** Returns a copy of this date. */ copy() {
		if (this.era) return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
		else return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
	}
	/** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
		return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
	}
	/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
		return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
	}
	/**
	* Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields
	* will be constrained accordingly.
	*/ set(fields) {
		return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields), fields);
	}
	/**
	* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
	* When the resulting value reaches the limits of the field, it wraps around.
	*/ cycle(field, amount, options) {
		switch (field) {
			case "era":
			case "year":
			case "month":
			case "day": return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
			default: return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
		}
	}
	/** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
		return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone, disambiguation);
	}
	/** Converts the date to an ISO 8601 formatted string. */ toString() {
		return $58246871e4652552$export$4223de14708adc63(this);
	}
	/**
	* Compares this date with another. A negative result indicates that this date is before the given
	* one, and a positive date indicates that it is after.
	*/ compare(b) {
		let res = $ad063034c8620db8$export$68781ddf31c0090f(this, b);
		if (res === 0) return $ad063034c8620db8$export$c19a80a9721b80f6(this, $d07e34cce18680fd$export$b21e0b124e224484(b));
		return res;
	}
};
var $2aaf608024c21ca1$export$d3b7288e7994edea = class $2aaf608024c21ca1$export$d3b7288e7994edea {
	#type;
	constructor(...args) {
		let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
		let timeZone = args.shift();
		let offset = args.shift();
		this.calendar = calendar;
		this.era = era;
		this.year = year;
		this.month = month;
		this.day = day;
		this.timeZone = timeZone;
		this.offset = offset;
		this.hour = args.shift() || 0;
		this.minute = args.shift() || 0;
		this.second = args.shift() || 0;
		this.millisecond = args.shift() || 0;
		$435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
	}
	/** Returns a copy of this date. */ copy() {
		if (this.era) return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
		else return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
	}
	/** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
		return $435a2ceaa8778ed8$export$96b1d28349274637(this, duration);
	}
	/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
		return $435a2ceaa8778ed8$export$6814caac34ca03c7(this, duration);
	}
	/**
	* Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields
	* will be constrained accordingly.
	*/ set(fields, disambiguation) {
		return $435a2ceaa8778ed8$export$31b5430eb18be4f8(this, fields, disambiguation);
	}
	/**
	* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
	* When the resulting value reaches the limits of the field, it wraps around.
	*/ cycle(field, amount, options) {
		return $435a2ceaa8778ed8$export$9a297d111fc86b79(this, field, amount, options);
	}
	/** Converts the date to a native JavaScript Date object. */ toDate() {
		return $d07e34cce18680fd$export$83aac07b4c37b25(this);
	}
	/**
	* Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone
	* identifier.
	*/ toString() {
		return $58246871e4652552$export$bf79f1ebf4b18792(this);
	}
	/** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
		return this.toDate().toISOString();
	}
	/**
	* Compares this date with another. A negative result indicates that this date is before the given
	* one, and a positive date indicates that it is after.
	*/ compare(b) {
		return this.toDate().getTime() - $d07e34cce18680fd$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/JapaneseCalendar.mjs
var $34b940b49ba042df$var$ERA_START_DATES = [
	[
		1868,
		9,
		8
	],
	[
		1912,
		7,
		30
	],
	[
		1926,
		12,
		25
	],
	[
		1989,
		1,
		8
	],
	[
		2019,
		5,
		1
	]
];
var $34b940b49ba042df$var$ERA_END_DATES = [
	[
		1912,
		7,
		29
	],
	[
		1926,
		12,
		24
	],
	[
		1989,
		1,
		7
	],
	[
		2019,
		4,
		30
	]
];
var $34b940b49ba042df$var$ERA_ADDENDS = [
	1867,
	1911,
	1925,
	1988,
	2018
];
var $34b940b49ba042df$var$ERA_NAMES = [
	"meiji",
	"taisho",
	"showa",
	"heisei",
	"reiwa"
];
function $34b940b49ba042df$var$findEraFromGregorianDate(date) {
	const idx = $34b940b49ba042df$var$ERA_START_DATES.findIndex(([year, month, day]) => {
		if (date.year < year) return true;
		if (date.year === year && date.month < month) return true;
		if (date.year === year && date.month === month && date.day < day) return true;
		return false;
	});
	if (idx === -1) return $34b940b49ba042df$var$ERA_START_DATES.length - 1;
	if (idx === 0) return 0;
	return idx - 1;
}
function $34b940b49ba042df$var$toGregorian(date) {
	let eraAddend = $34b940b49ba042df$var$ERA_ADDENDS[$34b940b49ba042df$var$ERA_NAMES.indexOf(date.era)];
	if (!eraAddend) throw new Error("Unknown era: " + date.era);
	return new $2aaf608024c21ca1$export$99faa760c7908e4f(date.year + eraAddend, date.month, date.day);
}
var $34b940b49ba042df$export$b746ab2b60cdffbf = class extends $93635573935797de$export$80ee6245ec4f29ec {
	fromJulianDay(jd) {
		let date = super.fromJulianDay(jd);
		let era = $34b940b49ba042df$var$findEraFromGregorianDate(date);
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, $34b940b49ba042df$var$ERA_NAMES[era], date.year - $34b940b49ba042df$var$ERA_ADDENDS[era], date.month, date.day);
	}
	toJulianDay(date) {
		return super.toJulianDay($34b940b49ba042df$var$toGregorian(date));
	}
	balanceDate(date) {
		let gregorianDate = $34b940b49ba042df$var$toGregorian(date);
		let era = $34b940b49ba042df$var$findEraFromGregorianDate(gregorianDate);
		if ($34b940b49ba042df$var$ERA_NAMES[era] !== date.era) {
			date.era = $34b940b49ba042df$var$ERA_NAMES[era];
			date.year = gregorianDate.year - $34b940b49ba042df$var$ERA_ADDENDS[era];
		}
		this.constrainDate(date);
	}
	constrainDate(date) {
		let idx = $34b940b49ba042df$var$ERA_NAMES.indexOf(date.era);
		let end = $34b940b49ba042df$var$ERA_END_DATES[idx];
		if (end != null) {
			let [endYear, endMonth, endDay] = end;
			let maxYear = endYear - $34b940b49ba042df$var$ERA_ADDENDS[idx];
			date.year = Math.max(1, Math.min(maxYear, date.year));
			if (date.year === maxYear) {
				date.month = Math.min(endMonth, date.month);
				if (date.month === endMonth) date.day = Math.min(endDay, date.day);
			}
		}
		if (date.year === 1 && idx >= 0) {
			let [, startMonth, startDay] = $34b940b49ba042df$var$ERA_START_DATES[idx];
			date.month = Math.max(startMonth, date.month);
			if (date.month === startMonth) date.day = Math.max(startDay, date.day);
		}
	}
	getEras() {
		return $34b940b49ba042df$var$ERA_NAMES;
	}
	getYearsInEra(date) {
		let era = $34b940b49ba042df$var$ERA_NAMES.indexOf(date.era);
		let cur = $34b940b49ba042df$var$ERA_START_DATES[era];
		let next = $34b940b49ba042df$var$ERA_START_DATES[era + 1];
		if (next == null) return 9999 - cur[0] + 1;
		let years = next[0] - cur[0];
		if (date.month < next[1] || date.month === next[1] && date.day < next[2]) years++;
		return years;
	}
	getDaysInMonth(date) {
		return super.getDaysInMonth($34b940b49ba042df$var$toGregorian(date));
	}
	getMinimumMonthInYear(date) {
		let start = $34b940b49ba042df$var$getMinimums(date);
		return start ? start[1] : 1;
	}
	getMinimumDayInMonth(date) {
		let start = $34b940b49ba042df$var$getMinimums(date);
		return start && date.month === start[1] ? start[2] : 1;
	}
	constructor(...args) {
		super(...args), this.identifier = "japanese";
	}
};
function $34b940b49ba042df$var$getMinimums(date) {
	if (date.year === 1) return $34b940b49ba042df$var$ERA_START_DATES[$34b940b49ba042df$var$ERA_NAMES.indexOf(date.era)];
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/BuddhistCalendar.mjs
var $63d4eafd4d826996$var$BUDDHIST_ERA_START = -543;
var $63d4eafd4d826996$export$42d20a78301dee44 = class extends $93635573935797de$export$80ee6245ec4f29ec {
	fromJulianDay(jd) {
		let gregorianDate = super.fromJulianDay(jd);
		let year = $93635573935797de$export$c36e0ecb2d4fa69d(gregorianDate.era, gregorianDate.year);
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year - $63d4eafd4d826996$var$BUDDHIST_ERA_START, gregorianDate.month, gregorianDate.day);
	}
	toJulianDay(date) {
		return super.toJulianDay($63d4eafd4d826996$var$toGregorian(date));
	}
	getEras() {
		return ["BE"];
	}
	getDaysInMonth(date) {
		return super.getDaysInMonth($63d4eafd4d826996$var$toGregorian(date));
	}
	balanceDate() {}
	constructor(...args) {
		super(...args), this.identifier = "buddhist";
	}
};
function $63d4eafd4d826996$var$toGregorian(date) {
	let [era, year] = $93635573935797de$export$4475b7e617eb123c(date.year + $63d4eafd4d826996$var$BUDDHIST_ERA_START);
	return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, date.month, date.day);
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/TaiwanCalendar.mjs
var $c009cc5f64923054$var$TAIWAN_ERA_START = 1911;
function $c009cc5f64923054$var$gregorianYear(date) {
	return date.era === "minguo" ? date.year + $c009cc5f64923054$var$TAIWAN_ERA_START : 1 - date.year + $c009cc5f64923054$var$TAIWAN_ERA_START;
}
function $c009cc5f64923054$var$gregorianToTaiwan(year) {
	let y = year - $c009cc5f64923054$var$TAIWAN_ERA_START;
	if (y > 0) return ["minguo", y];
	else return ["before_minguo", 1 - y];
}
var $c009cc5f64923054$export$65e01080afcb0799 = class extends $93635573935797de$export$80ee6245ec4f29ec {
	fromJulianDay(jd) {
		let date = super.fromJulianDay(jd);
		let [era, year] = $c009cc5f64923054$var$gregorianToTaiwan($93635573935797de$export$c36e0ecb2d4fa69d(date.era, date.year));
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, date.month, date.day);
	}
	toJulianDay(date) {
		return super.toJulianDay($c009cc5f64923054$var$toGregorian(date));
	}
	getEras() {
		return ["before_minguo", "minguo"];
	}
	balanceDate(date) {
		let [era, year] = $c009cc5f64923054$var$gregorianToTaiwan($c009cc5f64923054$var$gregorianYear(date));
		date.era = era;
		date.year = year;
	}
	isInverseEra(date) {
		return date.era === "before_minguo";
	}
	getDaysInMonth(date) {
		return super.getDaysInMonth($c009cc5f64923054$var$toGregorian(date));
	}
	getYearsInEra(date) {
		return date.era === "before_minguo" ? 9999 : 8088;
	}
	constructor(...args) {
		super(...args), this.identifier = "roc";
	}
};
function $c009cc5f64923054$var$toGregorian(date) {
	let [era, year] = $93635573935797de$export$4475b7e617eb123c($c009cc5f64923054$var$gregorianYear(date));
	return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, date.month, date.day);
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/PersianCalendar.mjs
var $a0cc0739a536c3b1$var$PERSIAN_EPOCH = 1948320;
var $a0cc0739a536c3b1$var$MONTH_START = [
	0,
	31,
	62,
	93,
	124,
	155,
	186,
	216,
	246,
	276,
	306,
	336
];
var $a0cc0739a536c3b1$export$37fccdbfd14c5939 = class {
	fromJulianDay(jd) {
		let daysSinceEpoch = jd - $a0cc0739a536c3b1$var$PERSIAN_EPOCH;
		let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);
		let dayOfYear = daysSinceEpoch - (365 * (year - 1) + Math.floor((8 * year + 21) / 33));
		let month = dayOfYear < 216 ? Math.floor(dayOfYear / 31) : Math.floor((dayOfYear - 6) / 30);
		let day = dayOfYear - $a0cc0739a536c3b1$var$MONTH_START[month] + 1;
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year, month + 1, day);
	}
	toJulianDay(date) {
		let jd = 1948319 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);
		jd += $a0cc0739a536c3b1$var$MONTH_START[date.month - 1];
		jd += date.day;
		return jd;
	}
	getMonthsInYear() {
		return 12;
	}
	getDaysInMonth(date) {
		if (date.month <= 6) return 31;
		if (date.month <= 11) return 30;
		return $09ec6a572d60460f$export$842a2cf37af977e1(25 * date.year + 11, 33) < 8 ? 30 : 29;
	}
	getMaximumMonthsInYear() {
		return 12;
	}
	getMaximumDaysInMonth() {
		return 31;
	}
	getEras() {
		return ["AP"];
	}
	getYearsInEra() {
		return 9377;
	}
	constructor() {
		this.identifier = "persian";
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/IndianCalendar.mjs
var $11fa67a177e45470$var$INDIAN_ERA_START = 78;
var $11fa67a177e45470$var$INDIAN_YEAR_START = 80;
var $11fa67a177e45470$export$39f31c639fa15726 = class extends $93635573935797de$export$80ee6245ec4f29ec {
	fromJulianDay(jd) {
		let date = super.fromJulianDay(jd);
		let indianYear = date.year - $11fa67a177e45470$var$INDIAN_ERA_START;
		let yDay = jd - $93635573935797de$export$f297eb839006d339(date.era, date.year, 1, 1);
		let leapMonth;
		if (yDay < $11fa67a177e45470$var$INDIAN_YEAR_START) {
			indianYear--;
			leapMonth = $93635573935797de$export$553d7fa8e3805fc0(date.year - 1) ? 31 : 30;
			yDay += leapMonth + 155 + 90 + 10;
		} else {
			leapMonth = $93635573935797de$export$553d7fa8e3805fc0(date.year) ? 31 : 30;
			yDay -= $11fa67a177e45470$var$INDIAN_YEAR_START;
		}
		let indianMonth;
		let indianDay;
		if (yDay < leapMonth) {
			indianMonth = 1;
			indianDay = yDay + 1;
		} else {
			let mDay = yDay - leapMonth;
			if (mDay < 155) {
				indianMonth = Math.floor(mDay / 31) + 2;
				indianDay = mDay % 31 + 1;
			} else {
				mDay -= 155;
				indianMonth = Math.floor(mDay / 30) + 7;
				indianDay = mDay % 30 + 1;
			}
		}
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, indianYear, indianMonth, indianDay);
	}
	toJulianDay(date) {
		let [era, year] = $93635573935797de$export$4475b7e617eb123c(date.year + $11fa67a177e45470$var$INDIAN_ERA_START);
		let leapMonth;
		let jd;
		if ($93635573935797de$export$553d7fa8e3805fc0(year)) {
			leapMonth = 31;
			jd = $93635573935797de$export$f297eb839006d339(era, year, 3, 21);
		} else {
			leapMonth = 30;
			jd = $93635573935797de$export$f297eb839006d339(era, year, 3, 22);
		}
		if (date.month === 1) return jd + date.day - 1;
		jd += leapMonth + Math.min(date.month - 2, 5) * 31;
		if (date.month >= 8) jd += (date.month - 7) * 30;
		jd += date.day - 1;
		return jd;
	}
	getDaysInMonth(date) {
		if (date.month === 1 && $93635573935797de$export$553d7fa8e3805fc0(date.year + $11fa67a177e45470$var$INDIAN_ERA_START)) return 31;
		if (date.month >= 2 && date.month <= 6) return 31;
		return 30;
	}
	getYearsInEra() {
		return 9919;
	}
	getEras() {
		return ["saka"];
	}
	balanceDate() {}
	constructor(...args) {
		super(...args), this.identifier = "indian";
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/IslamicCalendar.mjs
var $fd4f9bc1ba0e49a8$var$CIVIL_EPOC = 1948440;
var $fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC = 1948439;
var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START = 1300;
var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END = 1600;
var $fd4f9bc1ba0e49a8$var$UMALQURA_START_DAYS = 460322;
function $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, month, day) {
	return day + Math.ceil(29.5 * (month - 1)) + (year - 1) * 354 + Math.floor((3 + 11 * year) / 30) + epoch - 1;
}
function $fd4f9bc1ba0e49a8$var$julianDayToIslamic(calendar, epoch, jd) {
	let year = Math.floor((30 * (jd - epoch) + 10646) / 10631);
	let month = Math.min(12, Math.ceil((jd - (29 + $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, 1, 1))) / 29.5) + 1);
	return new $2aaf608024c21ca1$export$99faa760c7908e4f(calendar, year, month, jd - $fd4f9bc1ba0e49a8$var$islamicToJulianDay(epoch, year, month, 1) + 1);
}
function $fd4f9bc1ba0e49a8$var$isLeapYear(year) {
	return (14 + 11 * year) % 30 < 11;
}
var $fd4f9bc1ba0e49a8$export$2066795aadd37bfc = class {
	fromJulianDay(jd) {
		return $fd4f9bc1ba0e49a8$var$julianDayToIslamic(this, $fd4f9bc1ba0e49a8$var$CIVIL_EPOC, jd);
	}
	toJulianDay(date) {
		return $fd4f9bc1ba0e49a8$var$islamicToJulianDay($fd4f9bc1ba0e49a8$var$CIVIL_EPOC, date.year, date.month, date.day);
	}
	getDaysInMonth(date) {
		let length = 29 + date.month % 2;
		if (date.month === 12 && $fd4f9bc1ba0e49a8$var$isLeapYear(date.year)) length++;
		return length;
	}
	getMonthsInYear() {
		return 12;
	}
	getDaysInYear(date) {
		return $fd4f9bc1ba0e49a8$var$isLeapYear(date.year) ? 355 : 354;
	}
	getMaximumMonthsInYear() {
		return 12;
	}
	getMaximumDaysInMonth() {
		return 30;
	}
	getYearsInEra() {
		return 9665;
	}
	getEras() {
		return ["AH"];
	}
	constructor() {
		this.identifier = "islamic-civil";
	}
};
var $fd4f9bc1ba0e49a8$export$37f0887f2f9d22f7 = class extends $fd4f9bc1ba0e49a8$export$2066795aadd37bfc {
	fromJulianDay(jd) {
		return $fd4f9bc1ba0e49a8$var$julianDayToIslamic(this, $fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC, jd);
	}
	toJulianDay(date) {
		return $fd4f9bc1ba0e49a8$var$islamicToJulianDay($fd4f9bc1ba0e49a8$var$ASTRONOMICAL_EPOC, date.year, date.month, date.day);
	}
	constructor(...args) {
		super(...args), this.identifier = "islamic-tbla";
	}
};
var $fd4f9bc1ba0e49a8$var$UMALQURA_DATA = "qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";
var $fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH;
var $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE;
function $fd4f9bc1ba0e49a8$var$umalquraYearStart(year) {
	return $fd4f9bc1ba0e49a8$var$UMALQURA_START_DAYS + $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START];
}
function $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, month) {
	let idx = year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START;
	let mask = 1 << 11 - (month - 1);
	if (($fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH[idx] & mask) === 0) return 29;
	else return 30;
}
function $fd4f9bc1ba0e49a8$var$umalquraMonthStart(year, month) {
	let day = $fd4f9bc1ba0e49a8$var$umalquraYearStart(year);
	for (let i = 1; i < month; i++) day += $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, i);
	return day;
}
function $fd4f9bc1ba0e49a8$var$umalquraYearLength(year) {
	return $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year + 1 - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START] - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START];
}
var $fd4f9bc1ba0e49a8$export$5baab4758c231076 = class extends $fd4f9bc1ba0e49a8$export$2066795aadd37bfc {
	constructor() {
		super(), this.identifier = "islamic-umalqura";
		if (!$fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH) $fd4f9bc1ba0e49a8$var$UMALQURA_MONTHLENGTH = new Uint16Array(Uint8Array.from(atob($fd4f9bc1ba0e49a8$var$UMALQURA_DATA), (c) => c.charCodeAt(0)).buffer);
		if (!$fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE) {
			$fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE = /* @__PURE__ */ new Uint32Array(301);
			let yearStart = 0;
			for (let year = $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START; year <= $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END; year++) {
				$fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START_TABLE[year - $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START] = yearStart;
				for (let i = 1; i <= 12; i++) yearStart += $fd4f9bc1ba0e49a8$var$umalquraMonthLength(year, i);
			}
		}
	}
	fromJulianDay(jd) {
		let days = jd - $fd4f9bc1ba0e49a8$var$CIVIL_EPOC;
		let startDays = $fd4f9bc1ba0e49a8$var$umalquraYearStart($fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START);
		let endDays = $fd4f9bc1ba0e49a8$var$umalquraYearStart($fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END);
		if (days < startDays || days > endDays) return super.fromJulianDay(jd);
		else {
			let y = 1299;
			let m = 1;
			let d = 1;
			while (d > 0) {
				y++;
				d = days - $fd4f9bc1ba0e49a8$var$umalquraYearStart(y) + 1;
				let yearLength = $fd4f9bc1ba0e49a8$var$umalquraYearLength(y);
				if (d === yearLength) {
					m = 12;
					break;
				} else if (d < yearLength) {
					let monthLength = $fd4f9bc1ba0e49a8$var$umalquraMonthLength(y, m);
					m = 1;
					while (d > monthLength) {
						d -= monthLength;
						m++;
						monthLength = $fd4f9bc1ba0e49a8$var$umalquraMonthLength(y, m);
					}
					break;
				}
			}
			return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, y, m, days - $fd4f9bc1ba0e49a8$var$umalquraMonthStart(y, m) + 1);
		}
	}
	toJulianDay(date) {
		if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.toJulianDay(date);
		return $fd4f9bc1ba0e49a8$var$CIVIL_EPOC + $fd4f9bc1ba0e49a8$var$umalquraMonthStart(date.year, date.month) + (date.day - 1);
	}
	getDaysInMonth(date) {
		if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.getDaysInMonth(date);
		return $fd4f9bc1ba0e49a8$var$umalquraMonthLength(date.year, date.month);
	}
	getDaysInYear(date) {
		if (date.year < $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_START || date.year > $fd4f9bc1ba0e49a8$var$UMALQURA_YEAR_END) return super.getDaysInYear(date);
		return $fd4f9bc1ba0e49a8$var$umalquraYearLength(date.year);
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/HebrewCalendar.mjs
var $f39495b96f9dbac6$var$HEBREW_EPOCH = 347997;
var $f39495b96f9dbac6$var$DAY_PARTS = 25920;
var $f39495b96f9dbac6$var$MONTH_PARTS = 765433;
function $f39495b96f9dbac6$var$isLeapYear(year) {
	return $09ec6a572d60460f$export$842a2cf37af977e1(year * 7 + 1, 19) < 7;
}
function $f39495b96f9dbac6$var$hebrewDelay1(year) {
	let months = Math.floor((235 * year - 234) / 19);
	let parts = 12084 + 13753 * months;
	let day = months * 29 + Math.floor(parts / 25920);
	if ($09ec6a572d60460f$export$842a2cf37af977e1(3 * (day + 1), 7) < 3) day += 1;
	return day;
}
function $f39495b96f9dbac6$var$hebrewDelay2(year) {
	let last = $f39495b96f9dbac6$var$hebrewDelay1(year - 1);
	let present = $f39495b96f9dbac6$var$hebrewDelay1(year);
	if ($f39495b96f9dbac6$var$hebrewDelay1(year + 1) - present === 356) return 2;
	if (present - last === 382) return 1;
	return 0;
}
function $f39495b96f9dbac6$var$startOfYear(year) {
	return $f39495b96f9dbac6$var$hebrewDelay1(year) + $f39495b96f9dbac6$var$hebrewDelay2(year);
}
function $f39495b96f9dbac6$var$getDaysInYear(year) {
	return $f39495b96f9dbac6$var$startOfYear(year + 1) - $f39495b96f9dbac6$var$startOfYear(year);
}
function $f39495b96f9dbac6$var$getYearType(year) {
	let yearLength = $f39495b96f9dbac6$var$getDaysInYear(year);
	if (yearLength > 380) yearLength -= 30;
	switch (yearLength) {
		case 353: return 0;
		case 354: return 1;
		case 355: return 2;
	}
}
function $f39495b96f9dbac6$var$getDaysInMonth(year, month) {
	if (month >= 6 && !$f39495b96f9dbac6$var$isLeapYear(year)) month++;
	if (month === 4 || month === 7 || month === 9 || month === 11 || month === 13) return 29;
	let yearType = $f39495b96f9dbac6$var$getYearType(year);
	if (month === 2) return yearType === 2 ? 30 : 29;
	if (month === 3) return yearType === 0 ? 29 : 30;
	if (month === 6) return $f39495b96f9dbac6$var$isLeapYear(year) ? 30 : 0;
	return 30;
}
var $f39495b96f9dbac6$export$ca405048b8fb5af = class {
	fromJulianDay(jd) {
		let d = jd - $f39495b96f9dbac6$var$HEBREW_EPOCH;
		let m = d * $f39495b96f9dbac6$var$DAY_PARTS / $f39495b96f9dbac6$var$MONTH_PARTS;
		let year = Math.floor((19 * m + 234) / 235) + 1;
		let ys = $f39495b96f9dbac6$var$startOfYear(year);
		let dayOfYear = Math.floor(d - ys);
		while (dayOfYear < 1) {
			year--;
			ys = $f39495b96f9dbac6$var$startOfYear(year);
			dayOfYear = Math.floor(d - ys);
		}
		let month = 1;
		let monthStart = 0;
		while (monthStart < dayOfYear) {
			monthStart += $f39495b96f9dbac6$var$getDaysInMonth(year, month);
			month++;
		}
		month--;
		monthStart -= $f39495b96f9dbac6$var$getDaysInMonth(year, month);
		let day = dayOfYear - monthStart;
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, year, month, day);
	}
	toJulianDay(date) {
		let jd = $f39495b96f9dbac6$var$startOfYear(date.year);
		for (let month = 1; month < date.month; month++) jd += $f39495b96f9dbac6$var$getDaysInMonth(date.year, month);
		return jd + date.day + $f39495b96f9dbac6$var$HEBREW_EPOCH;
	}
	getDaysInMonth(date) {
		return $f39495b96f9dbac6$var$getDaysInMonth(date.year, date.month);
	}
	getMonthsInYear(date) {
		return $f39495b96f9dbac6$var$isLeapYear(date.year) ? 13 : 12;
	}
	getDaysInYear(date) {
		return $f39495b96f9dbac6$var$getDaysInYear(date.year);
	}
	getMaximumMonthsInYear() {
		return 13;
	}
	getMaximumDaysInMonth() {
		return 30;
	}
	getYearsInEra() {
		return 9999;
	}
	getEras() {
		return ["AM"];
	}
	balanceYearMonth(date, previousDate) {
		if (previousDate.year !== date.year) {
			if ($f39495b96f9dbac6$var$isLeapYear(previousDate.year) && !$f39495b96f9dbac6$var$isLeapYear(date.year) && previousDate.month > 6) date.month--;
			else if (!$f39495b96f9dbac6$var$isLeapYear(previousDate.year) && $f39495b96f9dbac6$var$isLeapYear(date.year) && previousDate.month > 6) date.month++;
		}
	}
	constructor() {
		this.identifier = "hebrew";
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/EthiopicCalendar.mjs
var $97cfca9efd59523d$var$ETHIOPIC_EPOCH = 1723856;
var $97cfca9efd59523d$var$COPTIC_EPOCH = 1824665;
var $97cfca9efd59523d$var$AMETE_MIHRET_DELTA = 5500;
function $97cfca9efd59523d$var$ceToJulianDay(epoch, year, month, day) {
	return epoch + 365 * year + Math.floor(year / 4) + 30 * (month - 1) + day - 1;
}
function $97cfca9efd59523d$var$julianDayToCE(epoch, jd) {
	let year = Math.floor(4 * (jd - epoch) / 1461);
	let month = 1 + Math.floor((jd - $97cfca9efd59523d$var$ceToJulianDay(epoch, year, 1, 1)) / 30);
	return [
		year,
		month,
		jd + 1 - $97cfca9efd59523d$var$ceToJulianDay(epoch, year, month, 1)
	];
}
function $97cfca9efd59523d$var$getLeapDay(year) {
	return Math.floor(year % 4 / 3);
}
function $97cfca9efd59523d$var$getDaysInMonth(year, month) {
	if (month % 13 !== 0) return 30;
	else return $97cfca9efd59523d$var$getLeapDay(year) + 5;
}
var $97cfca9efd59523d$export$26ba6eab5e20cd7d = class {
	fromJulianDay(jd) {
		let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$ETHIOPIC_EPOCH, jd);
		let era = "AM";
		if (year <= 0) {
			era = "AA";
			year += $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
		}
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, month, day);
	}
	toJulianDay(date) {
		let year = date.year;
		if (date.era === "AA") year -= $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
		return $97cfca9efd59523d$var$ceToJulianDay($97cfca9efd59523d$var$ETHIOPIC_EPOCH, year, date.month, date.day);
	}
	getDaysInMonth(date) {
		return $97cfca9efd59523d$var$getDaysInMonth(date.year, date.month);
	}
	getMonthsInYear() {
		return 13;
	}
	getDaysInYear(date) {
		return 365 + $97cfca9efd59523d$var$getLeapDay(date.year);
	}
	getMaximumMonthsInYear() {
		return 13;
	}
	getMaximumDaysInMonth() {
		return 30;
	}
	getYearsInEra(date) {
		return date.era === "AA" ? 9999 : 9991;
	}
	getEras() {
		return ["AA", "AM"];
	}
	constructor() {
		this.identifier = "ethiopic";
	}
};
var $97cfca9efd59523d$export$d72e0c37005a4914 = class extends $97cfca9efd59523d$export$26ba6eab5e20cd7d {
	fromJulianDay(jd) {
		let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$ETHIOPIC_EPOCH, jd);
		year += $97cfca9efd59523d$var$AMETE_MIHRET_DELTA;
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, "AA", year, month, day);
	}
	getEras() {
		return ["AA"];
	}
	getYearsInEra() {
		return 9999;
	}
	constructor(...args) {
		super(...args), this.identifier = "ethioaa";
	}
};
var $97cfca9efd59523d$export$fe6243cbe1a4b7c1 = class extends $97cfca9efd59523d$export$26ba6eab5e20cd7d {
	fromJulianDay(jd) {
		let [year, month, day] = $97cfca9efd59523d$var$julianDayToCE($97cfca9efd59523d$var$COPTIC_EPOCH, jd);
		let era = "CE";
		if (year <= 0) {
			era = "BCE";
			year = 1 - year;
		}
		return new $2aaf608024c21ca1$export$99faa760c7908e4f(this, era, year, month, day);
	}
	toJulianDay(date) {
		let year = date.year;
		if (date.era === "BCE") year = 1 - year;
		return $97cfca9efd59523d$var$ceToJulianDay($97cfca9efd59523d$var$COPTIC_EPOCH, year, date.month, date.day);
	}
	getDaysInMonth(date) {
		let year = date.year;
		if (date.era === "BCE") year = 1 - year;
		return $97cfca9efd59523d$var$getDaysInMonth(year, date.month);
	}
	isInverseEra(date) {
		return date.era === "BCE";
	}
	balanceDate(date) {
		if (date.year <= 0) {
			date.era = date.era === "BCE" ? "CE" : "BCE";
			date.year = 1 - date.year;
		}
	}
	getEras() {
		return ["BCE", "CE"];
	}
	getYearsInEra(date) {
		return date.era === "BCE" ? 9999 : 9715;
	}
	constructor(...args) {
		super(...args), this.identifier = "coptic";
	}
};
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/createCalendar.mjs
function $84102b64e5ca022f$export$dd0bbc9b26defe37(name) {
	switch (name) {
		case "buddhist": return new $63d4eafd4d826996$export$42d20a78301dee44();
		case "ethiopic": return new $97cfca9efd59523d$export$26ba6eab5e20cd7d();
		case "ethioaa": return new $97cfca9efd59523d$export$d72e0c37005a4914();
		case "coptic": return new $97cfca9efd59523d$export$fe6243cbe1a4b7c1();
		case "hebrew": return new $f39495b96f9dbac6$export$ca405048b8fb5af();
		case "indian": return new $11fa67a177e45470$export$39f31c639fa15726();
		case "islamic-civil": return new $fd4f9bc1ba0e49a8$export$2066795aadd37bfc();
		case "islamic-tbla": return new $fd4f9bc1ba0e49a8$export$37f0887f2f9d22f7();
		case "islamic-umalqura": return new $fd4f9bc1ba0e49a8$export$5baab4758c231076();
		case "japanese": return new $34b940b49ba042df$export$b746ab2b60cdffbf();
		case "persian": return new $a0cc0739a536c3b1$export$37fccdbfd14c5939();
		case "roc": return new $c009cc5f64923054$export$65e01080afcb0799();
		default: return new $93635573935797de$export$80ee6245ec4f29ec();
	}
}
//#endregion
//#region ../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.mjs
var $12a3c853105e5a70$var$formatterCache = /* @__PURE__ */ new Map();
var $12a3c853105e5a70$export$ad991b66133851cf = class {
	constructor(locale, options = {}) {
		this.formatter = $12a3c853105e5a70$var$getCachedDateFormatter(locale, options);
		this.options = options;
	}
	/**
	* Formats a date as a string according to the locale and format options passed to the
	* constructor.
	*/ format(value) {
		return this.formatter.format(value);
	}
	/** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */ formatToParts(value) {
		return this.formatter.formatToParts(value);
	}
	/** Formats a date range as a string. */ formatRange(start, end) {
		if (typeof this.formatter.formatRange === "function") return this.formatter.formatRange(start, end);
		if (end < start) throw new RangeError("End date must be >= start date");
		return `${this.formatter.format(start)} \u{2013} ${this.formatter.format(end)}`;
	}
	/** Formats a date range as an array of parts. */ formatRangeToParts(start, end) {
		if (typeof this.formatter.formatRangeToParts === "function") return this.formatter.formatRangeToParts(start, end);
		if (end < start) throw new RangeError("End date must be >= start date");
		let startParts = this.formatter.formatToParts(start);
		let endParts = this.formatter.formatToParts(end);
		return [
			...startParts.map((p) => ({
				...p,
				source: "startRange"
			})),
			{
				type: "literal",
				value: " – ",
				source: "shared"
			},
			...endParts.map((p) => ({
				...p,
				source: "endRange"
			}))
		];
	}
	/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
		let resolvedOptions = this.formatter.resolvedOptions();
		if ($12a3c853105e5a70$var$hasBuggyResolvedHourCycle()) {
			if (!this.resolvedHourCycle) this.resolvedHourCycle = $12a3c853105e5a70$var$getResolvedHourCycle(resolvedOptions.locale, this.options);
			resolvedOptions.hourCycle = this.resolvedHourCycle;
			resolvedOptions.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12";
		}
		if (resolvedOptions.calendar === "ethiopic-amete-alem") resolvedOptions.calendar = "ethioaa";
		return resolvedOptions;
	}
};
var $12a3c853105e5a70$var$hour12Preferences = {
	true: { ja: "h11" },
	false: {}
};
function $12a3c853105e5a70$var$getCachedDateFormatter(locale, options = {}) {
	if (typeof options.hour12 === "boolean" && $12a3c853105e5a70$var$hasBuggyHour12Behavior()) {
		options = { ...options };
		let pref = $12a3c853105e5a70$var$hour12Preferences[String(options.hour12)][locale.split("-")[0]];
		let defaultHourCycle = options.hour12 ? "h12" : "h23";
		options.hourCycle = pref ?? defaultHourCycle;
		delete options.hour12;
	}
	let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
	if ($12a3c853105e5a70$var$formatterCache.has(cacheKey)) return $12a3c853105e5a70$var$formatterCache.get(cacheKey);
	let numberFormatter = new Intl.DateTimeFormat(locale, options);
	$12a3c853105e5a70$var$formatterCache.set(cacheKey, numberFormatter);
	return numberFormatter;
}
var $12a3c853105e5a70$var$_hasBuggyHour12Behavior = null;
function $12a3c853105e5a70$var$hasBuggyHour12Behavior() {
	if ($12a3c853105e5a70$var$_hasBuggyHour12Behavior == null) $12a3c853105e5a70$var$_hasBuggyHour12Behavior = new Intl.DateTimeFormat("en-US", {
		hour: "numeric",
		hour12: false
	}).format(new Date(2020, 2, 3, 0)) === "24";
	return $12a3c853105e5a70$var$_hasBuggyHour12Behavior;
}
var $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle = null;
function $12a3c853105e5a70$var$hasBuggyResolvedHourCycle() {
	if ($12a3c853105e5a70$var$_hasBuggyResolvedHourCycle == null) $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle = new Intl.DateTimeFormat("fr", {
		hour: "numeric",
		hour12: false
	}).resolvedOptions().hourCycle === "h12";
	return $12a3c853105e5a70$var$_hasBuggyResolvedHourCycle;
}
function $12a3c853105e5a70$var$getResolvedHourCycle(locale, options) {
	if (!options.timeStyle && !options.hour) return void 0;
	locale = locale.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, "");
	locale += (locale.includes("-u-") ? "" : "-u") + "-nu-latn";
	let formatter = $12a3c853105e5a70$var$getCachedDateFormatter(locale, {
		...options,
		timeZone: void 0
	});
	let min = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 0)).find((p) => p.type === "hour").value, 10);
	let max = parseInt(formatter.formatToParts(new Date(2020, 2, 3, 23)).find((p) => p.type === "hour").value, 10);
	if (min === 0 && max === 23) return "h23";
	if (min === 24 && max === 23) return "h24";
	if (min === 0 && max === 11) return "h11";
	if (min === 12 && max === 11) return "h12";
	throw new Error("Unexpected hour cycle result");
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/comparators.js
/**
* Given a `DateValue` object, convert it to a native `Date` object.
* If a timezone is provided, the date will be converted to that timezone.
* If no timezone is provided, the date will be converted to the local timezone.
*/
function toDate(dateValue, tz = $ad063034c8620db8$export$aa8b41735afcabd2()) {
	if (isZonedDateTime(dateValue)) return dateValue.toDate();
	else return dateValue.toDate(tz);
}
function isCalendarDateTime(dateValue) {
	return dateValue instanceof $2aaf608024c21ca1$export$ca871e8dbb80966f;
}
function isZonedDateTime(dateValue) {
	return dateValue instanceof $2aaf608024c21ca1$export$d3b7288e7994edea;
}
function hasTime(dateValue) {
	return isCalendarDateTime(dateValue) || isZonedDateTime(dateValue);
}
/**
* Given a date, return the number of days in the month.
*/
function getDaysInMonth(date) {
	if (date instanceof Date) {
		const year = date.getFullYear();
		const month = date.getMonth() + 1;
		/**
		* By using zero as the day, we get the
		* last day of the previous month, which
		* is the month we originally passed in.
		*/
		return new Date(year, month, 0).getDate();
	} else return date.set({ day: 100 }).day;
}
/**
* Determine if a date is before the reference date.
* @param dateToCompare - is this date before the `referenceDate`
* @param referenceDate - is the `dateToCompare` before this date
*
* @see {@link isBeforeOrSame} for inclusive
*/
function isBefore(dateToCompare, referenceDate) {
	return dateToCompare.compare(referenceDate) < 0;
}
/**
* Determine if a date is after the reference date.
* @param dateToCompare - is this date after the `referenceDate`
* @param referenceDate - is the `dateToCompare` after this date
*
* @see {@link isAfterOrSame} for inclusive
*/
function isAfter(dateToCompare, referenceDate) {
	return dateToCompare.compare(referenceDate) > 0;
}
/**
* Determine if a date is before or the same as the reference date.
*
* @param dateToCompare - the date to compare
* @param referenceDate - the reference date to make the comparison against
*
* @see {@link isBefore} for non-inclusive
*/
function isBeforeOrSame(dateToCompare, referenceDate) {
	return dateToCompare.compare(referenceDate) <= 0;
}
/**
* Determine if a date is after or the same as the reference date.
*
* @param dateToCompare - is this date after or the same as the `referenceDate`
* @param referenceDate - is the `dateToCompare` after or the same as this date
*
* @see {@link isAfter} for non-inclusive
*/
function isAfterOrSame(dateToCompare, referenceDate) {
	return dateToCompare.compare(referenceDate) >= 0;
}
/**
* Determine if a date is inclusively between a start and end reference date.
*
* @param date - is this date inclusively between the `start` and `end` dates
* @param start - the start reference date to make the comparison against
* @param end - the end reference date to make the comparison against
*
* @see {@link isBetween} for non-inclusive
*/
function isBetweenInclusive(date, start, end) {
	return isAfterOrSame(date, start) && isBeforeOrSame(date, end);
}
/**
* Determine if a date is between a start and end reference date.
*
* @param date - is this date between the `start` and `end` dates
* @param start - the start reference date to make the comparison against
* @param end - the end reference date to make the comparison against
*
* @see {@link isBetweenInclusive} for inclusive
*/
function isBetween(date, start, end) {
	return isAfter(date, start) && isBefore(date, end);
}
function getLastFirstDayOfWeek(date, firstDayOfWeek, locale) {
	/**
	* "firstDayOfWeek" is fixed to 0(Sunday) to avoid confusion regarding locales.
	* This also aligns with other date libraries, e.g., date-fns.
	*
	* #see https://github.com/unovue/reka-ui/issues/2157
	*/
	const day = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, "sun");
	if (firstDayOfWeek > day) return date.subtract({ days: day + 7 - firstDayOfWeek });
	if (firstDayOfWeek === day) return date;
	return date.subtract({ days: day - firstDayOfWeek });
}
function getNextLastDayOfWeek(date, firstDayOfWeek, locale) {
	/**
	* "firstDayOfWeek" is fixed to 0(Sunday) to avoid confusion regarding locales.
	* This also aligns with other date libraries, e.g., date-fns.
	*
	* #see https://github.com/unovue/reka-ui/issues/2157
	*/
	const day = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, "sun");
	const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
	if (day === lastDayOfWeek) return date;
	if (day > lastDayOfWeek) return date.add({ days: 7 - day + lastDayOfWeek });
	return date.add({ days: lastDayOfWeek - day });
}
function areAllDaysBetweenValid(start, end, isUnavailable, isDisabled, isHighlightable) {
	if (isUnavailable === void 0 && isDisabled === void 0 && isHighlightable === void 0) return true;
	let dCurrent = start.add({ days: 1 });
	if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent)) && !isHighlightable?.(dCurrent)) return false;
	const dEnd = end;
	while (dCurrent.compare(dEnd) < 0) {
		dCurrent = dCurrent.add({ days: 1 });
		if ((isDisabled?.(dCurrent) || isUnavailable?.(dCurrent)) && !isHighlightable?.(dCurrent)) return false;
	}
	return true;
}
/**
* A helper function used throughout the various date builders
* to generate a default `DateValue` using the `defaultValue`,
* `defaultPlaceholder`, and `granularity` props.
*
* It's important to match the `DateValue` type being used
* elsewhere in the builder, so they behave according to the
* behavior the user expects based on the props they've provided.
*
*/
function getDefaultDate(props) {
	const { defaultValue, defaultPlaceholder, granularity = "day", locale = "en" } = props;
	if (Array.isArray(defaultValue) && defaultValue.length) return defaultValue.at(-1).copy();
	if (defaultValue && !Array.isArray(defaultValue)) return defaultValue.copy();
	if (defaultPlaceholder) return defaultPlaceholder.copy();
	const date = /* @__PURE__ */ new Date();
	const year = date.getFullYear();
	const month = date.getMonth() + 1;
	const day = date.getDate();
	const calendarDateTimeGranularities = [
		"hour",
		"minute",
		"second"
	];
	const calendar = $84102b64e5ca022f$export$dd0bbc9b26defe37(new $12a3c853105e5a70$export$ad991b66133851cf(locale).resolvedOptions().calendar);
	if (calendarDateTimeGranularities.includes(granularity ?? "day")) return $d07e34cce18680fd$export$b4a036af3fc0b032(new $2aaf608024c21ca1$export$ca871e8dbb80966f(year, month, day, 0, 0, 0), calendar);
	return $d07e34cce18680fd$export$b4a036af3fc0b032(new $2aaf608024c21ca1$export$99faa760c7908e4f(year, month, day), calendar);
}
function getDefaultTime(props) {
	const { defaultValue, defaultPlaceholder } = props;
	if (defaultValue) return defaultValue.copy();
	if (defaultPlaceholder) return defaultPlaceholder.copy();
	return new $2aaf608024c21ca1$export$680ea196effce5f(0, 0, 0);
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/utils.js
/**
* Splits an array into chunks of a given size.
* @param arr The array to split.
* @param size The size of each chunk.
* @returns An array of arrays, where each sub-array has `size` elements from the original array.
* @example ```ts
* const arr = [1, 2, 3, 4, 5, 6, 7, 8];
* const chunks = chunk(arr, 3);
* // chunks = [[1, 2, 3], [4, 5, 6], [7, 8]]
* ```
*/
function chunk(arr, size) {
	const result = [];
	for (let i = 0; i < arr.length; i += size) result.push(arr.slice(i, i + size));
	return result;
}
function getOptsByGranularity(granularity, hourCycle, isTimeValue = false) {
	const opts = {
		year: "numeric",
		month: "2-digit",
		day: "2-digit",
		hour: "2-digit",
		minute: "2-digit",
		second: "2-digit",
		timeZoneName: "short",
		hourCycle: normalizeHourCycle(hourCycle),
		hour12: normalizeHour12(hourCycle)
	};
	if (isTimeValue) {
		delete opts.year;
		delete opts.month;
		delete opts.day;
	}
	if (granularity === "day") {
		delete opts.second;
		delete opts.hour;
		delete opts.minute;
		delete opts.timeZoneName;
	}
	if (granularity === "hour") {
		delete opts.minute;
		delete opts.second;
	}
	if (granularity === "minute") delete opts.second;
	return opts;
}
function normalizeDateStep(props) {
	return defu(props?.step, {
		year: 1,
		month: 1,
		day: 1,
		hour: 1,
		minute: 1,
		second: 1,
		millisecond: 1
	});
}
function handleCalendarInitialFocus(calendar) {
	const selectedDay = calendar.querySelector("[data-selected]");
	if (selectedDay) return selectedDay.focus();
	const today = calendar.querySelector("[data-today]");
	if (today) return today.focus();
	const firstDay = calendar.querySelector("[data-value]:not([data-outside-view]):not([data-disabled])");
	if (firstDay) return firstDay.focus();
}
function normalizeHourCycle(hourCycle) {
	if (hourCycle === 24) return "h23";
	if (hourCycle === 12) return "h11";
}
function normalizeHour12(hourCycle) {
	if (hourCycle === 24) return false;
	if (hourCycle === 12) return true;
}
function getInputType(granularity) {
	return granularity === "day" ? "date" : "datetime-local";
}
function normalizeInputValue(date, granularity) {
	if (!date) return "";
	const type = getInputType(granularity);
	const year = String(date.year).padStart(4, "0");
	const month = String(date.month).padStart(2, "0");
	const day = String(date.day).padStart(2, "0");
	if (type === "date") return `${year}-${month}-${day}`;
	const hour = String("hour" in date ? date.hour : 0).padStart(2, "0");
	const minute = String("minute" in date ? date.minute : 0).padStart(2, "0");
	if (granularity === "second") return `${year}-${month}-${day}T${hour}:${minute}:${String("second" in date ? date.second : 0).padStart(2, "0")}`;
	return `${year}-${month}-${day}T${hour}:${minute}`;
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useDateFormatter.js
/**
* Creates a wrapper around the `DateFormatter`, which is
* an improved version of the {@link Intl.DateTimeFormat} API,
* that is used internally by the various date builders to
* easily format dates in a consistent way.
*
* @see [DateFormatter](https://react-spectrum.adobe.com/internationalized/date/DateFormatter.html)
*/
function useDateFormatter(initialLocale, opts = {}) {
	const locale = ref(initialLocale);
	function getLocale() {
		return locale.value;
	}
	function setLocale(newLocale) {
		locale.value = newLocale;
	}
	function custom(date, options) {
		return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			...options
		}).format(date);
	}
	function selectedDate(date, includeTime = true) {
		if (hasTime(date) && includeTime) return custom(toDate(date), {
			dateStyle: "long",
			timeStyle: "long"
		});
		else return custom(toDate(date), { dateStyle: "long" });
	}
	function fullMonthAndYear(date, options = {}) {
		return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			month: "long",
			year: "numeric",
			...options
		}).format(date);
	}
	function fullMonth(date, options = {}) {
		return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			month: "long",
			...options
		}).format(date);
	}
	function getMonths() {
		const defaultDate = $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2());
		return [
			1,
			2,
			3,
			4,
			5,
			6,
			7,
			8,
			9,
			10,
			11,
			12
		].map((item) => ({
			label: fullMonth(toDate(defaultDate.set({ month: item }))),
			value: item
		}));
	}
	function fullYear(date, options = {}) {
		return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			year: "numeric",
			...options
		}).format(date);
	}
	function toParts(date, options) {
		if (isZonedDateTime(date)) return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			...options,
			timeZone: date.timeZone
		}).formatToParts(toDate(date));
		else return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			...options
		}).formatToParts(toDate(date));
	}
	function dayOfWeek(date, length = "narrow") {
		return new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			weekday: length
		}).format(date);
	}
	function dayPeriod(date) {
		const value = new $12a3c853105e5a70$export$ad991b66133851cf(locale.value, {
			...opts,
			hour: "numeric",
			minute: "numeric"
		}).formatToParts(date).find((p) => p.type === "dayPeriod")?.value;
		if (value === "PM" || value === "pm" || value === "p.m.") return "PM";
		return "AM";
	}
	const defaultPartOptions = {
		year: "numeric",
		month: "numeric",
		day: "numeric",
		hour: "numeric",
		minute: "numeric",
		second: "numeric"
	};
	function part(dateObj, type, options = {}) {
		const part$1 = toParts(dateObj, {
			...defaultPartOptions,
			...options
		}).find((p) => p.type === type);
		return part$1 ? part$1.value : "";
	}
	return {
		setLocale,
		getLocale,
		fullMonth,
		fullYear,
		fullMonthAndYear,
		toParts,
		custom,
		part,
		dayPeriod,
		selectedDate,
		dayOfWeek,
		getMonths
	};
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/shared/useLocale.js
/**
* The `useLocale` function provides a way to access the current locale in your application.
* @param {Ref<string | undefined>} [locale] - An optional ref containing the locale.
* @returns A computed ref holding the resolved locale.
*/
function useLocale(locale) {
	const context = injectConfigProviderContext({ locale: ref("en") });
	return computed(() => locale?.value || context.locale?.value || "en");
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/parts.js
var DATE_SEGMENT_PARTS = [
	"day",
	"month",
	"year"
];
var TIME_SEGMENT_PARTS = [
	"hour",
	"minute",
	"second",
	"dayPeriod"
];
var NON_EDITABLE_SEGMENT_PARTS = ["literal", "timeZoneName"];
var EDITABLE_SEGMENT_PARTS = [...DATE_SEGMENT_PARTS, ...TIME_SEGMENT_PARTS];
[...TIME_SEGMENT_PARTS];
[...EDITABLE_SEGMENT_PARTS, ...NON_EDITABLE_SEGMENT_PARTS].filter((part) => part !== "literal");
function isDateSegmentPart(part) {
	return DATE_SEGMENT_PARTS.includes(part);
}
function isSegmentPart(part) {
	return EDITABLE_SEGMENT_PARTS.includes(part);
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/placeholders.js
var supportedLocales = [
	"ach",
	"af",
	"am",
	"an",
	"ar",
	"ast",
	"az",
	"be",
	"bg",
	"bn",
	"br",
	"bs",
	"ca",
	"cak",
	"ckb",
	"cs",
	"cy",
	"da",
	"de",
	"dsb",
	"el",
	"en",
	"eo",
	"es",
	"et",
	"eu",
	"fa",
	"ff",
	"fi",
	"fr",
	"fy",
	"ga",
	"gd",
	"gl",
	"he",
	"hr",
	"hsb",
	"hu",
	"ia",
	"id",
	"it",
	"ja",
	"ka",
	"kk",
	"kn",
	"ko",
	"lb",
	"lo",
	"lt",
	"lv",
	"meh",
	"ml",
	"ms",
	"nl",
	"nn",
	"no",
	"oc",
	"pl",
	"pt",
	"rm",
	"ro",
	"ru",
	"sc",
	"scn",
	"sk",
	"sl",
	"sr",
	"sv",
	"szl",
	"tg",
	"th",
	"tr",
	"uk",
	"zh-CN",
	"zh-TW"
];
var placeholderFields = [
	"year",
	"month",
	"day"
];
var placeholders = {
	"ach": {
		year: "mwaka",
		month: "dwe",
		day: "nino"
	},
	"af": {
		year: "jjjj",
		month: "mm",
		day: "dd"
	},
	"am": {
		year: "ዓዓዓዓ",
		month: "ሚሜ",
		day: "ቀቀ"
	},
	"an": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"ar": {
		year: "سنة",
		month: "شهر",
		day: "يوم"
	},
	"ast": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"az": {
		year: "iiii",
		month: "aa",
		day: "gg"
	},
	"be": {
		year: "гггг",
		month: "мм",
		day: "дд"
	},
	"bg": {
		year: "гггг",
		month: "мм",
		day: "дд"
	},
	"bn": {
		year: "yyyy",
		month: "মিমি",
		day: "dd"
	},
	"br": {
		year: "bbbb",
		month: "mm",
		day: "dd"
	},
	"bs": {
		year: "gggg",
		month: "mm",
		day: "dd"
	},
	"ca": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"cak": {
		year: "jjjj",
		month: "ii",
		day: "q'q'"
	},
	"ckb": {
		year: "ساڵ",
		month: "مانگ",
		day: "ڕۆژ"
	},
	"cs": {
		year: "rrrr",
		month: "mm",
		day: "dd"
	},
	"cy": {
		year: "bbbb",
		month: "mm",
		day: "dd"
	},
	"da": {
		year: "åååå",
		month: "mm",
		day: "dd"
	},
	"de": {
		year: "jjjj",
		month: "mm",
		day: "tt"
	},
	"dsb": {
		year: "llll",
		month: "mm",
		day: "źź"
	},
	"el": {
		year: "εεεε",
		month: "μμ",
		day: "ηη"
	},
	"en": {
		year: "yyyy",
		month: "mm",
		day: "dd"
	},
	"eo": {
		year: "jjjj",
		month: "mm",
		day: "tt"
	},
	"es": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"et": {
		year: "aaaa",
		month: "kk",
		day: "pp"
	},
	"eu": {
		year: "uuuu",
		month: "hh",
		day: "ee"
	},
	"fa": {
		year: "سال",
		month: "ماه",
		day: "روز"
	},
	"ff": {
		year: "hhhh",
		month: "ll",
		day: "ññ"
	},
	"fi": {
		year: "vvvv",
		month: "kk",
		day: "pp"
	},
	"fr": {
		year: "aaaa",
		month: "mm",
		day: "jj"
	},
	"fy": {
		year: "jjjj",
		month: "mm",
		day: "dd"
	},
	"ga": {
		year: "bbbb",
		month: "mm",
		day: "ll"
	},
	"gd": {
		year: "bbbb",
		month: "mm",
		day: "ll"
	},
	"gl": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"he": {
		year: "שנה",
		month: "חודש",
		day: "יום"
	},
	"hr": {
		year: "gggg",
		month: "mm",
		day: "dd"
	},
	"hsb": {
		year: "llll",
		month: "mm",
		day: "dd"
	},
	"hu": {
		year: "éééé",
		month: "hh",
		day: "nn"
	},
	"ia": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"id": {
		year: "tttt",
		month: "bb",
		day: "hh"
	},
	"it": {
		year: "aaaa",
		month: "mm",
		day: "gg"
	},
	"ja": {
		year: " 年 ",
		month: "月",
		day: "日"
	},
	"ka": {
		year: "წწწწ",
		month: "თთ",
		day: "რრ"
	},
	"kk": {
		year: "жжжж",
		month: "аа",
		day: "кк"
	},
	"kn": {
		year: "ವವವವ",
		month: "ಮಿಮೀ",
		day: "ದಿದಿ"
	},
	"ko": {
		year: "연도",
		month: "월",
		day: "일"
	},
	"lb": {
		year: "jjjj",
		month: "mm",
		day: "dd"
	},
	"lo": {
		year: "ປປປປ",
		month: "ດດ",
		day: "ວວ"
	},
	"lt": {
		year: "mmmm",
		month: "mm",
		day: "dd"
	},
	"lv": {
		year: "gggg",
		month: "mm",
		day: "dd"
	},
	"meh": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"ml": {
		year: "വർഷം",
		month: "മാസം",
		day: "തീയതി"
	},
	"ms": {
		year: "tttt",
		month: "mm",
		day: "hh"
	},
	"nl": {
		year: "jjjj",
		month: "mm",
		day: "dd"
	},
	"nn": {
		year: "åååå",
		month: "mm",
		day: "dd"
	},
	"no": {
		year: "åååå",
		month: "mm",
		day: "dd"
	},
	"oc": {
		year: "aaaa",
		month: "mm",
		day: "jj"
	},
	"pl": {
		year: "rrrr",
		month: "mm",
		day: "dd"
	},
	"pt": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"rm": {
		year: "oooo",
		month: "mm",
		day: "dd"
	},
	"ro": {
		year: "aaaa",
		month: "ll",
		day: "zz"
	},
	"ru": {
		year: "гггг",
		month: "мм",
		day: "дд"
	},
	"sc": {
		year: "aaaa",
		month: "mm",
		day: "dd"
	},
	"scn": {
		year: "aaaa",
		month: "mm",
		day: "jj"
	},
	"sk": {
		year: "rrrr",
		month: "mm",
		day: "dd"
	},
	"sl": {
		year: "llll",
		month: "mm",
		day: "dd"
	},
	"sr": {
		year: "гггг",
		month: "мм",
		day: "дд"
	},
	"sv": {
		year: "åååå",
		month: "mm",
		day: "dd"
	},
	"szl": {
		year: "rrrr",
		month: "mm",
		day: "dd"
	},
	"tg": {
		year: "сссс",
		month: "мм",
		day: "рр"
	},
	"th": {
		year: "ปปปป",
		month: "ดด",
		day: "วว"
	},
	"tr": {
		year: "yyyy",
		month: "aa",
		day: "gg"
	},
	"uk": {
		year: "рррр",
		month: "мм",
		day: "дд"
	},
	"zh-CN": {
		year: "年",
		month: "月",
		day: "日"
	},
	"zh-TW": {
		year: "年",
		month: "月",
		day: "日"
	}
};
function getPlaceholderObj(locale) {
	if (!isSupportedLocale(locale)) {
		const localeLanguage = getLocaleLanguage(locale);
		if (!isSupportedLocale(localeLanguage)) return placeholders.en;
		else return placeholders[localeLanguage];
	} else return placeholders[locale];
}
function getPlaceholder(field, value, locale) {
	if (isPlaceholderField(field)) return getPlaceholderObj(locale)[field];
	if (isDefaultField(field)) return value;
	if (isTimeField(field)) return "––";
	return "";
}
function isSupportedLocale(locale) {
	return supportedLocales.includes(locale);
}
function isPlaceholderField(field) {
	return placeholderFields.includes(field);
}
function isTimeField(field) {
	return field === "hour" || field === "minute" || field === "second";
}
function isDefaultField(field) {
	return field === "era" || field === "dayPeriod";
}
function getLocaleLanguage(locale) {
	if (Intl.Locale) return new Intl.Locale(locale).language;
	return locale.split("-")[0];
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/parser.js
var calendarDateTimeGranularities = [
	"hour",
	"minute",
	"second"
];
function syncTimeSegmentValues(props) {
	return Object.fromEntries(TIME_SEGMENT_PARTS.map((part) => {
		if (part === "dayPeriod") return [part, props.formatter.dayPeriod(toDate(props.value))];
		return [part, props.value[part]];
	}));
}
function syncSegmentValues(props) {
	const { formatter } = props;
	const dateValues = DATE_SEGMENT_PARTS.map((part) => {
		return [part, props.value[part]];
	});
	if ("hour" in props.value) {
		const timeValues = syncTimeSegmentValues({
			value: props.value,
			formatter
		});
		return {
			...Object.fromEntries(dateValues),
			...timeValues
		};
	}
	return Object.fromEntries(dateValues);
}
function initializeTimeSegmentValues(granularity) {
	return Object.fromEntries(TIME_SEGMENT_PARTS.map((part) => {
		if (part === "dayPeriod") return [part, "AM"];
		return [part, null];
	}).filter(([key]) => {
		if (key === "literal" || key === null) return false;
		if (granularity === "minute" && key === "second") return false;
		if (granularity === "hour" && (key === "second" || key === "minute")) return false;
		else return true;
	}));
}
function initializeSegmentValues(granularity) {
	const initialParts = EDITABLE_SEGMENT_PARTS.map((part) => {
		if (part === "dayPeriod") return [part, "AM"];
		return [part, null];
	}).filter(([key]) => {
		if (key === "literal" || key === null) return false;
		if (granularity === "minute" && key === "second") return false;
		if (granularity === "hour" && (key === "second" || key === "minute")) return false;
		if (granularity === "day") return !calendarDateTimeGranularities.includes(key) && key !== "dayPeriod";
		else return true;
	});
	return Object.fromEntries(initialParts);
}
function createContentObj(props) {
	const { segmentValues, formatter, locale } = props;
	function getPartContent(part) {
		if ("hour" in segmentValues) {
			const value = segmentValues[part];
			if (value !== null) {
				if (part === "day") return formatter.part(props.dateRef.set({
					[part]: value,
					month: segmentValues.month ?? 1
				}), part, { hourCycle: normalizeHourCycle(props.hourCycle) });
				return formatter.part(props.dateRef.set({ [part]: value }), part, { hourCycle: normalizeHourCycle(props.hourCycle) });
			} else return getPlaceholder(part, "", locale.value);
		} else {
			if (isDateSegmentPart(part)) {
				const value = segmentValues[part];
				if (value !== null) {
					if (part === "day") return formatter.part(props.dateRef.set({
						[part]: value,
						month: segmentValues.month ?? 1
					}), part);
					return formatter.part(props.dateRef.set({ [part]: value }), part);
				} else return getPlaceholder(part, "", locale.value);
			}
			return "";
		}
	}
	return Object.keys(segmentValues).reduce((obj, part) => {
		if (!isSegmentPart(part)) return obj;
		if ("hour" in segmentValues && part === "dayPeriod") {
			const value = segmentValues[part];
			if (value !== null) obj[part] = value;
			else obj[part] = getPlaceholder(part, "AM", locale.value);
		} else obj[part] = getPartContent(part);
		return obj;
	}, {});
}
function createContentArr(props) {
	const { granularity, formatter, contentObj, hideTimeZone, hourCycle, isTimeValue } = props;
	return formatter.toParts(props.dateRef, getOptsByGranularity(granularity, hourCycle, isTimeValue)).map((part) => {
		if ([
			"literal",
			"timeZoneName",
			null
		].includes(part.type) || !isSegmentPart(part.type)) return {
			part: part.type,
			value: part.value
		};
		return {
			part: part.type,
			value: contentObj[part.type]
		};
	}).filter((segment) => {
		if (segment.part === null || segment.value === null) return false;
		if (segment.part === "timeZoneName" && (!isZonedDateTime(props.dateRef) || hideTimeZone)) return false;
		if ((!isZonedDateTime(props.dateRef) || hideTimeZone) && segment.part === "literal" && ["[", "]"].includes(segment.value.trim())) return false;
		return true;
	});
}
function createContent(props) {
	const contentObj = createContentObj(props);
	return {
		obj: contentObj,
		arr: createContentArr({
			contentObj,
			...props
		})
	};
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/segment.js
function isSegmentNavigationKey(key) {
	const kbd = useKbd();
	if (key === kbd.ARROW_RIGHT || key === kbd.ARROW_LEFT) return true;
	return false;
}
function isNumberString(value) {
	if (Number.isNaN(Number.parseInt(value))) return false;
	return true;
}
function isAcceptableSegmentKey(key) {
	const kbd = useKbd();
	if ([
		kbd.ENTER,
		kbd.ARROW_UP,
		kbd.ARROW_DOWN,
		kbd.ARROW_LEFT,
		kbd.ARROW_RIGHT,
		kbd.BACKSPACE,
		kbd.SPACE,
		"a",
		"A",
		"p",
		"P"
	].includes(key)) return true;
	if (isNumberString(key)) return true;
	return false;
}
function getSegmentElements(parentElement) {
	return Array.from(parentElement.querySelectorAll("[data-reka-date-field-segment]")).filter((item) => item.getAttribute("data-reka-date-field-segment") !== "literal");
}
function getTimeFieldSegmentElements(parentElement) {
	return Array.from(parentElement.querySelectorAll("[data-reka-time-field-segment]")).filter((item) => item.getAttribute("data-reka-time-field-segment") !== "literal");
}
//#endregion
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/date/useDateField.js
var DIGIT_REG = /^\d$/;
function commonSegmentAttrs(props) {
	return {
		role: "spinbutton",
		contenteditable: true,
		tabindex: props.disabled ? void 0 : 0,
		spellcheck: false,
		inputmode: "numeric",
		autocorrect: "off",
		enterkeyhint: "next",
		style: "caret-color: transparent;"
	};
}
function daySegmentAttrs(props) {
	const { segmentValues, placeholder } = props;
	const isEmpty = segmentValues.day === null;
	const dateFields = {};
	if (segmentValues.day) dateFields.day = segmentValues.day;
	if (segmentValues.month) dateFields.month = segmentValues.month;
	const date = Object.keys(dateFields).length > 0 ? placeholder.set(dateFields) : placeholder;
	const valueNow = date.day;
	const valueMin = 1;
	const valueMax = getDaysInMonth(date);
	const valueText = isEmpty ? "Empty" : `${valueNow}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "day,",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function monthSegmentAttrs(props) {
	const { segmentValues, placeholder, formatter } = props;
	const isEmpty = segmentValues.month === null;
	const date = segmentValues.month ? placeholder.set({ month: segmentValues.month }) : placeholder;
	const valueNow = date.month;
	const valueMin = 1;
	const valueMax = 12;
	const valueText = isEmpty ? "Empty" : `${valueNow} - ${formatter.fullMonth(toDate(date))}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "month, ",
		"contenteditable": true,
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function yearSegmentAttrs(props) {
	const { segmentValues, placeholder } = props;
	const isEmpty = segmentValues.year === null;
	const date = segmentValues.year ? placeholder.set({ year: segmentValues.year }) : placeholder;
	const valueMin = 1;
	const valueMax = 9999;
	const valueNow = date.year;
	const valueText = isEmpty ? "Empty" : `${valueNow}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "year, ",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function hourSegmentAttrs(props) {
	const { segmentValues, hourCycle, placeholder } = props;
	if (!("hour" in segmentValues) || !("hour" in placeholder)) return {};
	const isEmpty = segmentValues.hour === null;
	const date = segmentValues.hour ? placeholder.set({ hour: segmentValues.hour }) : placeholder;
	const valueMin = hourCycle === 12 ? 1 : 0;
	const valueMax = hourCycle === 12 ? 12 : 23;
	const valueNow = date.hour;
	const valueText = isEmpty ? "Empty" : `${valueNow} ${segmentValues.dayPeriod ?? ""}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "hour, ",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function minuteSegmentAttrs(props) {
	const { segmentValues, placeholder } = props;
	if (!("minute" in segmentValues) || !("minute" in placeholder)) return {};
	const isEmpty = segmentValues.minute === null;
	const valueNow = (segmentValues.minute ? placeholder.set({ minute: segmentValues.minute }) : placeholder).minute;
	const valueMin = 0;
	const valueMax = 59;
	const valueText = isEmpty ? "Empty" : `${valueNow}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "minute, ",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function secondSegmentAttrs(props) {
	const { segmentValues, placeholder } = props;
	if (!("second" in segmentValues) || !("second" in placeholder)) return {};
	const isEmpty = segmentValues.second === null;
	const valueNow = (segmentValues.second ? placeholder.set({ second: segmentValues.second }) : placeholder).second;
	const valueMin = 0;
	const valueMax = 59;
	const valueText = isEmpty ? "Empty" : `${valueNow}`;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "second, ",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText,
		"data-placeholder": isEmpty ? "" : void 0
	};
}
function dayPeriodSegmentAttrs(props) {
	const { segmentValues } = props;
	if (!("dayPeriod" in segmentValues)) return {};
	const valueMin = 0;
	const valueMax = 12;
	const valueNow = segmentValues.hour ? segmentValues.hour > 12 ? segmentValues.hour - 12 : segmentValues.hour : 0;
	const valueText = segmentValues.dayPeriod ?? "AM";
	return {
		...commonSegmentAttrs(props),
		"inputmode": "text",
		"aria-label": "AM/PM",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText
	};
}
function literalSegmentAttrs(_props) {
	return {
		"aria-hidden": true,
		"data-segment": "literal"
	};
}
function timeZoneSegmentAttrs(props) {
	return {
		"role": "textbox",
		"aria-label": "timezone, ",
		"data-readonly": true,
		"data-segment": "timeZoneName",
		"tabindex": props.disabled ? void 0 : 0,
		"style": "caret-color: transparent;"
	};
}
function eraSegmentAttrs(props) {
	const { segmentValues, placeholder } = props;
	const valueMin = 0;
	const valueMax = 0;
	const valueNow = 0;
	const valueText = "era" in segmentValues ? segmentValues.era : placeholder.era;
	return {
		...commonSegmentAttrs(props),
		"aria-label": "era",
		"aria-valuemin": valueMin,
		"aria-valuemax": valueMax,
		"aria-valuenow": valueNow,
		"aria-valuetext": valueText
	};
}
var segmentBuilders = {
	day: { attrs: daySegmentAttrs },
	month: { attrs: monthSegmentAttrs },
	year: { attrs: yearSegmentAttrs },
	hour: { attrs: hourSegmentAttrs },
	minute: { attrs: minuteSegmentAttrs },
	second: { attrs: secondSegmentAttrs },
	dayPeriod: { attrs: dayPeriodSegmentAttrs },
	literal: { attrs: literalSegmentAttrs },
	timeZoneName: { attrs: timeZoneSegmentAttrs },
	era: { attrs: eraSegmentAttrs }
};
function useDateField(props) {
	const kbd = useKbd();
	function minuteSecondIncrementation({ e, part, dateRef, prevValue }) {
		const step = props.step.value[part] ?? 1;
		const sign = e.key === kbd.ARROW_UP ? step : -step;
		const min = 0;
		const max = 59;
		if (prevValue === null) return sign > 0 ? min : max;
		const cycleArgs = [part, sign];
		return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs)[part];
	}
	function deleteValue(prevValue) {
		props.hasLeftFocus.value = false;
		if (prevValue === null) return prevValue;
		const str = prevValue.toString();
		if (str.length === 1) {
			props.modelValue.value = void 0;
			return null;
		}
		return Number.parseInt(str.slice(0, -1));
	}
	function dateTimeValueIncrementation({ e, part, dateRef, prevValue }) {
		const step = props.step.value[part] ?? 1;
		const sign = e.key === kbd.ARROW_UP ? step : -step;
		if (prevValue === null) return dateRef[part];
		if (part === "hour" && "hour" in dateRef) {
			const cycleArgs$1 = [part, sign];
			return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs$1)[part];
		}
		const cycleArgs = [part, sign];
		if (part === "day") return dateRef.set({
			[part]: prevValue,
			month: props.segmentValues.value.month ?? 1
		}).cycle(...cycleArgs)[part];
		return dateRef.set({ [part]: prevValue }).cycle(...cycleArgs)[part];
	}
	function updateDayOrMonth(max, num, prev) {
		let moveToNext = false;
		const maxStart = Math.floor(max / 10);
		/**
		* If the user has left the segment, we want to reset the
		* `prev` value so that we can start the segment over again
		* when the user types a number.
		*/
		if (props.hasLeftFocus.value) {
			props.hasLeftFocus.value = false;
			props.lastKeyZero.value = false;
			prev = null;
		}
		if (prev === null) {
			/**
			* If the user types a 0 as the first number, we want
			* to keep track of that so that when they type the next
			* number, we can move to the next segment.
			*/
			if (num === 0) {
				props.lastKeyZero.value = true;
				return {
					value: null,
					moveToNext
				};
			}
			/**
			* If the last key was a 0, or if the first number is
			* greater than the max start digit (0-3 in most cases), then
			* we want to move to the next segment, since it's not possible
			* to continue typing a valid number in this segment.
			*/
			if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
			props.lastKeyZero.value = false;
			/**
			* If none of the above conditions are met, then we can just
			* return the number as the segment value and continue typing
			* in this segment.
			*/
			return {
				value: num,
				moveToNext
			};
		}
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		const digits = prev.toString().length;
		const total = Number.parseInt(prev.toString() + num.toString());
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		if (digits === 2 || total > max) {
			/**
			* As we're doing elsewhere, we're checking if the number is greater
			* than the max start digit (0-3 in most months), and if so, we're
			* going to move to the next segment.
			*/
			if (num > maxStart || total > max) moveToNext = true;
			return {
				value: num,
				moveToNext
			};
		}
		moveToNext = true;
		return {
			value: total,
			moveToNext
		};
	}
	function updateMinuteOrSecond(num, prev) {
		const max = 59;
		let moveToNext = false;
		const maxStart = Math.floor(max / 10);
		/**
		* If the user has left the segment, we want to reset the
		* `prev` value so that we can start the segment over again
		* when the user types a number.
		*/
		if (props.hasLeftFocus.value) {
			props.hasLeftFocus.value = false;
			props.lastKeyZero.value = false;
			prev = null;
		}
		if (prev === null) {
			/**
			* If the user types a 0 as the first number, we want
			* to keep track of that so that when they type the next
			* number, we can move to the next segment.
			*/
			if (num === 0) {
				props.lastKeyZero.value = true;
				return {
					value: 0,
					moveToNext
				};
			}
			/**
			* If the last key was a 0, or if the first number is
			* greater than the max start digit (0-3 in most cases), then
			* we want to move to the next segment, since it's not possible
			* to continue typing a valid number in this segment.
			*/
			if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
			props.lastKeyZero.value = false;
			/**
			* If none of the above conditions are met, then we can just
			* return the number as the segment value and continue typing
			* in this segment.
			*/
			return {
				value: num,
				moveToNext
			};
		}
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		const digits = prev.toString().length;
		const total = Number.parseInt(prev.toString() + num.toString());
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		if (digits === 2 || total > max) {
			/**
			* As we're doing elsewhere, we're checking if the number is greater
			* than the max start digit (0-3 in most months), and if so, we're
			* going to move to the next segment.
			*/
			if (num > maxStart) moveToNext = true;
			return {
				value: num,
				moveToNext
			};
		}
		moveToNext = true;
		return {
			value: total,
			moveToNext
		};
	}
	function updateHour(max, num, prev) {
		let moveToNext = false;
		const maxStart = Math.floor(max / 10);
		/**
		* If the user has left the segment, we want to reset the
		* `prev` value so that we can start the segment over again
		* when the user types a number.
		*/
		if (props.hasLeftFocus.value) {
			props.hasLeftFocus.value = false;
			props.lastKeyZero.value = false;
			prev = null;
		}
		if (prev === null) {
			/**
			* If the user types a 0 as the first number, we want
			* to keep track of that so that when they type the next
			* number, we can move to the next segment.
			*/
			if (num === 0) {
				props.lastKeyZero.value = true;
				return {
					value: 0,
					moveToNext
				};
			}
			/**
			* If the last key was a 0, or if the first number is
			* greater than the max start digit (0-3 in most cases), then
			* we want to move to the next segment, since it's not possible
			* to continue typing a valid number in this segment.
			*/
			if (props.lastKeyZero.value || num > maxStart) moveToNext = true;
			props.lastKeyZero.value = false;
			/**
			* If none of the above conditions are met, then we can just
			* return the number as the segment value and continue typing
			* in this segment.
			*/
			return {
				value: num,
				moveToNext
			};
		}
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		const digits = prev.toString().length;
		const total = Number.parseInt(prev.toString() + num.toString());
		/**
		* If the number of digits is 2, or if the total with the existing digit
		* and the pressed digit is greater than the maximum value for this
		* month, then we will reset the segment as if the user had pressed the
		* backspace key and then typed the number.
		*/
		if (digits === 2 || total > max) {
			/**
			* As we're doing elsewhere, we're checking if the number is greater
			* than the max start digit (0-3 in most months), and if so, we're
			* going to move to the next segment.
			*/
			if (num > maxStart) moveToNext = true;
			return {
				value: num,
				moveToNext
			};
		}
		moveToNext = true;
		return {
			value: total,
			moveToNext
		};
	}
	function updateYear(num, prev) {
		let moveToNext = false;
		/**
		* If the user has left the segment, we want to reset the
		* `prev` value so that we can start the segment over again
		* when the user types a number.
		*/
		if (props.hasLeftFocus.value) {
			props.hasLeftFocus.value = false;
			prev = null;
		}
		if (prev === null) return {
			value: num === 0 ? 1 : num,
			moveToNext
		};
		const str = prev.toString() + num.toString();
		if (str.length > 4) return {
			value: num === 0 ? 1 : num,
			moveToNext
		};
		if (str.length === 4) moveToNext = true;
		return {
			value: Number.parseInt(str),
			moveToNext
		};
	}
	const attributes = computed(() => segmentBuilders[props.part]?.attrs({
		disabled: props.disabled.value,
		placeholder: props.placeholder.value,
		hourCycle: props.hourCycle,
		segmentValues: props.segmentValues.value,
		formatter: props.formatter
	}) ?? {});
	function handleDaySegmentKeydown(e) {
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
		const prevValue = props.segmentValues.value.day;
		if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
			props.segmentValues.value.day = dateTimeValueIncrementation({
				e,
				part: "day",
				dateRef: props.placeholder.value,
				prevValue
			});
			return;
		}
		if (isNumberString(e.key)) {
			const num = Number.parseInt(e.key);
			const segmentMonthValue = props.segmentValues.value.month;
			const { value, moveToNext } = updateDayOrMonth(segmentMonthValue ? getDaysInMonth(props.placeholder.value.set({ month: segmentMonthValue })) : 31, num, prevValue);
			props.segmentValues.value.day = value;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.day = deleteValue(prevValue);
		}
	}
	function handleMonthSegmentKeydown(e) {
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
		const prevValue = props.segmentValues.value.month;
		if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
			props.segmentValues.value.month = dateTimeValueIncrementation({
				e,
				part: "month",
				dateRef: props.placeholder.value,
				prevValue
			});
			return;
		}
		if (isNumberString(e.key)) {
			const { value, moveToNext } = updateDayOrMonth(12, Number.parseInt(e.key), prevValue);
			props.segmentValues.value.month = value;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.month = deleteValue(prevValue);
		}
	}
	function handleYearSegmentKeydown(e) {
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) return;
		const prevValue = props.segmentValues.value.year;
		if (e.key === kbd.ARROW_DOWN || e.key === kbd.ARROW_UP) {
			props.segmentValues.value.year = dateTimeValueIncrementation({
				e,
				part: "year",
				dateRef: props.placeholder.value,
				prevValue
			});
			return;
		}
		if (isNumberString(e.key)) {
			const { value, moveToNext } = updateYear(Number.parseInt(e.key), prevValue);
			props.segmentValues.value.year = value;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.year = deleteValue(prevValue);
		}
	}
	function uses12HourFormat(locale) {
		const hourCycle = new $12a3c853105e5a70$export$ad991b66133851cf(locale, { hour: "numeric" }).resolvedOptions().hourCycle;
		return hourCycle === "h11" || hourCycle === "h12";
	}
	function handleHourSegmentKeydown(e) {
		const dateRef = props.placeholder.value;
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("hour" in dateRef) || !("hour" in props.segmentValues.value)) return;
		const prevValue = props.segmentValues.value.hour;
		if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {
			const newHour = dateTimeValueIncrementation({
				e,
				part: "hour",
				dateRef: props.placeholder.value,
				prevValue
			});
			props.segmentValues.value.hour = newHour;
			if ("dayPeriod" in props.segmentValues.value && newHour !== null) props.segmentValues.value.dayPeriod = newHour >= 12 ? "PM" : "AM";
			return;
		}
		if (isNumberString(e.key)) {
			const num = Number.parseInt(e.key);
			const is12Hour = props.hourCycle !== void 0 ? props.hourCycle === 12 : uses12HourFormat(props.formatter.getLocale());
			const max = is12Hour ? 12 : 24;
			let displayPrev = prevValue;
			if (is12Hour && prevValue !== null) displayPrev = prevValue % 12 === 0 ? 0 : prevValue > 12 ? prevValue - 12 : prevValue;
			const { value, moveToNext } = updateHour(max, num, displayPrev);
			let internalValue = value;
			if (is12Hour && value !== null) {
				const period = props.segmentValues.value.dayPeriod || "AM";
				if (value === 12) internalValue = period === "AM" ? 0 : 12;
				else internalValue = period === "PM" ? value + 12 : value;
			}
			props.segmentValues.value.hour = internalValue;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.hour = deleteValue(prevValue);
		}
	}
	function handleMinuteSegmentKeydown(e) {
		const dateRef = props.placeholder.value;
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("minute" in dateRef) || !("minute" in props.segmentValues.value)) return;
		const prevValue = props.segmentValues.value.minute;
		if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) props.segmentValues.value.minute = minuteSecondIncrementation({
			e,
			part: "minute",
			dateRef: props.placeholder.value,
			prevValue
		});
		if (isNumberString(e.key)) {
			const { value, moveToNext } = updateMinuteOrSecond(Number.parseInt(e.key), prevValue);
			props.segmentValues.value.minute = value;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.minute = deleteValue(prevValue);
		}
	}
	function handleSecondSegmentKeydown(e) {
		const dateRef = props.placeholder.value;
		if (!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key) || !("second" in dateRef) || !("second" in props.segmentValues.value)) return;
		const prevValue = props.segmentValues.value.second;
		if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) props.segmentValues.value.second = minuteSecondIncrementation({
			e,
			part: "second",
			dateRef: props.placeholder.value,
			prevValue
		});
		if (isNumberString(e.key)) {
			const { value, moveToNext } = updateMinuteOrSecond(Number.parseInt(e.key), prevValue);
			props.segmentValues.value.second = value;
			if (moveToNext) props.focusNext();
		}
		if (e.key === kbd.BACKSPACE) {
			props.hasLeftFocus.value = false;
			props.segmentValues.value.second = deleteValue(prevValue);
		}
	}
	function handleDayPeriodSegmentKeydown(e) {
		if ((!isAcceptableSegmentKey(e.key) || isSegmentNavigationKey(e.key)) && e.key !== "a" && e.key !== "p" || !("hour" in props.placeholder.value) || !("dayPeriod" in props.segmentValues.value)) return;
		if (e.key === kbd.ARROW_UP || e.key === kbd.ARROW_DOWN) {
			if (props.segmentValues.value.dayPeriod === "AM") {
				props.segmentValues.value.dayPeriod = "PM";
				props.segmentValues.value.hour = props.segmentValues.value.hour + 12;
				return;
			}
			props.segmentValues.value.dayPeriod = "AM";
			props.segmentValues.value.hour = props.segmentValues.value.hour - 12;
			return;
		}
		if (["a", "A"].includes(e.key) && props.segmentValues.value.dayPeriod !== "AM") {
			props.segmentValues.value.dayPeriod = "AM";
			props.segmentValues.value.hour = props.segmentValues.value.hour - 12;
			return;
		}
		if (["p", "P"].includes(e.key) && props.segmentValues.value.dayPeriod !== "PM") {
			props.segmentValues.value.dayPeriod = "PM";
			props.segmentValues.value.hour = props.segmentValues.value.hour + 12;
		}
	}
	function handleSegmentClick(e) {
		if (props.disabled.value) e.preventDefault();
	}
	function handleSegmentKeydown(e) {
		if (e.isComposing || e.key === "Process") return;
		const disabled = props.disabled.value;
		const readonly = props.readonly.value;
		if (disabled || readonly) return;
		if (e.key !== kbd.TAB) e.preventDefault();
		({
			day: handleDaySegmentKeydown,
			month: handleMonthSegmentKeydown,
			year: handleYearSegmentKeydown,
			hour: handleHourSegmentKeydown,
			minute: handleMinuteSegmentKeydown,
			second: handleSecondSegmentKeydown,
			dayPeriod: handleDayPeriodSegmentKeydown,
			timeZoneName: () => {}
		})[props.part](e);
		if (![kbd.ARROW_LEFT, kbd.ARROW_RIGHT].includes(e.key) && e.key !== kbd.TAB && e.key !== kbd.SHIFT && isAcceptableSegmentKey(e.key)) {
			if (Object.values(props.segmentValues.value).every((item) => item !== null)) {
				const updateObject = { ...props.segmentValues.value };
				const dateRef = props.placeholder.value.set(updateObject);
				props.modelValue.value = dateRef.copy();
			}
		}
	}
	function handleSegmentFocusOut() {
		if (!props.stepSnapping?.value) return;
		if (props.part === "hour" && "hour" in props.segmentValues.value && props.segmentValues.value.hour !== null && props.step.value.hour && props.step.value.hour > 1) {
			props.segmentValues.value.hour = snapValueToStep(props.segmentValues.value.hour, 0, 23, props.step.value.hour);
			if ("dayPeriod" in props.segmentValues.value) {
				if (props.segmentValues.value.hour < 12) props.segmentValues.value.dayPeriod = "AM";
				else if (props.segmentValues.value.hour) props.segmentValues.value.dayPeriod = "PM";
			}
		} else if (props.part === "minute" && "minute" in props.segmentValues.value && props.segmentValues.value.minute !== null && props.step.value.minute && props.step.value.minute > 1) props.segmentValues.value.minute = snapValueToStep(props.segmentValues.value.minute, 0, 59, props.step.value.minute);
		else if (props.part === "second" && "second" in props.segmentValues.value && props.segmentValues.value.second !== null && props.step.value.second && props.step.value.second > 1) props.segmentValues.value.second = snapValueToStep(props.segmentValues.value.second, 0, 59, props.step.value.second);
		if (Object.values(props.segmentValues.value).every((item) => item !== null)) {
			const dateRef = props.placeholder.value.set({ ...props.segmentValues.value });
			props.modelValue.value = dateRef.copy();
		}
	}
	let preCompositionNodes = null;
	function handleSegmentBeforeInput(e) {
		if (!e.isComposing) e.preventDefault();
	}
	function handleSegmentCompositionStart(e) {
		const el = e.target;
		preCompositionNodes = Array.from(el.childNodes, (node) => ({
			node,
			value: node.nodeValue
		}));
	}
	function handleSegmentCompositionEnd(e) {
		const el = e.target;
		const original = preCompositionNodes;
		preCompositionNodes = null;
		if (original) {
			for (const { node, value } of original) node.nodeValue = value;
			el.replaceChildren(...original.map((o) => o.node));
		}
		const data = e.data;
		if (!data) return;
		for (const char of data) {
			if (!DIGIT_REG.test(char)) continue;
			const target = getActiveElement();
			if (!(target instanceof HTMLElement)) break;
			target.dispatchEvent(new KeyboardEvent("keydown", {
				key: char,
				bubbles: true,
				cancelable: true
			}));
		}
	}
	return {
		handleSegmentClick,
		handleSegmentKeydown,
		handleSegmentBeforeInput,
		handleSegmentCompositionStart,
		handleSegmentCompositionEnd,
		handleSegmentFocusOut,
		attributes
	};
}
//#endregion
export { toDate as A, $ad063034c8620db8$export$a5a3b454ada2268e as B, getNextLastDayOfWeek as C, isBeforeOrSame as D, isBefore as E, $ad063034c8620db8$export$5a8da0c44a3afdf2 as F, $ad063034c8620db8$export$d0bdf45af03a6ea3 as H, $ad063034c8620db8$export$629b0a497aa65267 as I, $ad063034c8620db8$export$91b62ebf2ba703ee as L, $2aaf608024c21ca1$export$99faa760c7908e4f as M, $d07e34cce18680fd$export$b21e0b124e224484 as N, isBetween as O, $ad063034c8620db8$export$2061056d06d7cdf7 as P, $ad063034c8620db8$export$a18c89cbd24170ff as R, getLastFirstDayOfWeek as S, isAfter as T, $ad063034c8620db8$export$ea39ec197993aef0 as U, $ad063034c8620db8$export$aa8b41735afcabd2 as V, normalizeInputValue as _, createContent as a, getDefaultDate as b, syncSegmentValues as c, useDateFormatter as d, chunk as f, normalizeHourCycle as g, normalizeDateStep as h, isSegmentNavigationKey as i, $2aaf608024c21ca1$export$680ea196effce5f as j, isBetweenInclusive as k, syncTimeSegmentValues as l, handleCalendarInitialFocus as m, getSegmentElements as n, initializeSegmentValues as o, getInputType as p, getTimeFieldSegmentElements as r, initializeTimeSegmentValues as s, useDateField as t, useLocale as u, areAllDaysBetweenValid as v, hasTime as w, getDefaultTime as x, getDaysInMonth as y, $ad063034c8620db8$export$a2258d9c4118825c as z };

//# sourceMappingURL=useDateField-CQZb799C.js.map